Date: 2004-01-09T16:02:09 Editor: JacekLaskowski <[EMAIL PROTECTED]> Wiki: Apache Geronimo Wiki Page: OpenEJBNova URL: http://wiki.apache.org/geronimo/OpenEJBNova
More details Change Log: ------------------------------------------------------------------------------ @@ -1,5 +1,5 @@ = "About" = -OpenEJB Nova is the default EJB Container of Geronimo. It's based on [http://www.openejb.org OpenEJB]. +OpenEJB Nova is the default EJB 2.x Container of Geronimo. It's based on [http://www.openejb.org OpenEJB]. = Building = @@ -9,27 +9,7 @@ cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/openejb co -r nova -d nova openejb - * Go to nova/nova directory and run maven build (As of December, 2003, you may encounter a problem. The Geronimo .jar's first have to be moved to the Maven repository so the OpenEJB build can find the Geronimo .jar's. In this situation the following messages are generated by Maven: - -{{{ - .. - The build cannot continue because of the following unsatisfied dependencies: - - geronimo-common-DEV.jar (no download url specified) - geronimo-kernel-DEV.jar (no download url specified) - geronimo-core-DEV.jar (no download url specified) - geronimo-remoting-DEV.jar (no download url specified) - geronimo-spec-j2ee-connector-DEV.jar (no download url specified) - geronimo-spec-j2ee-jacc-DEV.jar (no download url specified) - -}}} - -{{{jlaskowski: The files are installed during Geronimo build - see the first bullet. Please remove it and let's discuss it on geronimo-dev mailing list}}} - -There are also some compile errors when using the anonymous check-out.) - -{{{jlaskowski: what kind of errors do you see? Please remove the statement and let's discuss details on geronimo-dev mailing list.}}} - + * Go to nova/nova directory and run maven build = Running = @@ -85,15 +65,29 @@ File extensions aren't important. * Two files are mandatory to have Geronimo (org.openejb.nova.deployment.EJBmoduleDeploymentPlanner, exactly) deploy an EJB: - * '''META-INF/geronimo-ejb-jar.xml''' + * '''META-INF/geronimo-ejb-jar.xml''' ([http://cvs.apache.org/viewcvs.cgi/*checkout*/incubator-geronimo/modules/core/src/schema/geronimo-ejb-jar.xsd XML Schema of geronimo-ejb-jar.xml]) * '''META-INF/ejb-jar.xml''' They have a very similar XML structure, so creating a corresponding geronimo-ejb-jar.xml boils down to do the following steps: - 1. copy ejb-jar.xml as geronimo-ejb-jar.xml - 1. Add Geronimo-specific ClassSpace tag to geronimo-ejb-jar.xml, thus the ejb-jar tag changes to: + * copy ejb-jar.xml as geronimo-ejb-jar.xml + * Add Geronimo-specific ClassSpace tag to geronimo-ejb-jar.xml, thus the ejb-jar tag changes to: + {{{<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:g="http://geronimo.apache.org/xml/schema/j2ee"> + <g:class-space name="geronimo.system:role=ClassSpace,name=System"/>}}} + + * <entity>'s needs appropriate <g:datasource-name>'s, otherwise Geronimo emits the message: + {{{ + [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. - {{{<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:ger="http://geronimo.apache.org/xml/schema/j2ee"> - <ger:class-space name="geronimo.system:role=ClassSpace,name=System"/>}}} NOTE: You can find a sample EJB at [http://www.openejb.org/hello-world.html OpenEJB Hello World!] page.