Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

EJB stub cache-ing

0 views
Skip to first unread message

clyde

unread,
May 16, 2002, 10:52:30 AM5/16/02
to

Genrally speaking, is it acceptable to cache an EJB stub to a Stateless Session EJB
on the client side?

Does it make a difference if the client is a Servlet or another application component
(i.e. another EJB)?

I'm considering doing this for performance reasons (to eliminate redundant JNDI lookups
and EJB reference creation). Is this a valid reason? Will it actually improve my
performance, or am I barking up the wrong tree?

Thanks in advance.

Dimitri I. Rakitine

unread,
May 16, 2002, 2:28:47 PM5/16/02
to
Yup, you can cache SLSB references - they are thread-safe cluster-aware etc.

clyde <cdu...@nospam.com> wrote:

> Thanks in advance.

--
Dimitri

Tommi Reiman

unread,
May 23, 2002, 2:34:15 AM5/23/02
to
"Dimitri I. Rakitine" <d...@dima.dhs.org> wrote in message
news:3ce3...@newsgroups2.bea.com...

> Yup, you can cache SLSB references - they are thread-safe cluster-aware
etc.

You get into trouble with classloaders & deployments - cache doens't know
when EJB Classloader reloads the classes -> stubs are out of sync with the
newly loaded classes and you get weblogic.utils.AssertionError. I guess
there are also problems with modifying the cluster setup - cached stubs
don't see the changes.

Tommi

calling get() on out-of-sync stub:

weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ must initialize
before invoke ]
at weblogic.utils.Debug.assert(Debug.java:84)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:209)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy81.get(Unknown Source)
at jsp_servlet._index2._jspService(_index2.java:102)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:263)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2390)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1959)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.rmi.extensions.RemoteRuntimeException - with nested exception:
[weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ must
initialize before invoke ]]
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:60)
at $Proxy81.get(Unknown Source)
at jsp_servlet._index2._jspService(_index2.java:102)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:263)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2390)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1959)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)


0 new messages