users@glassfish.java.net

Re: EJB, SOAP, loose coupling and portability?

From: Kristian Rink <lists_at_zimmer428.net>
Date: Fri, 17 Oct 2008 13:16:22 +0200

Hi all;

... guess I've been too fast / impatient:


> [...]
> if (null == service) {
> try {
> InitialContext ic = new InitialContext();
> this.service = (DocumentServiceRemote)
> ic.lookup("java:comp/env/DocumentService");
> logger.log(Level.INFO, "DocumentService found, attached.");
> } catch (NamingException ex) {
> logger.log(Level.SEVERE, "documentService <null>; not
> resolved yet: ", ex);
> }
> }
> [...]

Removing the "java:comp/env/" part in the JNDI name finally allowed for
looking up the bean correctly, and, after that, I just found out that indeed
"null==service" is too vague so I made all my interfaces / beans implement a
"boolean isAlive()" method to check whether the reference still works. So
far it works fine and seems to be pretty much what I want, thanks very much
for kicking me the right direction. :)

Cheers,
Kristian

-- 
Kristian Rink
cell    :  +49 176 2447 2771
business: http://www.planconnect.de
personal: http://pictorial.zimmer428.net
"we command the system. calling all recievers.
we are noisy people for a better living".
(covenant - "monochrome")