ejb@glassfish.java.net

Defining DataSource JNDI name in ejb-jar.xml

From: AKostylev <akostylev_at_ipian.kazan.ru>
Date: Tue, 29 Aug 2006 12:24:00 +0400

Hello!

I have a stateless bean with DataSource field:
public class FacadeBean implements Facade
{
        @Resource(name = "jdbc/logicTestIP") private DataSource ds;
...

When using it in such way all works fine.
But I want to define JNDI name ("jdbc/logicTestIP") for the DataSource in ejb-jar.xml not in java
code.

How can I do this? What will look like my FacadeBean and ejb-jar.xml?

Thank you.


-- 
With best wishes,
 AKostylev                          mailto:akostylev_at_ipian.kazan.ru