Hi all,
I am hitting a database form a LoginModule. I would like to use a
datasource. I don't have any problem configuring the datasource and
accessing it from an app. I have a global resource
<GlobalNamingResources>
...
<Resource driverClassName="com.mysql.jdbc.Driver" maxActive="20"
maxIdle="5" maxWait="5000" name="jdbc/coolNewApp"
password="password" type="javax.sql.DataSource"
url="jdbc:mysql://localhost:3306/coolNewSchema"
username="username" />
...
</GlobalNamingResources>
And I add a <ResourceLink> in the <context> element. All is well in the
app. When I do
Context ctx = new InitialContext();
Object o = ctx.lookup( "java:comp/env/jdbc/coolNewApp" );
in the LoginModule I get an exception.
javax.naming.NameNotFoundException: Name jdbc is not bound in
this Context
Is it possible to use Tomcat's JNDI in a LoginModule, or am I missing
configuration.
Thanks,
John McPeek
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]