EJB transactions

I'm developing a Web Service using an EJB Stateless, which has a single entry point (method). There are 3 steps in this method and I want to step 1 to occur in another transaction that steps 2 and 3 (which should be in the same transaction). These "measures" include vocations EJB Stateless injected. Let me explain with a code:

@Stateless
@WebService(...)
public class MyWebServiceImpl implements MyWebService {
     @EJB
     private UserBusinessBean userBusinessBean;

     @EJB
     private EventsBusinessBean eventsBusinessBean;

     @WebMethod(...)
     public MyWebServiceResult process(MyWebServiceParam param) {
          // extract data from param
          EventResult createEventResult = eventsBusinessBean.createEvent(data); // step 1
          // do some extra processing
          User user = userBusinessBean.createUser(someData); // step 2
          // do some extra processing
          EventResult updateEventResult = eventsBusinessBean.updateEvent(moreData); // step 3
     }
}

The injected EJBs 2 themselves are stateless and have injected references to stateless persons DAoC, whose function is to call stored procedures to the database.

I need to have step 1 running in a transaction and the steps 2 and 3 running in another transaction (because if step 2 or 3 fails, the news of step 1 is already committed).

I know that I have 2 options to implement this: container-Manager transactions or managed by users. I think that the first approach is more secure than the second, in delegating management to the container (in my case, a Weblogic Server). But I can't understand how can I use Annotations in EJB Transactions to apply this logic. Can I annotate my beans injected Business methods? And what about the BCM, do need to have too many annotations? And what are those which one should I use?

I hope you can give me a little help in this one. Let me know if you need to know more details of my implementation.

Basically, you need to apply the attributes of correct transaction but only at the entrance to a string of calls when it is required. If you use 'CREATE_NEW' for example, the EJB invocation will create a transaction nested of its own rather than adopt the transaction that already existed. All work done in this 'inner' transaction will be validated and will not affect the "external" transaction, which was suspended before the end of the 'inner' invocation of EJB

A tutorial on EJB tech explain what transaction attributes exist and what they do in the world. Applying them properly instead of always just using the default (REQUIRED) can help you create a transactional environment more controlled in which you have the chance of catching transactional errors early on (for example: If you have the code for which you know a transaction MUST exist that he succeed, the 'REQUIRED' attribute is useful). You will find that this bit of micro-management, it's making it a little more difficult to apply in a first time tech EJB, but ultimately when you start to 'see the matrix' it will actually start helping you establish a code clean design. However, that takes experience.

Tags: Java

Similar Questions

  • noob question about EJB Transactions and concurrency

    I have a web client that calls a stateless session bean. This bean contains a method that checks the data in a database tables and, if everything looks good, calls a stored procedure that updates the tables. As I understand it, placing this method in a managed transaction container should ensure only one instance of the method inside the bean can run at any time and would prevent the 2 wires of operating simultaneously.

    Don't I have that right?

    So without implementing any kind of Singleton, EJB Transactions, or using persistence, would just add a lock inside the stored procedure be sufficient to ensure that not more than 1 customer could be modify account at once?

    Of course, in oracle - using a select... from

    update the locks the table at line level, which means that only the line of this account will be locked. Other users can still search only the rank.

    I'm sorry--I know not how it works for the other dbs.

    You must always an ejb CMT if you have some other updates to occur with this one and you need atomicity.

    Published by: ramp on June 27, 2011 20:06

  • Autonomous Tranasction in Java

    How can I use a similar concept as autonomous transaction in java. My requirement is to connect to a particular block, and should not have any impact on the transaction. How can I achieve this? Thank you in advance

    In EJB, there is something similar (if you don't want to go with multiple db connections), known as nested transactions - see http://stackoverflow.com/questions/10817838/ejb-3-0-nested-transaction-requires-new or Java Enterprise Stuff: EJB transactions: deepening (search for REQUIRES_NEW)

  • Is that what this thread code safe?

    I've been seeing some information that makes me think that some servlet code that I have that I thought is thread-safe is not really. I have a servlet that takes a POST request and calls a stored procedure on a database to do a few inserts.
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    {
      // Check validity of request then proceed.
      if (valid) { postPayment(request); }
    }
    
    synchronized private void postPayment(HttpServletRequest request)
    {
      /* Take some parameters from the request and call the stored procedure */
    }
    What I'm trying to do, is make sure 2 queries containing the same data trying to insert to the database at the same time. I did that or do I need a different approach?

    Meatwad says:
    Yes, I say an EJB.

    This isn't something that I can help you. There is here a forum EJB (Enterprise JavaBeans which can be a more appropriate place for this question.

    For the logical database are simply referring to the lock table/row?

    No, I mean no transactions. Google for something like java transaction database examples for more details. While you cannot end up using such things directly if the EJB ends up handling for you (and I really don't know how they do it), it is probably that you should know the basic principles.

    And can you point me in the right direction to find more information on how do this using the EJB?

    Google for the EJB tutorials and examples, for EJB transactions maybe, the link to the forum above.

  • DBAdapter: Impossible to catch "the database host is down" scenario as a flaw

    Hello

    I use a DBAdapter and try to test the scenario when the database is out of service.

    I have attached a tote within reach with the "systematically" to the DBAdapter and since he did not work an explicit fault Manager Catch so trying to catch a "remoteFault" with the data from the fault to be captured in a variable 'RuntimeFault' to type 'RuntimeFaultMessage '.

    The problem is that my fault handlers intercept not defects, and I get an errors of ORABPEL-11622/08033/05002 as pasted below:
    -----
    < 2009-04-15 18:47:39, 824 > < INFO > < default.collaxa.cube.ws > < AdapterFramework::Outbound > file:/D:/oracle/product/10.1.3.1/OracleAS/bpel/domains/default/tmp/.bpel_ReinitiateTask_1.0_7d6f64cf5f538ea8399318bcb3b1bb5d.tmp/BPEL_DBLogger.wsdl [BPEL_DBLogger_ptt::BPEL_DBLogger (InputParameters)] - connection using JCA Pool - size = < unbounded > max
    < 2009-04-15 18:47:39, 824 > < WARN > < default.collaxa.cube.ws > < AdapterFramework::Outbound > file:/D:/oracle/product/10.1.3.1/OracleAS/bpel/domains/default/tmp/.bpel_ReinitiateTask_1.0_7d6f64cf5f538ea8399318bcb3b1bb5d.tmp/BPEL_DBLogger.wsdl [BPEL_DBLogger_ptt::BPEL_DBLogger (InputParameters)] - search for "ist/DB/Unknown" JNDI has no reason to: eis/DB/Unknown not found
    < 2009-04-15 18:47:39, 824 > < INFO > < default.collaxa.cube.ws > < AdapterFramework::Outbound > as unable to locate the JCA resource adapter deployed to "ist/DB/Unknown", then will attempt to instantiate ManagedConnectionFactory oracle.tip.adapter.db.DBManagedConnectionFactory directly.
    < 2009-04-15 18:48, 808 > < ERROR > < default.collaxa.cube.ws > < database Adapter::Outbound > < oracle.tip.adapter.db.DBManagedConnectionFactory acquireSession > cannot generate the TopLink Session

    < 2009-04-15 18:48, 808 > < ERROR > < default.collaxa.cube.ws > < AdapterFramework::Outbound > file:/D:/oracle/product/10.1.3.1/OracleAS/bpel/domains/default/tmp/.bpel_ReinitiateTask_1.0_7d6f64cf5f538ea8399318bcb3b1bb5d.tmp/BPEL_DBLogger.wsdl [BPEL_DBLogger_ptt::BPEL_DBLogger (InputParameters)] - could not invoke operation "BPEL_DBLogger" against the "data adapter" due to:
    ORABPEL-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the data store. [Caused by: IO exception: the network adapter could not establish the connection]
    See the first exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml), and then restart the server. Created by Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Inner exception: java.sql.SQLException: IO exception: the network adapter could not establish the connectionError Code: 17002.

    < 2009-04-15 18:48, 808 > < logging INFO level > < default.collaxa.cube.ws > < AdapterFramework::Outbound > complete change for Logger "default.collaxa.cube.ws" Debug to see the error stack
    < 2009-04-15 18:48, 808 > < ERROR > < default.collaxa.cube.ws > < AdapterFramework::Outbound > file:/D:/oracle/product/10.1.3.1/OracleAS/bpel/domains/default/tmp/.bpel_ReinitiateTask_1.0_7d6f64cf5f538ea8399318bcb3b1bb5d.tmp/BPEL_DBLogger.wsdl [BPEL_DBLogger_ptt::BPEL_DBLogger (InputParameters)] - backward JCA LocalTransaction
    09/04/15 18:48 - __callback exception Caught class com.collaxa.cube.ws.WebServiceException
    < 2009-04-15 18:48, 808 > < ERROR > < default.collaxa.cube > < BaseCubeSessionBean::logError > error when calling bean cube"delivery": EJB Transaction error.
    Exception of EJB that happened during the call to the partner.
    Please check service partners.

    ORABPEL-08033

    EJB Transaction error.
    Exception of EJB that happened during the call to the partner.
    Please check service partners.

    at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:576)
    at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:416)
    at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:222)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:736)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:371)
    at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195)
    at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3271)
    at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1697)
    at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:184)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:269)
    at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5244)
    at com.collaxa.cube.engine.CubeEngine.callbackPerformer(CubeEngine.java:1917)
    at com.collaxa.cube.engine.delivery.DeliveryHelper.callbackPerformer(DeliveryHelper.java:788)
    at com.collaxa.cube.engine.delivery.DeliveryService.handleCallback(DeliveryService.java:778)
    at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleCallback(CubeDeliveryBean.java:369)
    at sun.reflect.GeneratedMethodAccessor96.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    to com.evermind.server.ejb.interceptor.system.JAASInterceptor$ 1.run(JAASInterceptor.java:31)
    at java.security.AccessController.doPrivileged (Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at com.evermind.server.ThreadState.runAs(ThreadState.java:622)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
    at CubeDeliveryBean_LocalProxy_4bin6i8.handleCallback (unknown Source)
    at com.collaxa.cube.engine.dispatch.message.instance.CallbackDeliveryMessageHandler.handle(CallbackDeliveryMessageHandler.java:49)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:138)
    at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
    at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
    at sun.reflect.GeneratedMethodAccessor32.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
    at WorkerBean_EndPointProxy_4bin6i8.onMessage (unknown Source)
    at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:266)
    at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
    at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
    at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
    to EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ Worker.run (PooledExecutor.java:814)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: org.collaxa.thirdparty.apache.wsif.WSIFException: file:/D:/oracle/product/10.1.3.1/OracleAS/bpel/domains/default/tmp/.bpel_ReinitiateTask_1.0_7d6f64cf5f538ea8399318bcb3b1bb5d.tmp/BPEL_DBLogger.wsdl [BPEL_DBLogger_ptt::BPEL_DBLogger (InputParameters)] - SISM JCA Execute of 'BPEL_DBLogger' failed due to the operation: could not create/access the TopLink Session.
    This session is used to connect to the data store. [Caused by: IO exception: the network adapter could not establish the connection]
    ; nested exception is:
    ORABPEL-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the data store. [Caused by: IO exception: the network adapter could not establish the connection]
    See the first exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml), and then restart the server. Created by Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Inner exception: java.sql.SQLException: IO exception: the network adapter could not establish the connectionError Code: 17002.

    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:631)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:726)
    at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:425)
    ... more than 57
    Caused by: ORABPEL-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the data store. [Caused by: IO exception: the network adapter could not establish the connection]
    See the first exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml), and then restart the server. Created by Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Inner exception: java.sql.SQLException: IO exception: the network adapter could not establish the connectionError Code: 17002.

    at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:362)
    at oracle.tip.adapter.db.exceptions.DBResourceException.couldNotCreateTopLinkSessionException(DBResourceException.java:171)
    at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:598)
    at oracle.tip.adapter.db.transaction.DBTransaction.getSession(DBTransaction.java:351)
    at oracle.tip.adapter.db.DBConnection.getSession(DBConnection.java:222)
    at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:971)
    at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:218)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:480)
    ... more than 59
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Inner exception: java.sql.SQLException: IO exception: the network adapter could not establish the connectionError Code: 17002
    at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:276)
    at oracle.tip.adapter.db.toplinkext.Oc4jDefaultConnector.connect(Oc4jDefaultConnector.java:101)
    at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:147)
    at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:197)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:220)
    at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:273)
    at oracle.toplink.threetier.ConnectionPool.buildConnection(ConnectionPool.java:82)
    at oracle.toplink.threetier.ConnectionPool.startUp(ConnectionPool.java:304)
    at oracle.toplink.threetier.ServerSession.connect(ServerSession.java:435)
    at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:503)
    at oracle.tip.adapter.db.DBManagedConnectionFactory.createServerSession(DBManagedConnectionFactory.java:858)
    at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:373)
    ... 64 more
    Caused by: java.sql.SQLException: IO exception: the network adapter could not establish the connection
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
    to oracle.jdbc.driver.PhysicalConnection. < init > (PhysicalConnection.java:430)
    to oracle.jdbc.driver.T4CConnection. < init > (T4CConnection.java:151)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:140)
    at oracle.tip.adapter.db.toplinkext.Oc4jDefaultConnector.connect(Oc4jDefaultConnector.java:71)
    ... more than 74
    < 2009-04-15 18:48, 808 > < ERROR > < default.collaxa.cube.engine.dispatch > < DispatchHelper::handleMessage > to not handle the message
    java.sql.SQLException: IO exception: the network adapter could not establish the connection
    at com.collaxa.cube.ejb.impl.BaseCubeSessionBean.checkIfFatalConnectionError(BaseCubeSessionBean.java:196)
    at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleCallback(CubeDeliveryBean.java:383)
    at sun.reflect.GeneratedMethodAccessor96.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    to com.evermind.server.ejb.interceptor.system.JAASInterceptor$ 1.run(JAASInterceptor.java:31)
    at java.security.AccessController.doPrivileged (Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at com.evermind.server.ThreadState.runAs(ThreadState.java:622)
    at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
    at CubeDeliveryBean_LocalProxy_4bin6i8.handleCallback (unknown Source)
    at com.collaxa.cube.engine.dispatch.message.instance.CallbackDeliveryMessageHandler.handle(CallbackDeliveryMessageHandler.java:49)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:138)
    at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
    at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
    at sun.reflect.GeneratedMethodAccessor32.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
    at WorkerBean_EndPointProxy_4bin6i8.onMessage (unknown Source)
    at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:266)
    at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
    at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
    at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
    to EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ Worker.run (PooledExecutor.java:814)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: IO exception: the network adapter could not establish the connection
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
    to oracle.jdbc.driver.PhysicalConnection. < init > (PhysicalConnection.java:430)
    to oracle.jdbc.driver.T4CConnection. < init > (T4CConnection.java:151)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:140)
    at oracle.tip.adapter.db.toplinkext.Oc4jDefaultConnector.connect(Oc4jDefaultConnector.java:71)
    at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:147)
    at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:197)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:220)
    at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:273)
    at oracle.toplink.threetier.ConnectionPool.buildConnection(ConnectionPool.java:82)
    at oracle.toplink.threetier.ConnectionPool.startUp(ConnectionPool.java:304)
    at oracle.toplink.threetier.ServerSession.connect(ServerSession.java:435)
    at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:503)
    at oracle.tip.adapter.db.DBManagedConnectionFactory.createServerSession(DBManagedConnectionFactory.java:858)
    at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:373)
    at oracle.tip.adapter.db.transaction.DBTransaction.getSession(DBTransaction.java:351)
    at oracle.tip.adapter.db.DBConnection.getSession(DBConnection.java:222)
    at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:971)
    at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:218)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:480)
    at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:726)
    at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:425)
    at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:416)
    at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:222)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:736)
    at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:371)
    at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195)
    at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3271)
    at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1697)
    at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:184)
    at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:269)
    at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5244)
    at com.collaxa.cube.engine.CubeEngine.callbackPerformer(CubeEngine.java:1917)
    at com.collaxa.cube.engine.delivery.DeliveryHelper.callbackPerformer(DeliveryHelper.java:788)
    at com.collaxa.cube.engine.delivery.DeliveryService.handleCallback(DeliveryService.java:778)
    at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleCallback(CubeDeliveryBean.java:369)
    ... more than 42
    < 2009-04-15 18:48, 808 > < ERROR > < default.collaxa.cube.engine.dispatch > < BaseScheduledWorker::process > is not to manage the exception ORABPEL-05002 message sending...

    Handle error message.
    An exception occurred while trying to process the message 'com.collaxa.cube.engine.dispatch.message.instance.CallbackDeliveryMessage '; the exception: IO exception: the network adapter could not establish the connection

    ORABPEL-05002

    Handle error message.
    An exception occurred while trying to process the message 'com.collaxa.cube.engine.dispatch.message.instance.CallbackDeliveryMessage '; the exception: IO exception: the network adapter could not establish the connection

    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:171)
    at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
    at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
    at sun.reflect.GeneratedMethodAccessor32.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
    at WorkerBean_EndPointProxy_4bin6i8.onMessage (unknown Source)
    at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:266)
    at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
    at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
    at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
    to EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ Worker.run (PooledExecutor.java:814)
    at java.lang.Thread.run(Thread.java:595)
    -----

    To simulate that my database is down, my DBAdapter wsdl I put my < jca:address > section as:
    -----
    < jca:address location = ' ist/DB/Unknown"UIConnectionName ="BPEL_DB_Server ".
    ManagedConnectionFactory = "oracle.tip.adapter.db.DBManagedConnectionFactory"
    MCF. DriverClassName = "oracle.jdbc.OracleDriver"
    MCF. PlatformClassName = "oracle.toplink.internal.databaseaccess.Oracle9Platform"
    MCF. ConnectionString="jdbc:oracle:thin:@172.16.205.120:1522:ETGLIT".
    MCF. UserName = "owf_mgr_temp".
    MCF. Password = "867BD34C5AE6EF60BEC0F888655A72920D60DCB1D74A4B78" / >
    -----

    Since then, there is no location "eis/DB/Unknown" Bpel would use other attributes defined here to connect to the database. But the IP database I specified here is incorrect to make sure that DBAdapter fails to connect.

    Now, I received the error "Network adapter could not establish the connection" but it appears in my logs to opmn with the above pasted stack trace. Why am I unable to catch this problem of connectivity as a bpelx:remoteFault in my capture explicit or CatchAll?

    Help, please!

    Kind regards
    Ravi

    I am surprised as well. I see you're on 10.1.3.1. There are a lot of problems with the DB adapter in this version. I suggest either install the following hotfixes or upgrade to 10.1.3.3 or 10.1.3.4 (recommended)

    What happens to the BPEL process, do go to manual recovery? Or just fail. Are you sure that the Tote was beyond the scope of the DB adapter. Have you implemented several scopes?

    see you soon
    James

    2617419
    5877231
    5838073
    5841736
    5905744
    5742242
    5729652
    5724766
    5664594
    5965376
    5672007
    6033824
    5758956
    5876231
    5900308
    5915792
    5473225
    5853207
    5990764
    5669155
    5149744

  • OSB 11 g - management transactions @ EJB typed Trasport

    Hello

    We are having a problem with the flow of the following messages:

    Http PS-> Local PS-> EJB BS-> EJB 2.1-> Oracle 8i DB

    We have activated + "Transaction Requiered" + in the Http and the Local PS.

    We active + "Same Transaction for answer" + local PS + (local PS is a Legacy adapter, ergo, it should be able to be re-used). +

    The Local PS on an error event, propagates the exception using a + 'answer failed. "+"

    The Http PS on an error event, intercepts the error and + "Successfully met" + for the customer.

    If the stream enconunters one exception the changes made by the EJB are not committed or rollbacked. The following response is the only evidence we have about what's going on:

    < con xmlns:con: fault = "http://www.bea.com/wli/sb/context" >
    < con: errorCode > BEA-382051 < / con: errorCode >
    < con: reason >
    No operation on the current thread
    < / con: reason >
    < con: location >
    pipeline response - < con: path > < / con: path >
    < / con: location >
    < / con: fault >

    We followed the steps to enable the features of the TX, you can lend me a helping hand?

    Thank you.

    --------

    UPDATE:

    Activate the Debug XA mode on the run, we get this exception:

    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < anonymous > > BEA1-000B1169AF02F558E4E0 > < 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425379 > < BEA-000000 > < registerMBean resources MBean isResourceRegisterMBean: false to resources : weblogic.jdbc.wrapper.JTSXAResourceImpl >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < anonymous > > BEA1-000B1169AF02F558E4E0 > < 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425380 > < BEA-000000 > < ResourceDescriptor [weblogic.jdbc.wrapper.JTSXAResourceImpl]: getOrCreate creates rd: name = weblogic.jdbc.wrapper.JTSXAResourceImpl
    resourceType = 2
    registered = true
    scUrls =
    xar = weblogic.jdbc.wrapper.JTSXAResourceImpl@1832e78e
    good health = true
    lastAliveTimeMillis = - 1
    numActiveRequests = 0
    >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < anonymous > > BEA1-000B1169AF02F558E4E0 > < 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425390 > < BEA-000000 > < BEA1-000B1169AF02F558E4E0: null: XA.start (rm = weblogic.jdbc.wrapper.JTSXAResourceImpl, xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@1832e78e) (, flags = TMNOFLAGS) >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < anonymous > > BEA1-000B1169AF02F558E4E0 > < 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425391 > < BEA-000000 > < resource 'weblogic.jdbc.wrapper.JTSXAResourceImpl' setTransactionTimeout (30) not called. callSetTransactionTimeout = false supportsSetTransactionTimeout = true >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > <>< 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425393 > < BEA-000000 > < startResourceUse, number of active requests: 1, last time living : 0 ms it y a. >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < anonymous > > BEA1-000B1169AF02F558E4E0 > < 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425394 > < BEA-000000 > < BEA1-000B1169AF02F558E4E0: null: FACT of XA.start (rm = weblogic.jdbc.wrapper.JTSXAResourceImpl , xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@1832e78e >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > < BEA1-000B1169AF02F558E4E0 > < 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425395 > < BEA-000000 > < endResourceUse, number of requests: 0 active >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < WLS Kernel > > <>< 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425973 > < BEA-000000 > < BEA1-000B1169AF02F558E4E0: null: XA.end (rm = weblogic.jdbc.wrapper.JTSXAResourceImpl, xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@1832e78e) (, flags = TMSUCCESS) >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < WLS Kernel > > <>< 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425973 > < BEA-000000 > < startResourceUse, number of active requests: 1, last time living : 0 ms it y a. >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < WLS Kernel > > < BEA1 000B1169AF02F558E4E0 > < 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425974 > < BEA-000000 > < FACT of XA.end (rm = weblogic.jdbc.wrapper.JTSXAResourceImpl, xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@1832e78e >)
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < WLS Kernel > > < BEA1 000B1169AF02F558E4E0 > < 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520425974 > < BEA-000000 > < endResourceUse, number of requests: 0 active >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '1' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > <>< 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520426405 > < BEA-000000 > < startResourceUse, number of active requests: 1, last time living : 0 ms it y a. >
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '1' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > <>< 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520426425 > < BEA-000000 > < BEA1-000B1169AF02F558E4E0: null: FACT of XA.commit (rm = weblogic.jdbc.wrapper.JTSXAResourceImpl, xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@1832e78e >)
    # < 29 October 2012 11 H 20' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '1' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > <>< 11d1def534ea1be0:-59a6deab:13a937f15aa: - 7ffd - 0000000000007f8d > < 1351520426425 > < BEA-000000 > < endResourceUse, number of requests: 0 active >
    # < 29 October 2012 11 H 20' ART > < Debug > < JNDIResolution > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < > anonymous > > <>< 1351520434298 > < BEA-000000 > <-failed to find NotificacionesPorting >
    # < 29 October 2012 11 H 20' ART > < Debug > < JNDIResolution > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < > anonymous > > <>< 1351520444302 > < BEA-000000 > <-failed to find NotificacionesPorting >
    # < 29 October 2012 11 H 20' ART > < health > < > < tepe008 > < TPBUSAPP1 > < weblogic. GCMonitor > < < < > anonymous > > <>< 1351520452165 > < BEA-310002 > < 75% of the total server memory is free >
    # < 29 October 2012 11 H 20' ART > < Debug > < JNDIResolution > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '2' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < > anonymous > > <>< 1351520454304 > < BEA-000000 > <-failed to find NotificacionesPorting >
    # < 29 October 2012 11 H 21' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '2' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < > anonymous > > <>< 1351520462782 > < BEA-000000 > < BEA1-000B1169AF02F558E4E0: null: XAResource [weblogic.jdbc.wrapper.JTSXAResourceImpl] .rollback () >
    # < 29 October 2012 11 H 21' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '2' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < > anonymous > > <>< 1351520462782 > < BEA-000000 > < startResourceUse, number of active requests: 1, last time living: 0 ms it y a. >
    # < 29 October 2012 11 H 21' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '2' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < > anonymous > > <>< 1351520462785 > < BEA-000000 > < BEA1-000B1169AF02F558E4E0: null: XAResource [weblogic.jdbc.wrapper.JTSXAResourceImpl] .rollback: failed, error code: XA_OK, message: no link associated with xid = BEA1-000B1169AF02F558E4E0-7765626C6F6769632E6A6462632E777261707065722E4A545358415265736F75726365496D706C
    javax.transaction.xa.XAException: no connection associated with xid = BEA1-000B1169AF02F558E4E0-7765626C6F6769632E6A6462632E777261707065722E4A545358415265736F75726365496D706C
    at weblogic.jdbc.wrapper.JTSXAResourceImpl.rollback(JTSXAResourceImpl.java:69)
    at weblogic.transaction.internal.XAServerResourceInfo.rollback(XAServerResourceInfo.java:1401)
    at weblogic.transaction.internal.XAServerResourceInfo.rollback(XAServerResourceInfo.java:746)
    at weblogic.transaction.internal.ServerSCInfo.startRollback(ServerSCInfo.java:872)
    at weblogic.transaction.internal.ServerTransactionImpl.localRollback(ServerTransactionImpl.java:2032)
    at weblogic.transaction.internal.ServerTransactionImpl.globalRetryRollback(ServerTransactionImpl.java:3086)
    at weblogic.transaction.internal.ServerTransactionImpl.globalRollback(ServerTransactionImpl.java:2838)
    at weblogic.transaction.internal.ServerTransactionImpl.internalRollback(ServerTransactionImpl.java:400)
    at weblogic.transaction.internal.ServerTransactionImpl.rollback(ServerTransactionImpl.java:379)
    at weblogic.transaction.internal.CoordinatorImpl.startRollback(CoordinatorImpl.java:343)
    at weblogic.transaction.internal.CoordinatorImpl_WLSkel.invoke (unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:590)
    to weblogic.rmi.internal.BasicServerRef$ 1.run(BasicServerRef.java:478)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs (unknown Source)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:119)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    >
    # < 29 October 2012 11 H 21' ART > < Debug > < JTAXA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '2' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < > anonymous > > <>< 1351520462788 > < BEA-000000 > < endResourceUse, number of requests: 0 active >
    # < 29 October 2012 11 H 21' ART > < error > < JTA > < tepe008 > < TPBUSAPP1 > < ExecuteThread [ASSET]: '2' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < > anonymous > > <>< 1351520462814 > < BEA-110412 > < Xid = BEA1-000B1169AF02F558E4E0 (450424591), status = Rolled back. [Reason = weblogic.transaction.internal.TimedOutException: Transaction timed out after 29 seconds]
    BEA1-000B1169AF02F558E4E0],HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=39,seconds left=30,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=TPBUSAPP1),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@1832e78e,re-Registered = false),SCInfo[TPBUS+TPBUSAPP1]=(state=rolledback),SCInfo[TPBUSESB+TPESB1]=(state=rolledback),properties=({weblogic.jdbc=t3://xxxxx}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=TPBUSAPP1+172.17.195.76:8505+TPBUS+t3+, XAResources={WLStore_TPBUS_FileStore-0, cgDataSource, p13nDataSource, WLStore_TPBUS_cgJMSPagingStore_1, WLStore_TPBUS_FileStoreTPBUSAPP1 weblogic.jdbc.wrapper.JTSXAResourceImpl (,_bpmArchDataSource,_WLStore_TPBUS__WLS_TPBUSAPP1,_WLStore_TPBUS_WSStoreForwardInternalFileStore,_WLStore_TPBUS_WseeFileStore_auto_1},_NonXAResources_=_{})], CoordinatorURL = TPBUSAPP1 + xxxxx + TPBUS + t3 +) full heuristic way: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: no connection associated with xid = BEA1-000B1169AF02F558E4E0-7765626C6F6769632E6A6462632E777261707065722E4A545358415265736F75726365496D706C)) >


    Thank you!

    Published by: 966992 on October 29, 2012 07:25

    -------


    UPDATE


    What I see in the OSB handled when I activated most febug functions:

    # < 29 October 2012 16:07:29 ART > < Debug > < JTA2PC > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < anonymous > > BEA1-0002E247CCDEF558E4E0 > < 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649868 > < BEA-000000 > < BEA1-0002E247CCDEF558E4E0: null: active TX [BEA1-0002E247CCDEF558E4E0]-> pre_preparing
    java.lang.Exception: DEBUGGING
    at weblogic.transaction.internal.TransactionImpl.setState(TransactionImpl.java:1744)
    at weblogic.transaction.internal.ServerTransactionImpl.setPrePreparing(ServerTransactionImpl.java:3165)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:251)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:239)
    at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:299)
    at com.bea.wli.sb.pipeline.RouterContext.endTransactionalMsgFlow(RouterContext.java:321)
    at com.bea.wli.sb.pipeline.MessageProcessor.processResponse(MessageProcessor.java:216)
    at com.bea.wli.sb.pipeline.RouterCallback.onReceiveResponse(RouterCallback.java:100)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.onReceiveResponse(LoadBalanceFailoverListener.java:253)
    at com.bea.wli.sb.transports.local.LocalMessageContext.sendResponse(LocalMessageContext.java:246)
    at com.bea.wli.sb.transports.local.LocalMessageContext.close(LocalMessageContext.java:219)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    to com.bea.wli.sb.transports.Util$ 4.invoke(Util.java:351)
    to $Proxy150.close (Unknown Source)
    at com.bea.wli.sb.pipeline.MessageProcessor.finishProcessing(MessageProcessor.java:398)
    at com.bea.wli.sb.pipeline.RouterCallback.onReceiveResponse(RouterCallback.java:108)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.onReceiveResponse(LoadBalanceFailoverListener.java:253)
    to com.bea.wli.sb.transports.ejb.EjbEndpoint$ 1.run(EjbEndpoint.java:402)
    at weblogic.work.ContextWrap.run(ContextWrap.java:41)
    to weblogic.work.SelfTuningWorkManagerImpl$ WorkAdapterImpl.run (SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >
    # < 29 October 2012 16:07:29 ART > < Debug > < JTA2PC > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < anonymous > > BEA1-0002E247CCDEF558E4E0 > < 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649868 > < BEA-000000 > < BEA1-0002E247CCDEF558E4E0: null: validation >
    # < 29 October 2012 16:07:29 ART > < Debug > < JTA2PC > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < anonymous > > BEA1-0002E247CCDEF558E4E0 > < 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649868 > < BEA-000000 > < BEA1-0002E247CCDEF558E4E0: null: co.commit >
    # < 29 October 2012 16:07:29 ART > < Debug > < JTANaming > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < < anonymous > > BEA1-0002E247CCDEF558E4E0 > < 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649868 > < BEA-000000 > < SecureAction.runAction use the subject = < anonymous > for action: co.commit to t3: / / xxxxx >
    # < 29 October 2012 16:07:29 ART > < Debug > < JTA2PC > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > < BEA1-0002E247CCDEF558E4E0 > < 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649869 > < BEA-000000 > < BEA1-0002E247CCDEF558E4E0: null: remove weblogic.jdbc.wrapper.JTSXAResourceImpl, TMSUSPEND, beforeState = new, startThread = null >
    # < 29 October 2012 16:07:29 ART > < Debug > < JTA2PC > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > < BEA1-0002E247CCDEF558E4E0 > < 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649869 > < BEA-000000 > < BEA1-0002E247CCDEF558E4E0: null: remove weblogic.jdbc.wrapper.JTSXAResourceImpl, afterStatenew >
    # < 29 October 2012 16:07:29 ART > < Debug > < JTAPropagate > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > <>< 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649869 > < BEA-000000 > < PropagationContext: Peer = null, Version = 4 >
    # < 29 October 2012 16:07:29 ART > < Debug > < JTAPropagate > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > <>< 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649869 > < BEA-000000 > < +++ otherPeerInfo.getMajor (): 10 >
    # < 29 October 2012 16:07:29 ART > < Debug > < JTAPropagate > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > <>< 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649869 > < BEA-000000 > < +++ otherPeerInfo.getMinor (): 3 >
    # < 29 October 2012 16:07:29 ART > < Debug > < JTAPropagate > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > <>< 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649869 > < BEA-000000 > < +++ otherPeerInfo.getServicePack (): 0 >
    # < 29 October 2012 16:07:29 ART > < Debug > < JTAPropagate > < tepe008 > < TPESB1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > <>< 11d1def534ea1be0:-4ea62a70:13aaddff0d6: - 7ffd - 00000000000000af > < 1351537649869 > < BEA-000000 > < +++ otherPeerInfo.getRollingPatch (): 0 >

    Published by: 966992 on October 29, 2012 12:11

    You use an action to publish in the proxy mail flow? If Yes, then make sure that in the routing of the action Options to publish, you set Quality of Service (QoS) as "Exactly Once".

    Kind regards
    Anuj

  • Problem with iterator and EJB data control

    My project components:

    JDeveloper 12.1.3

    Back end & the intermediate layer, JPA, EJB 3, controls data EJB

    JSF pages simple front end (no fragment), bounded task flow

    Hello

    I have a weird problem with iterators in my project, project using EJB 3 & JPA and EJB data controls

    When the user come to a page (this page is part of a stubborn workflow) and add a record to a table (linked to an iterator) and without saving changes, leave the page (means output delimited task flow)

    do something else and again back to the first page iterator always keep this line is entry and it cause problems in my system

    If I close the browser and come to this page for sure the line is not there

    I expect when the user leaving a stubborn workflow each thing belongs to this workflow should be deleted. Is this true?

    Or someone has the same problem? Any suggestions / or work around?

    Respect of

    Mohsen

    Have you read the link I posted? Have you named the BA a transactional data control?

    When you leave the workflow you issue a rllback and the new line should have disappeared.

    Timo

  • Cluster WebLogic 12 c and timers EJB 3.1

    Hello!

    I am using Weblogic 12 c (12.1.2.0) Cluster.

    I configured datasource of the cluster tab of planning and created the tables ACTIVE and WEBLOGIC_TIMERS.


    @Stateless

    public class MyTimerService {}

    @Schedule (minute = "* / 2", time = "*")

    private void heartbeat() {}

    System.out.println ("heartbeat shot");

    }

    <? XML version = "1.0" encoding = "UTF-8"? >

    < wls:weblogic - ejb - jar

    ' xmlns:wls = ' http://xmlns.Oracle.com/WebLogic/WebLogic-EJB-jar "" "

    " xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "

    " xsi: schemaLocation =" http://Java.Sun.com/XML/NS/JavaEE http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.3/weblogic-ejb-jar.xsd' > .

    < wls:timer - implemented > Clustered < / wls:timer - implemented >

    < / wls:weblogic - ejb - jar >

    If I run the application on weblogic stanalone without timer of weblogic-ejb - jar.Xml.

    When I try to run the cluster with weblogic-ejb - jar.xml during deployment I have error:

    < error > < hats > < localhost > < MS1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < WLS Kernel > > <><>< 1404812226750 > < BEA-149231 > < cannot create the activation state to true for the application 'test '.

    weblogic.application.ModuleException: java.lang.NullPointerException

    at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)

    at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)

    to weblogic.application.internal.flow.ModuleStateDriver$ 2.next(ModuleStateDriver.java:192)

    to weblogic.application.internal.flow.ModuleStateDriver$ 2.next(ModuleStateDriver.java:187)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)

    at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:58)

    at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:145)

    to weblogic.application.internal.BaseDeployment$ 2.next(BaseDeployment.java:729)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)

    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)

    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)

    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)

    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)

    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:222)

    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:414)

    to weblogic.management.deploy.internal.DeploymentAdapter$ 1.doActivate(DeploymentAdapter.java:51)

    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)

    to weblogic.management.deploy.internal.AppTransition$ 2.transitionApp(AppTransition.java:30)

    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)

    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)

    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)

    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:191)

    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:99)

    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)

    Caused by: java.lang.NullPointerException

    at weblogic.ejb.container.timer.ClusteredEJBTimerManager.uninitializeTimerHandler(ClusteredEJBTimerManager.java:220)

    at weblogic.ejb.container.timer.ClusteredEJBTimerManager.undeploy(ClusteredEJBTimerManager.java:185)

    at weblogic.ejb.container.manager.BaseEJBManager.undeployTimerManager(BaseEJBManager.java:438)

    at weblogic.ejb.container.manager.BaseEJBManager.undeploy(BaseEJBManager.java:420)

    at weblogic.ejb.container.manager.StatelessManager.undeploy(StatelessManager.java:397)

    at weblogic.ejb.container.deployer.EJBDeployer.deactivate(EJBDeployer.java:1327)

    at weblogic.ejb.container.deployer.EjbModuleExtension.preDeactivate(EjbModuleExtension.java:150)

    at weblogic.ejb.container.deployer.EjbModuleExtension.postActivate(EjbModuleExtension.java:140)

    to weblogic.application.internal.ExtensibleModuleWrapper$ ActivateStateChange.next (ExtensibleModuleWrapper.java:321)

    to weblogic.application.internal.ExtensibleModuleWrapper$ ActivateStateChange.next (ExtensibleModuleWrapper.java:313)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)

    at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:121)

    at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)

    to weblogic.application.internal.flow.ModuleStateDriver$ 2.next(ModuleStateDriver.java:192)

    to weblogic.application.internal.flow.ModuleStateDriver$ 2.next(ModuleStateDriver.java:187)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)

    at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:58)

    at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:145)

    to weblogic.application.internal.BaseDeployment$ 2.next(BaseDeployment.java:729)

    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)

    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)

    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)

    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)

    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)

    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:222)

    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:414)

    to weblogic.management.deploy.internal.DeploymentAdapter$ 1.doActivate(DeploymentAdapter.java:51)

    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)

    to weblogic.management.deploy.internal.AppTransition$ 2.transitionApp(AppTransition.java:30)

    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)

    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)

    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)

    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:191)

    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:99)

    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)

    Could you please suggest what I doing worong.

    Above the problem I have when to deploy timer inside the large demand, I've created small test application comes with timer even and have another problem:

    < error > < EJB > < MS1 > < ExecuteThread [ASSET]: '0' for the queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > < BEA1 0003F3B65D8A > <>< 1404977347776 > < BEA-011090 > < the following error occurred when preparing call the method ejbTimeout (javax.ejb.Timer) of the TestTimerService(Application: clusteredTimer-0.0.1-SNAPSHOT, EJBComponent: clusteredTimer-0.0.1-SNAPSHOT.jar) EJB.

    java.lang.AssertionError: no strategy of transaction specified!

    at weblogic.ejb.container.internal.InvocationWrapper.enforceTransactionPolicy(InvocationWrapper.java:268)

    at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:88)

    at weblogic.ejb.container.internal.BaseLocalObject.__WL_preInvoke(BaseLocalObject.java:70)

    at weblogic.ejb.container.internal.TimerDrivenLocalObject.preInvoke(TimerDrivenLocalObject.java:35)

    to weblogic.ejb.container.timer.TimerHandlerImpl$ TimerObject.execute (TimerHandlerImpl.java:77)

    at weblogic.ejb.container.timer.TimerHandlerImpl.executeTimer(TimerHandlerImpl.java:53)

    at weblogic.ejb.container.timer.ClusteredTimerImpl.timerExpired(ClusteredTimerImpl.java:118)

    at weblogic.scheduler.ejb.internal.EJBListenerWrapper.executeTimer(EJBListenerWrapper.java:59)

    at weblogic.scheduler.ejb.internal.EJBListenerWrapper.timerExpired(EJBListenerWrapper.java:50)

    to weblogic.scheduler.TimerState$ $1 2.run(TimerState.java:200)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)

    to weblogic.scheduler.TimerState$ 1.run(TimerState.java:197)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)

    This problem seems to be caused by bugs:

    Bug 16730647 - ejb 3.1 timer can be deployed to a cluster weblogic 12 c - java.lang.nullpoint

    The patch is available for 12.1.2

    If please try to apply the patch and let us know your results

    Using OPatch 13.1 for Oracle Fusion Middleware 12 c (+ 12.1.2) (Doc ID 1587524.1)

    Best regards

    Luz

  • How to adopt the validation of level entity such as BC ADF using EJB/JPA?

    I explore how to implement validation to entity level using the EJB/JPA instead of ADF BC. (Note: I use JDeveloper + ADF 12 c)

    1. I cannot add validation attribute level in the ADF (Data Control) of EJB model layer. but it is not enough. I can just code partial UI validation here.

    2. I googled and find that someone is using jsr-303-bean-validation. What is a unique choice? How the entity-level validation code?

    Validation of the JPA EJB ADF application entity

    3. I want to implement certain business validation and processing business in the layer of business ADF service, as in the EJB method.

    I did a simple test to simulate an exception, but I found the exception has been handled incorrectly in the layer of binding of ADF and error dialog box prompt: DCA-29000: Unexpected exception caught: java.lang.reflect.InvocationTargetException, msg = null.

        public Departments persistDepartments(Departments departments) {
            if(true){
              throw new RuntimeException("persistDepartments");
            }
            em.persist(departments);
            return departments;
        }
    
    
    
    

    Any expert can help? will I have to rewrite the ADF Model layer error handling? How to code the validation in EJB? you will need to take local and manipulate it in class in the ADF error handling model layer? where can I find a demo?

    4. I want to introduce a layer of application service between EJB session façade and JPA entity for the re-use of the company.  but I found JDeveloper helps me to do anything. I do code manually, when I create EJB session façade, it always integrate directly with JPA entity inside.  I expect that my application service is class instead of the EJB POJO.  Session EJB façade summons enforcement and demand serviceshall call JPA entity services.  is this possible? any sugguestion?

    Thank you

    Qn1, the ADF Model layer Validation are supported at the level of the validation attribute. It is confirmed.

    Qn2, it seems that this is a better solution, but is not Explorer so far.

    Qn3 is resloved by creating a custom error handler to extract a validation thrown from EJB exception and at the same time, it cannot be avoided that the thrown exception of service business layer is still dumped at MTS-out.

    Qn4 is reslolved by employment Commission to inject POJO, EJB session faade and inject POJO EntityManager (use JTA transaction).

    Thanks to you all!

  • Why Distributed Transaction error at the Message bean but not not Backing Bean?

    Hi guys,.

    * Update * I read the second post first.

    Using JDeveloper 12.1.2.0.0 and integrated WebLogic server of the same version.

    I have an ADF program where a draft of the application using JDBC in a message bean.  If I create an Application Module within the project and then sign in using its connection (java: comp/env/jdbc/MyAdfConnDS), then the code below works fine.  However, if I search connection JDBC (jdbc/MyJdbcDS), I have configured in WebLogic myself, then I distributed transaction errors.  How can I configure my JDBC connection to imitate the one who creates the AppModule?  This way I can run prepared explicitly stated and validation of the call?

    Here is my code JDBC

            conn.setAutoCommit(false);
            PreparedStatement statement = conn.prepareStatement(sql);
            statement.setLong(1, companyAccountId);
    // errors here
            statement.execute();
            conn.commit();
            statement.close();
    
    
    

    Which results in the error

    // prepared statement.
    DELETE BUSINESS_PARTNERS WHERE MASTER_TYPE_KEY = 'C' AND COMPANY_ACCOUNT_ID = ?
    java.sql.SQLException: Cannot call commit when using distributed transactions
                at weblogic.jdbc.wrapper.JTAConnection.commit(JTAConnection.java:373)
                at com.sample.myProduct.jms.clients.MyClient.deleteEntities(MyClient.java:211)
                at com.sample.myProduct.jms.clients.MyClient.importData(MyClient.java:155)
                at com.sample.myProduct.jms.beans.ImportMessageBean.onMessage(ImportMessageBean.java:91)
                at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:575)
                at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
                at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:375)
                at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4855)
                at weblogic.jms.client.JMSSession.execute(JMSSession.java:4529)
                at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3976)
                at weblogic.jms.client.JMSSession.access$000(JMSSession.java:120)
                at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5375)
                at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:550)
                at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
                at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
    
    
    

    Here is a screenshot of all the available drivers: www.williverstravels.com/JDev/Forums/Threads/3544909/drivers.png, as well as the configuration of the transaction screen www.williverstravels.com/JDev/Forums/Threads/3544909/config.png

    I've tinkered enough to feel quite strongly, it is not an error in coding, but rather something in Weblogic.  I read what I can, but I don't know how the AppModule creates connections.  I would not add an AppModule just to retrieve its data source / login information if I don't.

    Ideas?

    Obviously, your message bean is configured to participate in a global transaction (for example, a JTA transaction). It is a behavior of the default message bean, even if you have not explicitly configured. When you get and use a JDBC connection in your message bean, this connection is attached to and participates in the overall transaction message bean (because you used compatible driver Oracle XA, it is seen on the 1st screenshot in your post), so you cannot perform local validation on the JDBC connection.

    Commit / rollback in this case can only be performed on the overall transaction (if the message bean is configured with the transactions managed by container) to be automatically or manually on the UserTransaction object (if the message bean is configured with bean-managed transactions). In other words, you must remove the conn.commit () statement, which is erroneous and obsolete when it is used in your message bean. If the message bean uses transactions managed by container, the container will commit / rollback automatically at the end of the method all the resources involved in the overall transaction (including your JDBC connection). If the method completed successfully (without exception), a validation will be performed. If the method fails (i.e., it ends with an exception), a cancellation will be made. If the message bean uses bean-managed transactions, the transaction is committed/restored when you explicitly call UserTransaction.commit () or UserTransaction.rollback ().

    The code above worked in a managed bean because JSF, ADF BC or ADF Faces applications require and participate in JTA transactions, then your JDBC connection has not been attached to a global transaction and you were able to perform local validation on the JDBC connection.

    You have two options to solve the problem. It depends on if you want your operations of JDBC to be in a global transaction with the bean of the message itself and its other actions or not. If they must be in a global transaction, then just remove the conn.commit () statement from your code. If they shouldn't be in a global transaction, you must either configure the message bean not to participate in global transactions or to configure the data source to use the «of the (thin) Oracle driver...» "instead of"Oracle (XA Thin)... driver. " ». (Remember to score the DataSource DO NOT to participate in a global transaction in the 2nd page of the data source configuration dialog in the management of WLS Console).

    NB. I highly recommend that you keep the global transactions. If you choose not to use a global transaction, it can happen that you committed the JDBC operations but an exception that happens after that, so the JMS message is not removed from the queue of messages and it will be processed after that, which causes the same operations of JDBC to be played and committed twice which must be avoided.

    Dimitar

  • Performing database using EJB 3.0 operations

    I need to create a session bean that will perform operations on the database backend. I'm new to EJB 3.0 and need a fresh direction to the solution
    That's what I think, it's supposed to be done

    1. create the operations interface marking stateless bean.
    2. create the bean implementation for above
    3 Init step will require to connect me to the Oracle database. Now am confused how it will get the connection details? Is there a way to extract the url username and password using resources which are accessible berlot since in the implementation of the bean?
    4. Bean method will perform the update, read sector
    5 predestroy closes the connection
    6. a customer will simply call this ejb with some input parameters

    Please let me know if something wrong doing here

    If you use the EJB technology for which it is designed, the container (server) will manage the transaction (and also the connections to the database) for you, so no creation or cleaning the connections on your part. I advise you to read in an APP that is designed to be used in conjunction with tech EJB. Enterprise Javabeans 3.0 books and Pro EJB 3: Java Persistence API can help you a lot.

  • Using Hibernate with EJB on Weblogic Server ADF platform

    Hi all
    We use 11.1.1.4 Jdeveloper and WLS 10.3
    I tried to use hibernation on my project according to this good link, with Hibernate on Weblogic EJB
    I wanto use Hibernate tool as toplink and eclipselink cannot reach the question on the generation of Update* ddl on schema, they can only re - create the tables-no actual update.

    First of all, I got internet related jars: http://www.2hotfile.com/di-LSBU.png
    cglib - 2.2
    ANTLR - 2.7.6
    Commons-collections - 3.1
    dom4j - 1.6.1
    Hibernate3
    sleep extended validator - 4.1.0.Final
    Javassist - 3.9.0.GA
    JTA - 1.1
    SLF4J-api - 1.5.11
    SLF4J-nop - 1.5.11

    Then I added to the template as a library dependencies project: http://www.2hotfile.com/di-GMSZ.png

    configured persistence.xml as below:
    <? XML version = "1.0" encoding = "windows-1252"? >
    < persistence xmlns = "http://java.sun.com/xml/ns/persistence."
    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
    xsi: schemaLocation = "http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd".
    version = "1.0" >
    < name of persistence - unit = "VakkoEJBModel" transaction-type = "RESOURCE_LOCAL" >

    org.hibernate.ejb.HibernatePersistence < provider > < / provider >
    jdbc/VakkoDS < jta-data-source > < / jta-data-source >

    Properties of <>
    < name = "hibernate.jndi.url property" value="t3://127.0.0.1:7001" / > "
    < name = "hibernate.connection.datasource property" value = "jdbc/VakkoDS" / > "
    "< name ="hibernate.transaction.manager_lookup_class property"value =" org.hibernate.transaction.WeblogicTransactionManagerLookup "/ >
    "< name ="hibernate.dialect property"value =" org.hibernate.dialect.Oracle10gDialect "/ >
    < name = "hibernate.hbm2ddl.auto property" value = "Refresh" / > "
    < name = "hibernate.current_session_context_class property" value = "jta" / > "
    < / properties >


    < / persistence - unit >
    < / persistence >

    WebLogic - application.Xml

    <? XML version = "1.0" encoding = "ISO-8859-1? >
    < weblogic application >
    < prefer-application-packages >
    < package name > antlr.* < / package-name >
    < package name > org.hibernate. * < / package-name >
    <!-name-package > org.apache.commons.logging. * < / package-> name
    <!-name-package > org.w3c.dom. * < / package-> name
    < / prefer-application-packages >
    < / weblogic application >


    WebLogic-ejb - jar.Xml
    <? XML version = "1.0" encoding = "UTF - 8"? >
    < weblogic-ejb-jar xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
    xsi: schemaLocation = "http://www.bea.com/ns/weblogic/weblogic-ejb-jar http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd".
    xmlns = "http://www.bea.com/ns/weblogic/weblogic-ejb-jar" >

    < / weblogic-ejb-jar >


    EJB - jar. XML
    <? XML version = "1.0" encoding = "windows-1252"? >
    < ejb - jar / >

    And I added to the setDomainEnv.cmd this line:
    the EXT_PRE_CLASSPATH=C:\jarlar\hibernate-3.3.2\antlr-2.7.6.jar value; C:\jarlar\hibernate-3.3.2\commons-collections-3.1.jar; C:\jarlar\hibernate-3.3.2\dom4j-1.6.1.jar; C:\jarlar\hibernate-3.3.2\hibernate3.jar; C:\jarlar\hibernate-3.3.2\javassist-3.9.0.GA.jar; C:\jarlar\hibernate-3.3.2\jta-1.1.jar; C:\jarlar\hibernate-3.3.2\slf4j-API-1.5.11.jar; C:\jarlar\hibernate-3.3.2\slf4j-NOP-1.5.11.jar; C:\jarlar\hibernate-3.3.2\bytecode\cglib\cglib-2.2.jar; C:\Oracle\Middleware_11.1.1.4\modules\ejb3-persistence-3.3.1.jar; Hibernate Validator - 4.1.0.final.jar;

    Profile of deployment would be accessible by clicking on these links:
    http://www.2hotfile.com/di-XV68.PNG
    http://www.2hotfile.com/di-8YC9.PNG
    http://www.2hotfile.com/di-ADR4.PNG

    And I tried to manipulate the content of the ear file according to this information: http://middlewaremagic.com/weblogic/wp-content/uploads/2010/06/EAR_Application_Diagram.jpg

    under ear\META-INF\application.xml
    <? XML version = "1.0" encoding = "windows-1252"? >
    < application xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version = "5" xmlns = "http://java.sun.com/xml/ns/javaee" >
    < display name > ejb1 < / display-name >
    <>module
    ejb1.jar < ejb > < / ejb >
    < / module >
    < / application >

    under ear\META-INF\weblogic-application.xml
    <? XML version = "1.0" encoding = "windows-1254'? >
    < application weblogic xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd" xmlns = "http://www.bea.com/ns/weblogic/weblogic-application" >
    < prefer-application-packages >
    < package name > org.hibernate. * < / package-name >
    < package name > antlr.* < / package-name >
    <!-name-package > org.apache.commons.logging. * < / package-> name
    <!-name-package > org.w3c.dom. * < / package-> name
    < / prefer-application-packages >
    <>earpiece
    oracle.adf.share.weblogic.listeners.ADFApplicationLifecycleListener <-listener class > < / listener class >
    < / earphone >
    <>earpiece
    oracle.mds.lcm.weblogic.WLLifecycleListener <-listener class > < / listener class >
    < / earphone >
    < library-ref >
    < name of the library - > adf.oracle.domain < / library name >
    < / library-ref >
    < / weblogic application >

    The files that existed in the directory ejb1.ear\ejb1.jar\META-INF\ even with the source of the template project folder (these were created by jdeveloper, deployment after deployment profile process which previously explaint)

    ear of content shown here: http://www.2hotfile.com/di-23X6.png

    When I deploy the project to weblogic using the JDeveloper method or http://127.0.0.1:7101 / console /. Except instead of exception
    < 10 December 2012 16:31:54 EET > < WARNING > < netuix > < BEA-423420 > < Redirect is executed to start or refresh action. Redirect URL is /console/console.portal?_nfpb=true & _pageLabel = AppDeploymentsControlPage. >
    < 10 December 2012 16:32:45 EET > < error > < hats > < BEA-149265 > < error has occurred in the execution of the request for deployment with the ID ' 1355149965087 'in task 2'. Error is: "weblogic.application.ModuleException: Exception preparation module: EJBModule (ejb1.jar)"
    '
    weblogic.application.ModuleException: Exception preparation module: EJBModule (ejb1.jar)

    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:469)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
    to weblogic.application.internal.flow.DeploymentCallbackFlow$ 1.next(DeploymentCallbackFlow.java:517)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
    Truncated. check the log file full stacktrace
    Caused by: weblogic.deployment.EnvironmentException: persistence unit of treatment VakkoEJBModel of the ejb1.jar module error: error instantiating class PersistenceUnit VakkoEJBModel org.hibernate.ejb.HibernatePersistence persistence provider: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence
    at weblogic.deployment.BasePersistenceUnitInfoImpl.getPersistenceProvider(BasePersistenceUnitInfoImpl.java:375)
    at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393)
    at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:386)
    to weblogic.deployment.BasePersistenceUnitInfoImpl. < init > (BasePersistenceUnitInfoImpl.java:158)
    to weblogic.deployment.PersistenceUnitInfoImpl. < init > (PersistenceUnitInfoImpl.java:39)
    Truncated. check the log file full stacktrace
    >
    < 10 December 2012 16:32:45 EET > < WARNING > < hats > < BEA-149004 > < failures have been detected all introducing deploy task for application 'ejb1' >.
    < 10 December 2012 16:32:45 EET > < WARNING > < hats > < BEA-149078 > < message 149004 track battery
    weblogic.application.ModuleException: Exception preparation module: EJBModule (ejb1.jar)

    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:469)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
    to weblogic.application.internal.flow.DeploymentCallbackFlow$ 1.next(DeploymentCallbackFlow.java:517)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
    Truncated. check the log file full stacktrace
    Caused by: weblogic.deployment.EnvironmentException: persistence unit of treatment VakkoEJBModel of the ejb1.jar module error: error instantiating class PersistenceUnit VakkoEJBModel org.hibernate.ejb.HibernatePersistence persistence provider: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence
    at weblogic.deployment.BasePersistenceUnitInfoImpl.getPersistenceProvider(BasePersistenceUnitInfoImpl.java:375)
    at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393)
    at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:386)
    to weblogic.deployment.BasePersistenceUnitInfoImpl. < init > (BasePersistenceUnitInfoImpl.java:158)
    to weblogic.deployment.PersistenceUnitInfoImpl. < init > (PersistenceUnitInfoImpl.java:39)
    Truncated. check the log file full stacktrace
    >
    < 10 December 2012 16:32:45 EET > < error > < Console > < BEA-240003 > < Console met the following error weblogic.application.ModuleException: Exception preparation module: EJBModule (ejb1.jar)

    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:469)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
    to weblogic.application.internal.flow.DeploymentCallbackFlow$ 1.next(DeploymentCallbackFlow.java:517)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
    to weblogic.application.internal.BaseDeployment$ 1.next(BaseDeployment.java:613)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
    at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
    at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
    to weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$ 000 (DeploymentReceiverCallbackDeliverer.java:13)
    to weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$ 1.run(DeploymentReceiverCallbackDeliverer.java:46)
    to weblogic.work.SelfTuningWorkManagerImpl$ WorkAdapterImpl.run (SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: weblogic.deployment.EnvironmentException: persistence unit of treatment VakkoEJBModel of the ejb1.jar module error: error instantiating class PersistenceUnit VakkoEJBModel org.hibernate.ejb.HibernatePersistence persistence provider: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence

    at weblogic.deployment.BasePersistenceUnitInfoImpl.getPersistenceProvider(BasePersistenceUnitInfoImpl.java:375)
    at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393)
    at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:386)
    to weblogic.deployment.BasePersistenceUnitInfoImpl. < init > (BasePersistenceUnitInfoImpl.java:158)
    to weblogic.deployment.PersistenceUnitInfoImpl. < init > (PersistenceUnitInfoImpl.java:39)
    at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:349)
    at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:263)
    to weblogic.deployment.ModulePersistenceUnitRegistry. < init > (ModulePersistenceUnitRegistry.java:69)
    at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistry(EJBModule.java:223)
    to weblogic.ejb.container.deployer.EJBModule$ 1.execute(EJBModule.java:324)
    at weblogic.deployment.PersistenceUnitRegistryInitializer.setupPersistenceUnitRegistries(PersistenceUnitRegistryInitializer.java:62)
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:393)

    What are my mistake/s or incomplete?
    Please, help me and excuse my bad English. Thanks in advance

    Note that you are missing a jar file

    Caused by: weblogic.deployment.EnvironmentException: persistence unit of treatment VakkoEJBModel of the ejb1.jar module error: error instantiating class PersistenceUnit VakkoEJBModel org.hibernate.ejb.HibernatePersistence persistence provider: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence

    This class is part hibernate entitymanager * .jar (some versions can be found here: http://www.findjar.com/class/org/hibernate/ejb/HibernatePersistence.html)

    Just a little tip, it is unwise to change the classpath of WebLogic - you never know want, you could be wasting.

    The way to load classes before other classes of WebLogic is to use class filter loading (just as you have provided in your weblogic application. (XML), i.e.,.

    
        antlr.*
    
    

    To Hibernate running on WebLogic examples here:
    -http://middlewaremagic.com/weblogic/?p=5861
    -http://middlewaremagic.com/weblogic/?p=6725
    -http://middlewaremagic.com/weblogic/?p=7478
    -http://middlewaremagic.com/weblogic/?p=8104 (in the section of the migration, shows how Set up Hibernate4)

  • Contano managed transaction, when XA transaction is complete?

    Hello

    I used container managed transaction. And I want to understand when an XA transaction is considered to be "started" and when he is "done"?

    Assume the request stream is:
    JSF GUI-> managed-> JMS-> EJB Bean-> database.

    are there differences if the flow of the application like this:
    JSF-> managed Bean-> JMS1-> EJB-> JMS2-> GUI EJB-> JMS3-> database.

    The number of transactions XA is there in this case?

    Could you suggest if there's around tutorial to start with the XA transaction?

    Thank you

    Edited by: CardM November 2, 2012 12:38 AM

    Yes, I did.

    It's difficult material guy, you won't get there by guessing, hacking the code and ask questions in a forum. I strongly advise to read in JTA (Java Transaction API), get a good book on EJB technology (I recommend "Enterprise Javabeans 3.1'") and a very good book on JMS (cannot advise really something here). Google is your friend, and so are the Amazon book reviews.

  • com.tangosol.coherence.transaction.exception.UnableToAcquireLockException:

    I have the following code, with result the exception below,

    INFO: javax.ejb.EJBTransactionRolledbackException: EJB Exception:; nested exception is: com.tangosol.coherence.transaction.exception.RollbackException: the transaction has been restored: com.tangosol.coherence.transaction.exception.RollbackException: the transaction has been restored: com.tangosol.coherence.transaction.exception.UnableToAcquireLockException: impossible to acquire the lock key write: 89d0ebd1-82dc-4711-b805-eba5761c7e9b; nested exception is: com.tangosol.coherence.transaction.exception.RollbackException: the transaction has been restored: com.tangosol.coherence.transaction.exception.RollbackException: the transaction has been restored: com.tangosol.coherence.transaction.exception.UnableToAcquireLockException: impossible to acquire the lock key write: 89d0ebd1-82dc-4711-b805-eba5761c7e9b


    Cache configuration: transactional
    ======================

    <!--
    Transactional caching scheme.
    ->
    < transactional system >
    < scheme name > transactional example < / system-name >
    < service name > TransactionalCache < / service-name >
    < serializer >
    < instance >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    type string < param > < / param-type >
    chips-pof - config.xml < param-value > < / param-value >
    < / init-param >
    < / init-params >
    < / body >
    < / serializer >
    < number of threads > 3000 < / thread count >
    < autostart > true < / autostart >
    < request-timeout > 30000 < / timeout request >
    < / transactional system >
    < / cache-plans >
    < / cache-config >


    Code
    =====
    tokenCache = CacheFactory.getCache ("tokenCache");
    EqualsFilter filterNE = new EqualsFilter ("getNeID", Networkid);
    EqualsFilter stateNE = new EqualsFilter ("getState", TOKEN_AVAILABLE_INT);
    AndFilter andFilter = new AndFilter (filterNE, stateNE);
    LimitFilter limitFilter = new LimitFilter (andFilter, PAGE_SIZE);
    Update ValueUpdater = new ReflectionUpdater("setState");
    UpdaterProcessor updaterProcessor = new UpdaterProcessor (updater, TOKEN_RESERVED_INT);
    Map tokenMap = tokenCache.invokeAll (tokenCache.keySet (limitFilter), updaterProcessor);


    I don't know why and how remedy.

    Published by: Ankit Asthana 9 January 2012 18:55

    Hi Pierre,.

    UnableToAcquireLockException indicates that the write operation was not able to acquire a write lock. Once an entry is made in a transaction, the entrance is write-locked until the transaction is complete. If you have multiple threads, update the entries of same, you can modify your code to handle the exception and retry the operation.

    Thank you
    Tom

  • Persistence, shared between the EJB and WAR projects

    Hello

    I created an Enterprise Application in netbeans which an EJB project and archive web. This can be expanded further at a later date by the presence of a client application as well. I'm still pretty new to this so you don't have to forgive me if it is a simple problem. I have a persistence unit (persistence.xml) that I need to share between the two WAR and EJB, but so far, does not feel very lucky. I have read the various responses and they say I should have the EAR that is constructed in the following way:

    Project.ear
    =======
    META-INF/MANIFEST. MF
    lib/Persistence.jar
    -> META-INF
    -> META-INF/persistence.xml
    project - ejb.jar
    project - war.war

    When I try to compile, if I get the following messages among two EE modules:

    Note: The XML persistence [META-INF/persistence.xml] has not been found. NO GENERATION will occur! Please ensure that a persistence XML is available either from the directory CLASS_OUTPUT [META-INF/persistence.xml] or by using the eclipselink.persistencexml property to specify its location.

    I tried to copy the persistence.xml in the META-INF directory in the EAR file and defining the eclipselink.persistencexml=META-INF/persistence.xml, but it still shows the same thing. Is this a classpath problem or is something else wrong?

    Thank you very much

    The EAR is a good idea, but you put the META-INF/persistence.xml in your ejb module. The EJB is where you do all your (managed container) transactional stuff, so do call in your EJB since the WAR instead of trying to share a persistence between modules unit.

Maybe you are looking for