[EJB 3.0] New message: "Re: EJB3 Session Bean Container error"
by Juliano Vidal
User development,
A new message was posted in the thread "EJB3 Session Bean Container error":
http://community.jboss.org/message/528207#528207
Author : Juliano Vidal
Profile : http://community.jboss.org/people/julianovidal
Message:
--------------------------------------------------------------
Hey! Thanks for the quick reply!
The error ocurrs when I try to access a Remote SessionBean.
The weird thing is that I actually get the instance when I do the lookup:
public CategoryRemote getCategory() throws CMSException {
Object obj = CMSServiceLocator.getInstance().getObject(CategoryRemote.REMOTE);
return (CategoryRemote) PortableRemoteObject.narrow(obj, CategoryRemote.class);
}
The getObject method is the lookup and I'm doing it the classic way...
InitialContext... blah, blah,blah...
I get the instance... but when I try to call a method from the SessionBean, I get that error.
Thanks in advance for your help!
Regards,
Juliano Vidal
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528207#528207
15 years, 10 months
[JBoss Microcontainer Development] New message: "Re: JBDEPLOY-226 - DeployerClient change extension"
by Adrian Brock
User development,
A new message was posted in the thread "JBDEPLOY-226 - DeployerClient change extension":
http://community.jboss.org/message/528201#528201
Author : Adrian Brock
Profile : http://community.jboss.org/people/adrian@jboss.org
Message:
--------------------------------------------------------------
> alesj wrote:
>
> I see we're on the same page -- this feature is just a nicer API, done width first.
>
> I was just wondering if you're tackling the circular references problem.
> ((ab)using this thread to check up on you )
Nope. But that probably needs resolving (pun intended) in the jboss-dependency project?
Currently a DependencyItem knows what it wants to resolve against and just checks whether it is in the correct state.
If however this leads to a circular dependency, nothing moves.
e.g.
A depends upon B at CLASSLOADER
B depends upon A at CLASSLOADER
For A,
ControllerContext context = controller.getContext(B, CLASSLOADER);
will return null and the same for B with respect to A.
Instead, what is required is some api within the DependencyInfo/Item to say, well actually I will return a context because
the only thing that is stopping them moving is the circular dependency.
Something like:
RequirementDependencyItem extends AbstractDependencyItem
{
public boolean resolve(Controller)
{
Module module = resolveModule();
// Now we know what we want to resolve to
if (module != null)
{
ControllerContext ctx = module.getControllerContext();
putThisDependencyInASemiResolvedStateOnContext(ctx)
boolean resolved = doesTheOtherContextAndItsTransientsHaveCompletelyUnresolvedDependenies(ctx, getDependentState()); // i.e. not resolved at all rather resolved or semi-resolved
// etc.
}
}
}
I can prototype this in the ClassLoading project, but I think it is a general requirement?
NOTE: This feature is only possible for a dependency where the underlying model can handle circular dependencies.
e.g. constructors on pojos can't do it
But the classloading can, since it can lazily wire the classloaders together using the ClassLoaderPolicyFactory on the DelegateLoader.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528201#528201
15 years, 10 months
[EJB 3.0] New message: "Entity Manager with BMT and Transaction Timeout"
by Alexander Hartner
User development,
A new message was posted in the thread "Entity Manager with BMT and Transaction Timeout":
http://community.jboss.org/message/528190#528190
Author : Alexander Hartner
Profile : http://community.jboss.org/people/ejb3workshop
Message:
--------------------------------------------------------------
When running small loads on our application all is working fine, however under heavy concurrent load we consistently get the following exception.
> 2010-02-09 12:40:56,773 FATAL [com.abc.IndexOutputStream.deliverJob] failed to lazily initialize a collection of role: com.abc.entities.ChannelJob.m_jobProperties, no session or session was closed
> org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.abc.entities.ChannelJob.m_jobProperties, no session or session was closed
My suspicious were that the underlying JTA transaction has timed-out and that the entity manager session was closed, so I tried increasing the global transaction timeout from 300 to 3600.
> <!-- JBoss Transactions JTA -->
> <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
> name="jboss:service=TransactionManager">
> <attribute name="TransactionTimeout">*3600*</attribute>
> <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>
> </mbean>
However this did not resolve my problem. Shortly (between 5 to 10 minutes) after starting the transaction the same exception occured again. I am injecting a UserTransaction as well as an EntityManager into a MessageDrivenBean and then manage the transaction myself. I found some posts that suggest in this case I have to join the EntityManager to the JTA transaction using +entityManger.joinTransaction()+ which I wasn't doing up to this point. It seemed to have had a positive impact, but I am still testing if this was really the cause of the problem.
What I am looking for is some clarification on if this is really the case that I have to join the transaction and if I don't join where the timeout for the entity manager is configured. I had a look at the Hibernate documentation, but didn't find any reference to a timeout, other then on the entity cache.
Ideally I would like to resolve this issue by changing my environment rather then the application.
Thanks in advance
Alex
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528190#528190
15 years, 10 months
[EJB 3.0] New message: "EJB3 Session Bean Container error"
by Juliano Vidal
User development,
A new message was posted in the thread "EJB3 Session Bean Container error":
http://community.jboss.org/message/528189#528189
Author : Juliano Vidal
Profile : http://community.jboss.org/people/julianovidal
Message:
--------------------------------------------------------------
Hi all,
I'm moving my application from App 4.2.3.GA to 5.1.0.GA and whern I try to call any of my SessionBeans I get the error:
java.lang.IllegalStateException: Container null is not registered
org.jboss.ejb3.Ejb3Registry.getContainer(Ejb3Registry.java:167)
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:70)
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
$Proxy705.invoke(Unknown Source)
org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:188)
$Proxy704.listByContentId(Unknown Source)
Anyone had the same problem?
Thanks!
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528189#528189
15 years, 10 months