Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tknerr/sample-ejb-app
Sample WebApp using EJBs
https://github.com/tknerr/sample-ejb-app
Last synced: about 1 month ago
JSON representation
Sample WebApp using EJBs
- Host: GitHub
- URL: https://github.com/tknerr/sample-ejb-app
- Owner: tknerr
- Created: 2013-12-16T09:19:44.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-23T10:07:14.000Z (over 10 years ago)
- Last Synced: 2023-03-23T00:22:27.226Z (almost 2 years ago)
- Language: Java
- Size: 289 KB
- Stars: 2
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Headline
This is a sample Maven Java EE ear/war/ejb project demonstrating dependency injection via annotations (e.g. `@Stateless`, `@EJB`) which can be overridden from XML deployment descriptors (e.g. `ejb-jar.xml` or `application.xml`).
## The Problem
As long as there is only a single implementation for a given bean interface, there is no problem at all. Once you add additional bean implementations you have to specify which implementation to use, otherwise the deployment will fail.
## The Solution
There are two use cases:
1. All EJB implementations are in the same ejb module
* use the `ejb-jar.xml` in the ejb module to specify the bean implementation
* working sample: browse [sample-ejb-app@249cbe](https://github.com/tknerr/sample-ejb-app/tree/249cbe7247095495f9875f9aaf0334efbb8a1304)
2. EJB implementations are spread across multiple ejb modules
* use the `application.xml` in the ear project to specify the bean implementation
* working sample: browse [sample-ejb-app@d6659a](https://github.com/tknerr/sample-ejb-app/tree/d6659adef967fdc20dcfd6473665480695c9103c)