tomee-users mailing list archives

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

read at:

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

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:
Sent from the OpenEJB User mailing list archive at

View raw message