tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincenzo D'Aniello <>
Subject Refer to the local interface from a remote interface proxy
Date Fri, 14 Apr 2017 10:32:41 GMT
Hi all, a question I hope not stupid!

If I have a remote reference to a stateful bean, as I can refer to the same
instance, but to the local ??

To better speak, a stateful bean is declared as:

  Bean class implements BeanRemote {...}

  inteface BeanRemote{...}

Now, for example, in a class of the same application also it resides where
the local interface, I call the remote interface with a 'lookup'

  BeanRemote remoteBean = new InitialContex (prop) .lookup
(BeanRemote.class.getSimpleName ());

as I do now to refer to the same instance of the bean but local ??

  Bean localBean = ??????

Or, starting from the local interface, how can I refer to the remote
instance of the same ??

  Bean remoteBean = new InitialContex (prop) .lookup
(Bean.class.getSimpleName ());
  BeanRemote remoteBean = ??


View this message in context:
Sent from the TomEE Users mailing list archive at

View raw message