In ejb-jar.xml, you are only identifying that the resource you references in
your bean as jdbc/OracleDB (e.g.) is a javax.sql.DataSource, like so:

   <resource-ref>
            <description>A jdbc connection for the DbTester
bean</description>
            <res-ref-name>jdbc/OracleDB</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
    </resource-ref>

You must also provide an entry in jboss.xml for this EJB which maps the
logical reference in your code to a JNDI name like so:

  <resource-managers>
    <resource-manager>
      <res-jndi-name>java:/OracleDB</res-jndi-name>
      <res-name>jdbc/OracleDB</res-name>
    </resource-manager>
  </resource-managers>

All these entries do is map the logical reference in the bean code to a jndi
resource.  No real datasource yet.  Finally, in your jboss.jcml, you define
the actual datasource.  It is only when this is done that you are actually
defining an actual connection to a real database.  So the answer to your
question is twofold.  Yes, JBoss supports the spec.  But you still need
entries in jboss.jcml.  This allows you to keep your code generic, and
allows resources to be identified at deployment time.

----- Original Message -----
From: "Phan Anh Tran" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 3:06 AM
Subject: [JBoss-user] Resource-Ref


> Hi,
>
> According to 1.1, one can specify datasources in the <resource-ref>
section
> of the deployment descriptor of an EJB.  Does JBOSS support this?  I have
> been specifying my datasources directly in the jboss.jcml file, but I'd
> rather not have to mess with anything container specific.  Thanks.
>
> Anh
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to