Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Our company uses Jboss in production and OpenEjb for unit testing. When we started adaptation of OpenEJb in our environment we had two main problems:
- OpenEjb and Jboss use different JNDI names for beans
- Jboss cmp beans can't be deployed with OpenEjb
After some investigation we decided to write JbossCompatibleInitialContextFactory which extends LocalInitialContextFactory and:
- supports @LocalBinding, @RemoteBinding, @RemoteBindings jboss ejb3 annotations
- translates jbosscmp-jdbc.xml to OpenEjb cmp beans format in runtime
- parses jboss.xml to find JNDI names for beans
- adds compatibility with Jboss JNDI names for datasources (like: "java:/PostgresDS", "java:jcr/local")
I'm attaching implementation of JbossCompatibleInitialContextFactory as well as tests of the factory for ejb2 and ejb3 beans.
We would be pleasure if our work will be helpful for you.