|
Ola Pessoal!
Estou tendo um probleminha quando tento acessar
objetos remotos.
Um do objetos retorna um objeto remoto e
outro um objeto local.
Eu utilizo o Resin EJB 2.1.0.
Segue abaixo o descritor:
web.xml (Client Application) ===================================================================== ... <jndi-link> <jndi-name>java:comp/env/ejb</jndi-name> <jndi-factory>com.caucho.burlap.BurlapContextFactory</jndi-factory> <init-param java.naming.provider.url="http://localhost/burlap"/> </jndi-link> ... test.jsp (Test file) ===================================================================== ... Context ctx = (Context) new InitialContext().lookup("java:comp/env/ejb"); GroupRemoteHome ghome = (GroupRemoteHome) ctx.lookup("GroupRemote"); GroupRemote group = ghome.create(); UserRemoteHome uhome = (UserRemoteHome) ctx.lookup("UserRemote"); UserRemote user = uhome.create(); ... <%= "GroupHome = " + ghome + "<br>" %> <%= "Group = " + group + "<br>" %> <%= "UserHome = " + uhome + "<br>" %> <%= "User = " + user + "<br>" %> Sa�da =====================================================================
GroupHome = _ejb.package.GroupRemoteHome__BurlapStub@3fc4fc Group = _ejb.package.GroupRemote__BurlapStub@20864f UserHome = package.UserRemoteHome__JVMProxy@707355 User = null Se eu mudar as linhas do c�digo para: UserRemoteHome uhome =
(UserRemoteHome)
ctx.lookup("UserRemote");
UserRemote user = uhome.create(); GroupRemoteHome ghome =
(GroupRemoteHome)
ctx.lookup("GroupRemote");
GroupRemote group = ghome.create(); e reiniciar o Resin o objeto User
retorna correto e o objeto Group retorna null!
algu�m tem como me ajudar?
agrade�o colabora��o!
Maykel. |
