-
1. Re: Migration of EJB 2.1 from WebSphere to JBoss 5.1
wdfink Feb 27, 2012 1:54 AM (in response to chaatna)The behaviour will be different if you change the application server, expecialy if you use EJB2 and CMP
The ejb-jar.xml should be the same. You can add the jboss.xml to you application and deploy it on both because the container specific xml will be ignored.
The Java code is usable for both.
-
2. Re: Migration of EJB 2.1 from WebSphere to JBoss 5.1
chaatna Feb 27, 2012 12:50 PM (in response to wdfink)Hi wolf-dieter Fink,
Thanks for your reply.
So I can use ejb-jar.xml as it is from Websphere.
Could you let me know whether "jboss.xml" and "jbosscmp-jdbc.xml"is mandatory? if yes, which contents have to be in those files and how it differs. I have two files named "ibm-ejb-jar-bnd.xmi" and "ibm-ejb-jar-ext.xml". I think "jboss.xml" and "jbosscmp-jdbc.xmk" replaces those two files.
Could you clarify me in detail?
Thanks in advance.
Regards,
Chaatna
-
3. Re: Migration of EJB 2.1 from WebSphere to JBoss 5.1
wdfink Feb 27, 2012 1:52 PM (in response to chaatna)With EJB2 you need such files here a short example. See JBoss tutorials and dtd/schema.
==== jboss.xml ====
<jboss>
<enterprise-beans>
<entity>
<ejb-name>MyEntity</ejb-name>
<local-jndi-name>ejb21/MyEntity</local-jndi-name>
<configuration-name>Standard CMP EntityBean</configuration-name> <!-- optional -->
</entity>
<session>
<ejb-name>MySession</ejb-name><jndi-name>ejb21/MySession</jndi-name>
<clustered>true</clustered>
<method-attributes></method-attributes>
</session>
</enterprise-beans>
</jboss>
===== jbosscmp-jdbc.xml (only if you have entities in your applcation) ======
<jbosscmp-jdbc>
<defaults>
<create-table>true</create-table>
<alter-table>true</alter-table>
<remove-table>false</remove-table>
</defaults>
<enterprise-beans>
<entity>
<ejb-name>MyEntity</ejb-name>
<table-name>Entity_TBL</table-name>
<cmp-field>
<field-name>Id</field-name>
<not-null/>
</cmp-field>
<cmp-field>
<field-name>text</field-name>
<not-null/>
</cmp-field>
</entity>
<relationships>
</relationships>
<entity-commands>
</entity-commands>
</jbosscmp-jdbc>
-
4. Re: Migration of EJB 2.1 from WebSphere to JBoss 5.1
chaatna Feb 27, 2012 6:26 PM (in response to wdfink)Hi wolf-dieter,
I have only MDBs and JMS. So no need of "jbosscmp-jdbc.xml".
I have configuration in "ejb-jar.xml" as follows:
<
I have configured the corresponding one in "jboss.xml" as follows:
<?
<!
<
</
</jboss>Is it correct or Do I need to add any more configuration related to "ejb-jar.xml" configuration?
Please help me.
Thanks,
Chaatna
-
5. Re: Migration of EJB 2.1 from WebSphere to JBoss 5.1
chaatna Feb 28, 2012 4:05 PM (in response to chaatna)Hi,
I have one more issue. I have a code dependency as follows:
Our EJB code depends on businessCode. We are preparing WAR file with the business code. Again we have some EJB listeners in webProject which inturn depends on EJB project. Finally we are preparing ear with the combination of WebProject and EJbProject.
Now we are getting the following exception:
11:44:36,363 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/C:/JBoss51/jboss-eap-5.1/jboss-as/server/DEV_server0/deploy/test-app-1.0-SNAPSHOT.ear/ state=PreParse mode=Manual requiredState=Parse
org.jboss.deployers.spi.DeploymentException
: Error creating managed object for vfszip:/C:/JBoss51/jboss-eap-5.1/jboss-as/server/DEV_server0/deploy/test-app-1.0-SNAPSHOT.ear/lib/common.jar/spring-hibernate.xml
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(
DeploymentException.java:49
)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(
AbstractParsingDeployerWithOutput.java:362
)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(
AbstractParsingDeployerWithOutput.java:322
)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(
AbstractParsingDeployerWithOutput.java:294
)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(
AbstractParsingDeployerWithOutput.java:234
)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(
DeployerWrapper.java:179
)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(
DeployersImpl.java:1454
)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(
DeployersImpl.java:1172
)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(
DeployersImpl.java:1225
)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(
DeployersImpl.java:1225
)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(
DeployersImpl.java:1113
)
at org.jboss.dependency.plugins.AbstractControllerContext.install(
AbstractControllerContext.java:348
)
at org.jboss.dependency.plugins.AbstractController.install(
AbstractController.java:1652
)
at org.jboss.dependency.plugins.AbstractController.incrementState(
AbstractController.java:938
)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(
AbstractController.java:1082
)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(
AbstractController.java:988
)
at org.jboss.dependency.plugins.AbstractController.change(
AbstractController.java:826
)
at org.jboss.dependency.plugins.AbstractController.change(
AbstractController.java:556
)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(
DeployersImpl.java:789
)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(
MainDeployerImpl.java:699
)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(
MainDeployerAdapter.java:117
)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(
ProfileDeployAction.java:70
)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(
AbstractProfileAction.java:53
)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(
AbstractProfileService.java:403
)
at org.jboss.dependency.plugins.AbstractControllerContext.install(
AbstractControllerContext.java:348
)
at org.jboss.dependency.plugins.AbstractController.install(
AbstractController.java:1652
)
at org.jboss.dependency.plugins.AbstractController.incrementState(
AbstractController.java:938
)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(
AbstractController.java:1082
)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(
AbstractController.java:988
)
at org.jboss.dependency.plugins.AbstractController.install(
AbstractController.java:778
)
at org.jboss.dependency.plugins.AbstractController.install(
AbstractController.java:543
)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(
AbstractProfileService.java:308
)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(
ProfileServiceBootstrap.java:256
)
at org.jboss.bootstrap.AbstractServerImpl.start(
AbstractServerImpl.java:461
)
at org.jboss.Main.boot(
Main.java:221
)
at org.jboss.Main$1.run(
Main.java:556
)
at java.lang.Thread.run(
Thread.java:619
)
Caused by:
java.lang.ClassCastException
at java.lang.Class.cast(
Class.java:2990)
at org.jboss.xb.util.JBossXBHelper.parse(
JBossXBHelper.java:194
)
at org.jboss.xb.util.JBossXBHelper.parse(
JBossXBHelper.java:166
)
at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(
SchemaResolverDeployer.java:137
)
at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(
SchemaResolverDeployer.java:121
)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(
AbstractVFSParsingDeployer.java:304
)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(
AbstractVFSParsingDeployer.java:269
)
at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(
AbstractParsingDeployerWithOutput.java:355
)
... 35 more
Please suggest me two things 1) whether jboss.xml configuration is right 2) whether project code dependency is right or wrong. if wrong please suggest me.
Thanks inadvance.
Regards,
Chaatna