users@glassfish.java.net

Re: javax.resource.ResourceException: This Managed ...

From: <forums_at_java.net>
Date: Tue, 20 Mar 2012 15:01:39 -0500 (CDT)

I think the problem may be that Glassfish is attempting to give me an
XADataSource when the connection pool is defined as a DataSource:

<code>

<resources>     
    <jdbc-connection-pool
        name="oracle_devl_pool"
        datasource-classname="oracle.jdbc.pool.OracleDataSource"
        res-type="javax.sql.DataSource"
        is-connection-validation-required="true"
        connection-validation-method="table"
        validation-table-name="sys.dual"
        fail-all-connections="true"
    >
        <property name="url"
value="jdbc:oracle:thin:@myhost:1521:devl"/>
        <property name="user" value="scott"/>
        <property name="password" value="tiger"/>
    </jdbc-connection-pool>
    <jdbc-resource
        enabled="true"
        jndi-name="jdbc/devl"
        object-type="user"
        pool-name="oracle_devl_pool"/>
</resources>
</code>

It's referenced in a Stateful bean like this:

<code>

@Resource(name="jdbc/devl")
private DataSource dsDevl;

</code>


--
[Message sent by forum member 'Meatwad']
View Post: http://forums.java.net/node/884420