|
| Home > Apache Geronimo v3.0 > Documentation > Migrating to Apache Geronimo > Migrating from G 2.x to G 3.x |
CE 3.0 provides backward compatibility to Java EE 5 compliant applications. If you have applications running on Geronimo 2.x successfully, you can easily port them to Geronimo 3.0. However, there are a few updates you need to consider as followed.
To initialize a database using deployment plan file, org.apache.geronimo.connector.DatabaseInitializationGBean in 2.X should be changed to org.apache.geronimo.connector.wrapper.DatabaseInitializationGBean.
There are following changes regarding Java Mail configuration in Geronimo 3.0.
<attribute name="jndiName">mail/PlantsByWebSphere</attribute>
should be changed to
<attribute name="jndiName">ger:mail/PlantsByWebSphere</attribute>
The following table lists the changes of some components name from Geronimo 2.x to 3.0.
| groupId | In 2.X | In 3.0 |
|---|---|---|
| org.apache.geronimo.configs | client-transaction | client-transaction-1_6 |
| org.apache.geronimo.configs | connector-deployer | connector-deployer-1_6 |
In Servlet 3.0, an annotation @MultiPartConfig has been introduced to indicate that the servlet expects request of type multipart. You need to enable the feature in your deployment plan file as followed:
...
<context allowCasualMultipartParsing="true"></context>
...
In Geronimo 3.0, resources are imported and exported using different elements in deployment plan.
If your EJB application is a standalone module, you need to export its package in the deployment plan file under name space of http://geronimo.apache.org/xml/ns/deployment-1.2. For example:
... <dep:export-package>ejb.stateful</dep:export-package> ...
While for any modules which call the deployed EJB, you need to import the EJB package in the deployment plan using the same name space. For example:
... <dep:import-package>ejb.stateful</dep:import-package> ...
If your web application refers to a standalone EJB module, you need to specify the artifact id of the EJB module in the deployment plan file of you web application. For example:
...
<nam:ejb-ref>
<nam:ref-name>ejb/CustomerHome</nam:ref-name>
<nam:pattern>
<nam:groupId>wasce-samples</nam:groupId>
<!--specific 3.0.0.0 standalone ejb configuration: ejb jar file name-->
<nam:artifactId>mdb-ejb-3.0.0.0.jar</nam:artifactId>
<nam:name>CustomerEJB</nam:name>
</nam:pattern>
</nam:ejb-ref>
If an EAR application contains an application client module, an EJB module and web application module. If the application client refers to one of ejb interfaces using following code:
@EJB private static TradeSLSBRemote tradeSLSBRemote;
Although the ejb.jar is defined in its class-path using manifest.mf file, the EJB interface is not in its class path. You need to package the ejb module into the EAR using the following structure:
my-ear-3.0.0.0/lib/ejbinterface.jar
If you want to use shared libraries, make sure you specifies the value of baseDir attribute for gbean reference class. See Using shared libraries in your applications for more details.
<gbean name="SharedLib" class="org.apache.geronimo.system.sharedlib.SharedLib"> <attribute name="baseDir">var/shared</attribute> <attribute name="classesDirs">classes</attribute> <attribute name="libDirs">lib</attribute> <reference name="ServerInfo"> <name>ServerInfo</name> </reference> </gbean>
|
|
Privacy Policy - Copyright © 2003-2013, The Apache Software Foundation, Licensed under ASL 2.0. |