To access your database pool via:

java:comp/jdbc/PoolName

You need to add a resource reference to your bean in
your deployment descriptor (ejb-jar.xml - see EJB1.1
spec for more details):

<session>
  ...
  <resource-ref>
    <description>Database connection
pool</description>
    <res-ref-name>jdbc/PoolName</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
  ...
</session>

And then resolve that name via a Resource Manager in
your jboss.xml file:

<jboss>
  ...
  <resource-managers>
    <resource-manager>
      <res-name>jdbc/PoolName</res-name>
      <res-jndi-name>PoolName</res-jndi-name>
    </resource-manager>
  </resource-managers>
  ...
</jboss>

The <res-name> must match your <res-ref-name> exactly
and the <res-jndi-name> must match the JNDI name you
have created ("oraclePool" in your case)..

Good Luck!
Steve

--- Ozzie Gurkan <[EMAIL PROTECTED]> wrote:
> I cannot lookup any DataSource resources from my
> WebTier via web.xml reference.
> "java:comp/env/jdbc/MyDataSource" gives a naming
> exception. I can only get to my data source by
> directly using its name specified in the conf files,
> "java:oraclePool". Is this not supported at the
> WebTier level?
> 
> Thanks,
> Ozzie Gurkan
> 
> 
> --
>
--------------------------------------------------------------
> To subscribe:       
> [EMAIL PROTECTED]
> To unsubscribe:     
> [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]
> 


=====
Steven Haines
Technical Lead
IPNet Solutions
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(949)476-4463 x388

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to