users@glassfish.java.net

Re: cannot access the output of ServiceTracker.getServices when services are exposed with EXPORT-EJB‏

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Thu, 30 Jun 2011 12:53:42 +0530

Hi,

TransactionRolledbackLocalException is a very special category of
exception. I don't expect that to be thrown if the underlying EJB has
been undeployed. Can you send us server.log? That should probably tell
us what's going on. More over, please tell a bit more about the business
method you are invoking. Is it using container managed transaction or
bean managed transaction? If former is the case, are you starting
transaction before calling the business method?

Thanks,
Sahoo
On Thursday 30 June 2011 12:24 PM, forums_at_java.net wrote:
> Hi
> (Environment details: I use Glassfish 3.1, GA build)
> I use EXPORT-EJB: ALL to export 3 beans. In another bundle I get these
> services using ServiceTracker.getServices API.
> The problem is that many times I get an exception if I invoke a method
> on the
> object returned from getService():
> [#|2011-06-29T15:55:47.105+0300|WARNING|glassfish3.1|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=149;_ThreadName=Thread-1;|A
>
> system exception occurred during an invocation on EJB DemoService method
> public java.lang.String com.demo.bl.DemoService.getID()
> javax.ejb.TransactionRolledbackLocalException: Client's transaction
> aborted
> at
> com.sun.ejb.containers.BaseContainer.useClientTx(BaseContainer.java:4700)
> at
> com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:4578)
> at
> com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1910)
> at
> com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
>
> at
> com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
>
> at $Proxy319.getID(Unknown Source)
> Looks like a service tracker contains a reference to EJB that was already
> destroyed.
> If instead of exposing EJB I register OSGI service, I don't get this
> exception
> It it a known bug?
> thank you
>
>
> --
>
> [Message sent by forum member 'okna2000']
>
> View Post: http://forums.java.net/node/817118
>
>