I was finally able to get a connection using some different properties.  Here's 
the jndi.propperties I am now using:

anonymous wrote : 
java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
  | java.naming.provider.url=http://localhost:8080/invoker/JNDIFactory
  | java.naming.factory.url.=org.jboss.naming.client


Now, I'm getting: 
anonymous wrote : javax.naming.NameNotFoundException: OracleDS not bound

even though the log during jboss startup says that it's bound:
anonymous wrote : 11:33:47,819 INFO  [ConnectionFactoryBindingService] Bound 
ConnectionManager 'jboss.jca:service=DataSourceBinding,name=OracleDS' to JNDI 
name 'java:OracleDS'

Plus, i have no problems when running the actual web application.  It's only 
during integration tests where I'm outside the JBoss JVM that I am having this 
problem.  So, I know the data source is bound and can be used without problems.

Here's the code getting the DS:
anonymous wrote : InitialContext initialContext = new InitialContext();
  |         javax.sql.DataSource ds = (javax.sql.DataSource) 
initialContext.lookup("java:OracleDS");
  |         Connection connection = ds.getConnection();


Ideas?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968139#3968139

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968139
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to