Hi, Rickard
I really appreciated that you've jumped into this
this thread, because I think you are the right
person who can clear up this.
>
> If that is not the case, i.e. you just want to find "a" bean in JNDI,
> and work on it through reflection, then you never need to know what
> interface is used, because you never reference it in code.
>
> E.g.:
> Object home = new InitialContext().lookup("somebean"); // Get bean
> Method create = home.getClass().getMethod("create", new Class[0]); //
> Get create() method
> Object bean = create.invoke(home, new Object[0]); // Invoke create
> method
> // At this point you may have some generic interface that you know that
> the bean implements
> FooBean foo = (FooBean)bean;
> foo.someMethod();
Ok, I'm doing that (thanks for your advice two months ago).
And it works great in case when NamingService and Jboss are
in the same VM. But when I tried to attach a second jboss
to the same NamingService (I described that a few weeks ago
in the list) a client was unable to lookup a bean from the
second server unless the client had Home interface.
for this bean. lookup throws an CNF Exception for the bean
Home interface.
I don't completely understand why it so and if you can explain
it (or suggest a sort of workaround) it will be great.
Thanks in advance.
--
__________________________________________________
Alexander Kogan PTC www.ptc.com
[EMAIL PROTECTED] 140 Kendrick St. Needham MA 02494
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]