EJB on Orion Server..NamingException while finding Datasource.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   neal_ravindran
Posted On:   Sunday, December 1, 2002 07:38 AM

I use MS SQL Server 2000(dev edition..I guess only one connection allowed). And I use the Orion Server. I get the "NamingException" at the statement in the app that is to find the DataSource object. I have the 'datasources.xml' config file set up correctly. I have also a 'resource-env-ref' entry in the 'ejb-jar.xml'. I have NOT edited 'orion-ejb-jar.xml'(meaning it does not say anything about the datasource). In the 'datasources.xml' the relevant entry is : ejb-location="jdbc/SQLServerDS" In 'ejb-jar.xml' the entry is: jdbc/SQLServerDS javax.sql.DataSource In the app I say:- Context cont   More>>

I use MS SQL Server 2000(dev edition..I guess only one connection allowed). And I use the Orion Server.



I get the "NamingException" at the statement in the app that is to find the DataSource object. I have the 'datasources.xml' config file set up correctly. I have also a 'resource-env-ref' entry in the 'ejb-jar.xml'. I have NOT edited 'orion-ejb-jar.xml'(meaning it does not say anything about the datasource).


In the 'datasources.xml' the relevant entry is :

ejb-location="jdbc/SQLServerDS"


In 'ejb-jar.xml' the entry is:



jdbc/SQLServerDS

javax.sql.DataSource



In the app I say:-

Context context = new InitialContext();


DataSource ds=(DataSource) context.lookup("jdbc/SQLServerDS");


con=ds.getConnection();




Is there anything amiss?

   <<Less
About | Sitemap | Contact