| Geronimo_MoinMoin_wiki > OpenEJBNova |
OpenEJB
is the default EJB 2.x Container of Geronimo.
THIS DOCUMENT IS OUT OF DATE.
The the nova branch of OpenEJB has finally been merged with the main branch and the new cvs lives at OpenEJB's new home at Codehaus
. That combined with the removal of the deployment system as it is documented here, means that it is no longer possible to deploy OpenEJB into Geronimo. More work is required and should be done Real Soon Now.
cvs -d:pserver:anonymous@cvs.openejb.sf.net:/cvsroot/openejb co -r nova -d nova openejb
If you are having proxy/firewall problems then you can try the following
cvs -d:pserver:anonymous@cvs-pserver.sf.net:80/cvsroot/openejb login cvs -d:pserver:anonymous@cvs-pserver.sf.net:80/cvsroot/openejb co -r nova -d nova openejb
> maven run:main
...a lot of lines cut...
[java] 22:41:00,250 TRACE [DeploymentPlan] Performing task RegisterMBeanInstance geronimo.deployment:role=DeploymentUnit,type=Service,url="file:/c:/projects/geronimo/target/geronimo-DEV/deploy/nova-ejb-service.xml"
[java] 22:41:00,300 DEBUG [AbstractWebContainer] Ignoring registration of mbean=geronimo.deployment:role=DeploymentUnit,type=Service,url="file:/c:/projects/geronimo/target/geronimo-DEV/deploy/nova-ejb-service.xml"
[java] 22:41:00,300 TRACE [DeploymentPlan] Performing task StartMBeanInstance geronimo.deployment:role=DeploymentUnit,type=Service,url="file:/c:/projects/geronimo/target/geronimo-DEV/deploy/nova-ejb-service.xml"
[java] 22:41:00,300 DEBUG [ServiceDeployment] geronimo.deployment:role=DeploymentUnit,type=Service,url="file:/c:/projects/geronimo/target/geronimo-DEV/deploy/nova-ejb-service.xml" State changed from stopped to starting
[java] 22:41:00,320 DEBUG [ServiceDeployment] geronimo.deployment:role=DeploymentUnit,type=Service,url="file:/c:/projects/geronimo/target/geronimo-DEV/deploy/nova-ejb-service.xml" State changed from starting to running
[java] 22:41:00,320 TRACE [DeploymentPlan] Performing task CreateClassSpace geronimo.system:role=ClassSpace,name=System
[java] 22:41:00,320 TRACE [DeploymentPlan] Performing task DeployGeronimoMBean geronimo.deployment:role=DeploymentPlanner,type=EJBModule
[java] 22:41:00,350 TRACE [DeployGeronimoMBean] Creating GeronimoMBean name=geronimo.deployment:role=DeploymentPlanner,type=EJBModule
[java] 22:41:00,501 DEBUG [AbstractWebContainer] Ignoring registration of mbean=geronimo.deployment:role=DeploymentPlanner,type=EJBModule
[java] 22:41:00,501 TRACE [DeploymentPlan] Performing task InitializeMBeanInstance geronimo.deployment:role=DeploymentPlanner,type=EJBModule
[java] 22:41:00,501 TRACE [DeploymentPlan] Performing task StartMBeanInstance geronimo.deployment:role=DeploymentPlanner,type=EJBModule
[java] 22:41:00,501 DEBUG [GeronimoMBean] geronimo.deployment:role=DeploymentPlanner,type=EJBModule State changed from stopped to starting
[java] 22:41:00,501 DEBUG [GeronimoMBean] geronimo.deployment:role=DeploymentPlanner,type=EJBModule State changed from starting to running
...a lot of lines cut...
[java] 22:41:12,258 INFO [Geronimo] Started Server in 21s
= Deploying EJB = org.apache.geronimo.kernel.deployment.scanner.DeploymentScanner
is in charge of monitoring a specified set of directories and deploying files therein. It's configured in target/geronimo-DEV/etc/boot-service.xml.
/ejbs. NOTE: $
<arg type="java.net.URL[]">${geronimo.home}/deploy/,${geronimo.home}/ejbs/</arg>
It's also possible to use the default directory $ /deploy/_ or create another one beneath, e.g. _$
[java] java.lang.NullPointerException
[java] at org.openejb.nova.deployment.DeployCMPEntityContainer.perform(DeployCMPEntityContainer.java:111)
[java] at org.apache.geronimo.kernel.deployment.DeploymentPlan.execute(DeploymentPlan.java:107)
[java] at org.apache.geronimo.kernel.deployment.DeploymentController.executePlans(DeploymentController.java:270)
[java] at org.apache.geronimo.kernel.deployment.DeploymentController.executeJob(DeploymentController.java:194)
[java] at org.apache.geronimo.kernel.deployment.DeploymentController.access$200(DeploymentController.java:89)
[java] at org.apache.geronimo.kernel.deployment.DeploymentController$DeploymentWaiter.run(DeploymentController.java:324)
[java] at java.lang.Thread.run(Thread.java:534)
It's because EJBModuleDeploymentPlanner
creates schemaTask only when <datasource-name> is available. Unfortunatelly, planCMPEntity doesn't check whether or not schemaTask is null. It's not a big deal as Validator is expected to sort it out. NOTE: You can find a sample EJB at OpenEJB Hello World!
page.
The process of deploying a bean (=use case) begins when o.a.g.kernel.deployment.scanner.DeploymentScanner
(defined in /etc/boot-service.xml) is started up and monitoring a set of directories (defined in boot-service.xml file) at a defined in boot-service.xml file time interval. There're two available deployment scanners:
FileSystemScanner
(FSS) picks up a file and checks whether it's of *_ARCHIVE type. If it is, FSS adds the file to a list of deployments. It's visible on the console as:
where <filename> is the name of the deployment (i.e. file or directory).
The list is handed over to EJBModuleDeploymentPlanner
, which ensures that /META-INF/geronimo-ejb-jar.xml exists. If it doesn't the file is removed from the list of deployments (no message about it, though). The check of geronimo-ejb-jar.xml existence is hander over to DeploymentHelper
that attempts to open up /META-INF/ejb-jar.xml file. If /META-INF/ejb-jar.xml doesn't exist, geronimo-ejb-jar.xml is assumed to not exist as well. If it does the file is processed and shown on the console as:
where <filename> is the name of the deployment (i.e. file or directory)
The next steps is shown on the console as:
It's indication that EJBmodule is about to read /META-INF/geronimo-ejb-jar.xml. The file currently contains all the required information on the EJB.
When deployed it's shown as "geronimo.deployment:role=DeploymentUnitClassSpace
,url=<filename>,type=EJBModule" MBean instance.