Gordon,

The Orion team have previosuly recommended using the ejb-location
datasource as this is both pooled and transactional (xa).

ie:

      Context context = new InitialContext();
      DataSource dbDS (DataSource)context.lookup("jdbc/DefaultEJBDS");
      Connection dbConn = dbDS.getConnection();
      Statement dbStmt = dbConn.createStatement();
      dbRS = dbStmt.executeQuery(sql);

Cheers,

Dave Elliot



>Gordon Tyler wrote:
>
>Hi,
>
>A datasource is defined in Orion's data-sources.xml something like
>this:
>
>        <data-source
>                name="Test"
>                class="com.evermind.sql.ConnectionDataSource"
>                location="jdbc/Test"
>                pooled-location="jdbc/TestPool"
>                xa-location="jdbc/xa/TestXA"
>                ejb-location="jdbc/TestEJB"
>                url="jdbc:oracle:thin:@Test:1521:Test"
>                connection-driver="oracle.jdbc.driver.OracleDriver"
>        />

>Could somebody explain what the different types of location attributes
>are used for? The Orion docs are rather terse in this regard. I've
>tried making an entity use one of the other locations for getting it's
>DataSource and thus Connection but I get various exceptions. The
>entity only works when it uses the name defined in the plain location
>attribute.
>
>Thanks,
>Gordon







__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

Reply via email to