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: HOWTO OpenEJB and HSqlDB
Date Sun, 03 Dec 2006 01:01:27 GMT

On Dec 2, 2006, at 3:47 PM, David Blevins wrote:

>
> On Dec 2, 2006, at 2:57 PM, David Blevins wrote:
>
>> Hi Per, the data you've posted helps quite a bit.  I think I have  
>> your answer....
>>
>> On Dec 2, 2006, at 12:55 AM, Per Newgro wrote:
>>
>>> I get the following exception
>>> javax.naming.NameNotFoundException: Name "java:/APPLDB" not found.
>>>         at
>>> org.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:184)
>>>         at org.openejb.core.ivm.naming.IvmContext.lookup 
>>> (IvmContext.java:147)
>>>         at javax.naming.InitialContext.lookup(InitialContext.java: 
>>> 351)
>>>
>>> if i do the following:
>>> DataSource db = (DataSource) myInitialContext.lookup("java:/ 
>>> APPLDB");
>
> Just a note on what I mention in my previous email below.  The  
> reason "java:/APPLDB" works in JBoss is they are letting you lookup  
> a datasource you haven't declared a reference to in your ejb- 
> jar.xml.  This is completely against the spec and results in non- 
> portable apps.  I will note you can do this OpenEJB too -- we're  
> not the kind to tell you what you can and can't do.  The name you  
> use to lookup a non-declared datasource is:
>
>  new InitialContext().lookup("java:openejb/connector/Default JDBC  
> Database");
>

Looks like I'm getting 1.x and 3.x confused.  This was added in 3.x  
but not in 1.x.  The tree exists in 1.x, but we didn't allow it to be  
exposed to beans till 3.x.

-David





Mime
View raw message