tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mauro2java2011 <mauro2java2...@gmail.com>
Subject declare datasource with annotation.
Date Mon, 02 Sep 2013 17:13:22 GMT

read at:
https://blogs.oracle.com/enterprisetechtips/entry/datasource_resource_definition_in_java

i would declare a datasource from annotation that it is available for the
module or application.
i not woul use resource.xml or Tomee.xml .

But the following datasource for example it is JTA managed or not?
how i can add the properties into annotation declaration for get it jta
maaged?????? 
 

for example:

@DataSourceDefinition(name = "java:app/env/Servlet_DataSource",
      minPoolSize = 0,
      initialPoolSize = 0,
      className = "org.apache.derby.jdbc.ClientXADataSource",
      user = "APP",
      password = "APP",
      databaseName = "testdb",
      properties = {"connectionAttributes=;create=true"}
   )

i have to add into section   properties =
{"connectionAttributes=;create=true"}  the jtamanaged=true?
please write me the exact example.

Next i would reference the datasource into persistenxe.xml for use it like a
<jta-datasource >
but what name i have to write???  
a: Servlet_Datasource 
or "java:app/env/Servlet_DataSource"  ??????????


tank you



--
View this message in context: http://openejb.979440.n4.nabble.com/declare-datasource-with-annotation-tp4664952.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message