-
1. Re: Two issues found during test EJB2.x and 3 against 5.0 GA
thunder.farmer Sep 10, 2010 2:23 AM (in response to thunder.farmer)list the key piece of code and config for your convenience,
ejb-jar.xml
<ejb-jar>
<enterprise-beans><session><ejb-name>JBossMTBeanName</ejb-name><mapped-name>JBossMTBeanMappedName</mapped-name><local-home>thunder.jbossmt.ejb.JBossMTBeanEJB2LocalHome</local-home><local>thunder.jbossmt.ejb.JBossMTBeanEJB2Local</local><business-local>thunder.jbossmt.ejb.JBossMTBeanLocal</business-local><business-remote>thunder.jbossmt.ejb.JBossMTBeanRemote</business-remote><ejb-class>thunder.jbossmt.ejb.JBossMTBean</ejb-class><session-type>Stateless</session-type><transaction-type>Container</transaction-type></session></enterprise-beans><assembly-descriptor><container-transaction><method><ejb-name>JBossMTBeanName</ejb-name><method-name>*</method-name></method><trans-attribute>Required</trans-attribute></container-transaction></assembly-descriptor></ejb-jar><enterprise-beans>
<session>
<ejb-name>JBossMTBeanName</ejb-name>
<mapped-name>JBossMTBeanMappedName</mapped-name>
<local-home>thunder.jbossmt.ejb.JBossMTBeanEJB2LocalHome</local-home>
<local>thunder.jbossmt.ejb.JBossMTBeanEJB2Local</local>
<business-local>thunder.jbossmt.ejb.JBossMTBeanLocal</business-local>
<business-remote>thunder.jbossmt.ejb.JBossMTBeanRemote</business-remote>
<ejb-class>thunder.jbossmt.ejb.JBossMTBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>JBossMTBeanName</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
jboss.xml
<jboss>
<enterprise-beans>
<session>
<ejb-name>JBossMTBeanName</ejb-name>
<home-jndi-name>Thunder.HomeJndiName</home-jndi-name>
<local-jndi-name>Thunder.LocalJndiName</local-jndi-name>
<configuration-name>JBossMTBeanConfigName</configuration-name>
<method-attributes>
<method>
<method-name>*</method-name>
<transaction-timeout>120</transaction-timeout>
</method>
</method-attributes>
</session>
</enterprise-beans>
<container-configurations>
<container-configuration extends="Standard Stateless SessionBean">
<container-name>JBossMTBeanConfigName</container-name>
<container-pool-conf>
<MaximumSize>20</MaximumSize>
</container-pool-conf>
</container-configuration>
</container-configurations>
</jboss>
-
2. Re: Two issues found during test EJB2.x and 3 against 5.0 GA
jaikiran Sep 10, 2010 4:05 AM (in response to thunder.farmer)Thunder Lei wrote:
I try to develop a stateless session bean, in which EJB2.x and EJB3 interfaces coexist.
In short, it works, but with two issues.
1. unable to override 2.x local home jndi name.
In jboss.xml (jboss_5_0.dtd), the local home jndi is NOT allowed, so you have to refer to the default local home jndi -- beanName/local
You should be using the jboss_5_0 xsd:
<jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd" version="5.0"> ... </jboss>
-
3. Re: Two issues found during test EJB2.x and 3 against 5.0 GA
thunder.farmer Sep 11, 2010 8:41 AM (in response to jaikiran)
Hi jaikiran pai,The xsd does work for me.
Thanks millions!
For the second issue:
2. when calling method on remote business interface, it works, but EJB exception is thrown by javax.ejb.EJBLocalObject.isIdentical.
It's known as JBPAPP-3750 . We need to wait for the fix.
Regards,
Thunder