[jboss-user] [Beginners Corner] - JNDI, JDBC & Simple Application
AlexKomlev
do-not-reply at jboss.com
Tue Apr 17 15:12:08 EDT 2007
Help me, please.
I put this code in Servlet:
InitialContext jndiContext = new InitialContext();
| Object obj = jndiContext.lookup("java:PostgresDS");
| DataSource ds = (DataSource) PortableRemoteObject.narrow(obj, DataSource.class);
| ...
|
and its work correctly. But then I put this code in application, Eclipse write:
javax.naming.NameNotFoundException: (PostgresDS not bound ...
In what difference? Why it not work in application?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038116#4038116
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038116
More information about the jboss-user
mailing list