Finally question:

from your link i get the following class:

package org.superbiz.dsdef;

import javax.annotation.Resource;
import javax.annotation.sql.DataSourceDefinition;
import javax.inject.Named;
import javax.sql.DataSource;

@DataSourceDefinition(transactional = true,
                      url = "jdbc:h2:mem:persister",
                      className = "org.h2.jdbcx.JdbcDataSource",
                      user = "sa",
                      password = "",
                      name = "java:app/jdbc/persister",
                      initialPoolSize = 1,
                      maxPoolSize = 3
)
@Named
public class Persister {

    @Resource(lookup = "java:app/jdbc/persister")
    private DataSource ds;

    public DataSource getDs() {
        return ds;
    }
}

you write that into tomee it is supported  the Resource attributes like
JtaManaged 

........................................................
We support Resource attributes like JtaManaged (but use transactional for 
this one) using properties = {"key=value","otherkey=othervalue"} but thats 
not standard
...............................................

So if i substitute the transactional = true,  
with JtaManaged = true ,
it work equally?????

But into tomee it work the attribute transactional= true or i have to use
JtaManaged= true ???? it is equally ?



@DataSourceDefinition(transactional = true,
                      url = "jdbc:h2:mem:persister",
                      className = "org.h2.jdbcx.JdbcDataSource",
                      user = "sa",
                      password = "",
                      name = "java:app/jdbc/persister",
                      initialPoolSize = 1,
                      maxPoolSize = 3
)



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

Reply via email to