Dear All

I have an EAR file that i'm deploying under
<apache-tomee-plume-7.1.0-home>\apps folder, I added the the below
Datasource configuration in the tomee.xml file located under
<tomee-home>\conf:

<?xml version="1.0" encoding="UTF-8"?>
<tomee>
        <Deployments dir="apps" />
        <Resource id="services" type="javax.sql.DataSource">
                jdbcDriver oracle.jdbc.OracleDriver
                jdbcUrl jdbc:oracle:thin:@//db-server:1521/ORA11
                userName test_server
                password test_server
                jtaManaged true
                defaultAutoCommit true
        </Resource>
</tomee>

In my EJB i'm calling the datasource as per the below code:

Context initContext = new InitialContext();
DataSource ds = (DataSource) initContext.lookup("services");
this.ConnectDataSource = ds;

But When i'm starting TomeEE i'm getting the below exception:

javax.naming.NameNoFoundException: Name [services] is not bound in this
Context. Unable to find [services.]

Kindly advice


Best Regards





--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Reply via email to