[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openejb-user
Subject:    Transaction without JPA
From:       sgjava <sgjava () gmail ! com>
Date:       2019-05-25 14:58:18
Message-ID: 1558796298310-0.post () n4 ! nabble ! com
[Download RAW message or body]

Can TomEE handle a JDBC transactions without using @PersistenceContext? I'm
using my own DAO layer and would like to add container managed transactions.
Even if I have to resort bean managed I should be able to  use an
interceptor t replace the boiler plate code. My DataSource looks like this:

        final Properties p = new Properties();
        // DataSource
        p.put("dataSource", "new://Resource?type=DataSource");
        p.put("dataSource.JdbcDriver",
properties.getProperty("db.xa.driver"));
        p.put("dataSource.JdbcUrl", properties.getProperty("db.xa.url"));
        p.put("dataSource.userName", properties.getProperty("db.xa.user"));
        p.put("dataSource.password",
properties.getProperty("db.xa.password"));
        p.put("dataSource.jtaManaged", true);
        p.put("dataSource.maxActive", 10);
        p.put("dataSource.maxIdle", 5);
        // Transaction manager
        p.put("transactionManager",
"new://TransactionManager?type=TransactionManager");
        ejbContainer = EJBContainer.createEJBContainer(p);
        final Context context = ejbContainer.getContext();




--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic