Re: Access to JNDI Resources by java code

2007-04-04 Thread Andrea Zoppello
Ok Guillaume, The following code is working: EndpointComponentContext aContext = (EndpointComponentContext)getContext(); InitialContext jndiContext = aContext.getNamingContext(); DataSource ds = (DataSource)jndiContext.lookup("java:comp/env/jdbc/metadb"); My problems were due to the fact that i

Re: Access to JNDI Resources by java code

2007-04-04 Thread Thomas TERMIN
I've corrected this. :-) Thomas TERMIN wrote: > What you mean is that: > > getContext().getNamingContext() > > should work and is also the better way if it is inside of a component. > > I read the mail to fast I guess. > > What also works inside the same vm is just: new InitialContext() > > C

Re: Access to JNDI Resources by java code

2007-04-04 Thread Thomas TERMIN
What you mean is that: getContext().getNamingContext() should work and is also the better way if it is inside of a component. I read the mail to fast I guess. What also works inside the same vm is just: new InitialContext() Cheers, Thomas Guillaume Nodet wrote: > I don't really see why one ha

Re: Access to JNDI Resources by java code

2007-04-04 Thread Guillaume Nodet
I don't really see why one has to specify these properties, at least when inside ServiceMix standalone, or when using the InitialContext retreived from the ComponentContext. Any idea ? On 4/4/07, Thomas TERMIN <[EMAIL PROTECTED]> wrote: Andrea Zoppello wrote: > Hi to all > > I'm asking if there