Hi Transactional is an alias for jtamanaged. Properties are specific peoperties. The jndi name is openejb:Resource/xxx but xxx should be resolved correctly without the prefix.
That said hardcoding it is rarely a good idea for real apps + the support is not as good as with standard resources for advanced datasources....but for simple embded database thats fine Le 2 sept. 2013 19:19, "mauro2java2011" <[email protected]> a écrit : > > 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. >
