You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Srinath Perera <he...@opensource.lk> on 2004/06/08 11:16:49 UTC
accsess ejb's useing ContianerIndex indside geronimo [continued]
>// Then later...
> String cotnainerIndex = ... // get container index from request
> ContainerIndex index = ContainerIndex.getInstance();
> EJBContainer container = index.getContainer(containerIndex);
> container.invoke(callMethod, args, primKey);
>The part I haven't decided is where you get the ContainerIndex from--I
>don't like the static getInstance method. It's likely ContainerIndex
>will be made a GBean as well and also registered with the kernel, then
>you can get it as an injected dependency or look it up from the kernel
>directly.
Hi David;
We stop this discussion before as we need to wait for the cvs to settle
and put how to find the ContianerIndex to the future.
I tried to accsess the ejb's as follows (see the attachment I use a
servlet) and get following error. Am I doing something wrong.
thanks
Srinath
--- Exception -----
java.lang.IllegalArgumentException: Legacy invoke interface only supports
remote
interfaces: class org.openejb.test.stateless.BasicStatelessBean
at
org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:160)
at SimpleServlet.processContianer(SimpleServlet.java:43)
at SimpleServlet.doGet(SimpleServlet.java:26)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:362
)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:477)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:4
88)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1754)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:565)
at
org.apache.geronimo.jetty.JettyWebApplicationContext.handle(JettyWebA
pplicationContext.java:164)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1706)
at org.mortbay.http.HttpServer.service(HttpServer.java:879)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:817)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:979)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:834)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
212)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:315)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:498)