Re: Tomcat vs Weblogic JNDI Lookup

2008-09-07 Thread Luther Baker
The * was just a wildcard for the example. Fill it in with whatever you
like. Let's say we have a datasource named "appds"

So code deployed to WEBLOGIC can do this:

context.lookup("appds");

While code deployed to TOMCAT must do this:

context.lookup("java:comp/env/jdbc/appds");

That is my problem and I can't 'adjust' the way they are build in Weblogic.
I believe, the Weblogic admin is simply going to the web admin console for
Weblogic and simply creating a datasource connection and giving it a simple
name.

Whereas, if I declare this datasource in tomcat's server.xml ... context tag
... the deployed code always needs to preprend the lookup name with
"java:comp/env".

I'd like one Spring config file or Source code file that "did the right
thing" depending on whether or not it was deployed to Tomcat or Weblogic ...

Hope that makes sense.

-Luther



On Sat, Sep 6, 2008 at 4:41 PM, Martin Gainty <[EMAIL PROTECTED]> wrote:

>
> if you use a JNDI lookup with a declared namespace such as
> xmlns:jee="http://www.springframework.org/schema/jee";
>
> more specifically in the case of spring
> http://www.springframework.org/schema/jee/spring-jee.xsd
>
> where jndi-name is declared to be
> 
> 
> The JNDI name to look up.
> 
> 
>
> which can then reference a specific jdbc resource supplying provided
> jndi-name of jpetstore-order such as
>   jndi-name="java:comp/env/jdbc/jpetstore-order"/>
>
> I dont know what specific resource you are trying to locate with wildcard
> nulls
> we might be able to help out better if you could explain your specific
> testcase
> HTH
> Martin
> __
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
> > Date: Sat, 6 Sep 2008 12:22:54 -0500
> > From: [EMAIL PROTECTED]
> > To: users@tomcat.apache.org
> > Subject: Tomcat vs Weblogic JNDI Lookup
> >
> > The Weblogic servers we are using have been configured to allow JNDI
> > datasource names like "appds".
> >
> > For development (localhost), we might be running Tomcat and when declared
> in
> > the  section of server.xml, Tomcat will hang JNDI datasources on
> > "java:comp/env/jdbc/*" in the JNDI tree.
> >
> > *Problem:* in Weblogic, the JNDI lookup is "appds" whilst in Tomcat, it
> > seems that that I must provide the formal "java:comp/env/jdbc/appds". I'm
> > afraid the Tomcat version is an implicit standard but unfortunately, I
> can't
> > change Weblogic's config ... so that means we end up with two different
> > spring config files (we're using spring 2.5) to facilitate the different
> > environments.
> > Is there an elegant way to address this. Can I look JNDI names up
> directly
> > in Tomcat?
>
> _
> See how Windows connects the people, information, and fun that are part of
> your life.
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/


RE: Tomcat vs Weblogic JNDI Lookup

2008-09-06 Thread Martin Gainty

if you use a JNDI lookup with a declared namespace such as
xmlns:jee="http://www.springframework.org/schema/jee";

more specifically in the case of spring
http://www.springframework.org/schema/jee/spring-jee.xsd

where jndi-name is declared to be


The JNDI name to look up.



which can then reference a specific jdbc resource supplying provided jndi-name 
of jpetstore-order such as
  

I dont know what specific resource you are trying to locate with wildcard nulls
we might be able to help out better if you could explain your specific testcase
HTH
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Sat, 6 Sep 2008 12:22:54 -0500
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> Subject: Tomcat vs Weblogic JNDI Lookup
> 
> The Weblogic servers we are using have been configured to allow JNDI
> datasource names like "appds".
> 
> For development (localhost), we might be running Tomcat and when declared in
> the  section of server.xml, Tomcat will hang JNDI datasources on
> "java:comp/env/jdbc/*" in the JNDI tree.
> 
> *Problem:* in Weblogic, the JNDI lookup is "appds" whilst in Tomcat, it
> seems that that I must provide the formal "java:comp/env/jdbc/appds". I'm
> afraid the Tomcat version is an implicit standard but unfortunately, I can't
> change Weblogic's config ... so that means we end up with two different
> spring config files (we're using spring 2.5) to facilitate the different
> environments.
> Is there an elegant way to address this. Can I look JNDI names up directly
> in Tomcat?

_
See how Windows connects the people, information, and fun that are part of your 
life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/

Tomcat vs Weblogic JNDI Lookup

2008-09-06 Thread Luther Baker
The Weblogic servers we are using have been configured to allow JNDI
datasource names like "appds".

For development (localhost), we might be running Tomcat and when declared in
the  section of server.xml, Tomcat will hang JNDI datasources on
"java:comp/env/jdbc/*" in the JNDI tree.

*Problem:* in Weblogic, the JNDI lookup is "appds" whilst in Tomcat, it
seems that that I must provide the formal "java:comp/env/jdbc/appds". I'm
afraid the Tomcat version is an implicit standard but unfortunately, I can't
change Weblogic's config ... so that means we end up with two different
spring config files (we're using spring 2.5) to facilitate the different
environments.
Is there an elegant way to address this. Can I look JNDI names up directly
in Tomcat?