Re: Shouldn't JNDIRegister lookup work as JDBCWorkflowStore?

"Hani Suleiman" <[email protected]> Sun, 29 Feb 2004 23:13:49 -0500 (EST)
Newsgroups gmane.comp.java.open-symphony.devel
Message-ID <[email protected]>
No, because any decent container supports a global JNDI registry, so you
do NOT always want java:comp/env prepended. You could just specify a
'fully qualified' location (ie, with the comp:env prefix) in the location
attribute, if you're sure that that's what you want.

Hernani Mourão said:
> Hi all,
>
> I was stuck to get the resource ref to a Register under Tomcat 5. When I
> compared with JDBCWorkflowStore I realized that the lookup that worked was
> the second one:
>             try {
>                 return context.lookup(location);
>             } catch (NamingException e) {
>                 //ok, couldn't find it, look in env
>                 return context.lookup("java:comp/env/" + location); ->>
> this
> was working
>             }
>
>
> When I look into Tomcat 5 Documentation it seems that: "All configured
> entries and resources will be placed in the java:comp/env portion of the
> JNDI namespace"
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
>
>
> So I only got JNDIRegister working when I changed the code as
> JDBCWorkflowStore:
>         try {
>
>             try {
>                 return new InitialContext().lookup(location);
>             } catch (NamingException e) {
>                 //ok, couldn't find it, look in env
>                 return new InitialContext().lookup("java:comp/env/" +
> location);
>             }
>         } catch (NamingException e) {
>             String message = "Could not look up JNDI register at: " +
> location;
>             throw new WorkflowException(message, e);
>         }
>
> Should that be a permanent change?
> regards,
> Hernâni
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Opensymphony-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-developers
>
>



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click