tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincenzo D'Aniello <ict.management.tre...@gmail.com>
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:

  @Stateful
  @LocalBean
  Bean class implements BeanRemote {...}

  @Remote
  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 = ??

Tank!




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Refer-to-the-local-interface-from-a-remote-interface-proxy-tp4681552.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Mime
View raw message