xx>>>>> "David" == David M Karr <[EMAIL PROTECTED]> writes:
>>>>> "Nguyen" == Nguyen Thanh Phong <[EMAIL PROTECTED]> writes:
Nguyen> If you deploy your beans and EJBUtils separately (i.e. they are not in the
Nguyen> same jar file), you cannot use ejb-link in your ejb-jar.xml. Instead, you
Nguyen> have to put the JNDI of the ejb-ref in the jboss.xml. For example:
Nguyen> <enterprise-beans>
Nguyen> <entity>
Nguyen> <ejb-name>UserBean</ejb-name>
Nguyen> <jndi-name>[JNDI of UserBean]</jndi-name>
Nguyen> <configuration-name>Standard CMP EntityBean</configuration-name>
Nguyen> <ejb-ref>
Nguyen> <ejb-ref-name>ejb/UIDHighKeyGenerator</ejb-ref-name>
Nguyen> <jndi-name>[JNDI of UIDHighKeyGenerator]</jndi-name>
Nguyen> </ejb-ref>
Nguyen> </entity>
Oh, and the other variation I tried was to have no reference to
UIDHighKeyGenerator in either my ejb-jar.xml or jboss.xml.
When I do this, it deploys without error. However, when I reference the bean
method, I get the following:
-----------------
[UIDHighKeyGenerator] Application error: BMT stateless bean UIDHighKeyGenerator should
complete transactions before returning (ejb1.1 spec, 11.6.1)
[UserBean] CONTAINER EXCEPTION:No transaction.
[UserBean] java.lang.IllegalStateException: No transaction.
[UserBean] at org.jboss.tm.TransactionImpl.setRollbackOnly(TransactionImpl.
-----------------
I had noticed the code did not "commit()" the connection before returning. I
tried adding that commit (after verifying it really gets to the "return" by
adding print statements), but it no effect. I still get the "should complete
transactions" exception.
--
===================================================================
David M. Karr ; Best Consulting
[EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user