Hi, All
I have some questions about the implementation of EJB container.
I have a Stateless bean in EJB2.x style which has a remote business
method like:
-----------------------------------------------------
public String sayHi() {
Thread.dumpStack();
return "Foo";
}
-----------------------------------------------------
I call the EJB from a standalone client, the output of the
Thread.dumpStack(); is:
------------------------------------------------
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1158)
at ejb.demo.helloworld2.HelloWorldBean.sayHi(HelloWorldBean.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1051)
at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2812)
at
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3896)
at
com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
at
com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:107)
at $Proxy88.sayHi(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Unknown Source)
at
com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(Unknown
Source)
at
com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(Unknown
Source)
at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(Unknown
Source)
at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown
Source)
at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(Unknown
Source)
at
com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(Unknown
Source)
at
com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown
Source)
at
com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(Unknown
Source)
at
com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(Unknown
Source)
at
com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown
Source)
------------------------------------------------
In the stack trace, I found class Proxy88 is called. However I cannot
find the code which generate Proxy88.
I've read some codes in the package com.sun.ejb.codegen.
According to my understanding, I assume that the WrapperGenerator will
help generate the EJB Object implementation(XXXX_EJBObjectImpl), and
this remote object will delegate the method to bean object itself.
However I cannot find where the WrapperGenerator is used.
I found the input parameters for the rmic are the Remote and Remote Home
interface, which can generate the stub classes. Where can I find the tie
classes?
Coud you give some suggestions or documents on the EJB code generation?
Thanks & Best Regards,
Jason