Hi all,

I'm using Tomcat 5.5 with JNDI DataSources. It works with no problem.

Now, I want to setup Josso single sign on system (www.josso.org) and force it to use JNDI DataSources as well. With no luck.

Problem lies (I suppose), that josso system is not only a webapp, but also a Tomcat's Valve and Realm. If one want to expose JNDI resource to a webapp he needs to use ResourceLink in context.xml and resource-ref in web.xml. How can I expose such JNDI resource to Valve and Realm?

Josso code simply calls

InitialContext ic = new InitialContext();
_datasource = (DataSource) ic.lookup( _dsJndiName );

to obtain reference.

I have tried to use jdbc/db (that's my resource name defined in global resources in server.xml), java:jdbc/db or java:comp/env/jdbc/db with no luck. The same error message "Error During Lookup Name jdbc is not bound in this Context" every time.

So - is there any 'special' way to obtain reference to JNDI resources from within a Realm?

--
Mikolaj Rydzewski <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to