tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Bind Datasource to specific jndi name
Date Tue, 16 Sep 2008 20:38:48 GMT

On Sep 16, 2008, at 3:42 AM, Andreas Karalus wrote:

>
> Hi David,
>
> thank you for your hint, I tried this, but still got exception:
> In the code for intialisation of openejb:
>
> initialContext.bind("java:operativDS", new
> javax.naming.LinkRef("java:openejb/Resource/operativDS"));
>
>
> In the test Code:
> // this is ok
> DataSource operativDS = (DataSource)
> initialContext.lookup("java:openejb/operativDS");
>
> // this one fails, but this is the lookup I need
> DataSource operativDS = (DataSource)
> initialContext.lookup("java:/operativDS");
>
>
> So is there a possibility to bind directly to java: and not to  
> java:openejb?
> It seems to me like java:openejb is kind of hardcoded?

Right, internally we depend on things being at a known place  
(java:openejb).  We could bind things to additional places but we will  
still need to maintain the java:openejb namespace. The use of LinkRef  
should allow you to have all the extra JNDI names you need, we just  
need to figure out what might be happening.

Is it possible you can post the complete initialization stacktrace as  
long as some sample code that shows how you are constructing the  
InitialContext you are using to do the binding/lookup?

-David




Mime
View raw message