to complete shortly JL and I worked on some samples: http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/simple-osgi/
it has no doc today but it works. - Romain 2011/12/23 Charles Moulliard <[email protected]> > Hi David, > > Here is a summary about the development they have been done around OpenEJB > - > JavaEE for OSGI world and more precisely Apache Karaf. > > 1) Packaging > > OpenEJB can be easily deployed on Apache Karaf using features xml file > which > is a file containing the description of the different bundles to be > deployed. With Opene EJB 4.0.0-2-SNAPSHOT, you can deploy on Apache Karaf > 2.2.x by example the features and the server OpeneEJB like that > > features:addurl > mvn:org.apache.openejb/openejb-core-osgi/4.0.0-beta-2-SNAPSHOT/xml/features > features:install openejb-server > > 2) Deployment > > Two modes exist to deploy EJBs jars files. > > a) Server centric > > By adding apps and conf (containing config files for openejb) directories > under the root directory of Karaf, we can use OpenEJB as a standalone > server > and deploy EJBs jar files in its apps directory > > Remark : This directory is not scanned regularly like deploy directory and > so we are not able to update/add or delete files during Karaf running. > > b) OSGI based > > EJBs jar files can be deployed as OSGI bundles. By default, OpenEJB scan > every bundle deployed and if it discover jar + ejb descriptor or classes > annotated (@stateless, @Statefull, @Singleton, ...), then they will be > registered > > 3) Security > > OpenEJB can use the Karaf realm > (https://issues.apache.org/jira/browse/OPENEJB-1716) > > 4) Tests > > We have achieved different tests to validate the deployment approach > (server, OSGI) and check remotely if we can access Stateless, Statefull, > Singleton EJB beans > > 5) Camel > > As there is a camel-ejb (= EJB JNDI client) compoent, we can call from a > camel route EJB beans deployed in OpenEJB. There are still somes issues but > that should be solved soon. > > Remark : when Camel lookup beans, it first lookups up using the EJB Jndi > Registry and it is fails it will look in the OSGI Registry and finally > Spring Beans locally > > Planned / Under discussion > > - We have started to develop a Karaf command to deploy/undeploy EJB jars > for > server approach > - We will add a new command ejb:list to display in the Karaf console the > EJB > deployed and their state/status (active/failed - stateless, singleton, ...) > - We should improve the EJB deployment to allow not only to access to the > EJB beans using JNDI but through OSGI Service lookup. This will allow POJO > deployed on Karaf or Camel route to have access to those beans using its > interface name like we do with Spring DM, Blueprint > - We have to discuss if this is necessary to use OpenEJB for JPA - Entity > Beans as Karaf through Apache Aries can use OSGI JPA + OpenJPA ? > - Additional tests / development should be made for CDI but this point is > definitively something that we are looking for for Karaf platform to reuse > projects developed around J2EE spec on OSGI container. > - It could be interesting to have a KarafEE release containing Karaf + > OpenJPA + OpenEJB + HSQLDB or H2Database + Aries Enterprise features. This > works is partially done as we have created the features file to deploy all > the bundles. Using Karaf branding > ( > http://icodebythesea.blogspot.com/2010/08/re-branding-karaf-shell-console.html > ), > we should rebrand Karaf for KarafEE and webconsole > (http://svn.apache.org/repos/asf/karaf/webconsole/trunk/) should be > extended > for DataSource, EJB Management, .. like also adding the commands specific > to > EE (ejb:, web: and why not something for jpa:) > > Regards, > > Charles > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/OSGi-Work-tp4223311p4227928.html > Sent from the OpenEJB Dev mailing list archive at Nabble.com. >
