JDBC, JMS and EJB transactions - possible problem?

Hello,
          I am using Oracle 9, Weblogic 8.1 SP 4, MyEclipse and
          XDoclet.
          In my current project I have the following piece of code
          in one of my message driven beans (code cited as pseudocode
          without unnecessary details):
          * @ejb.bean name="MyMessageProcessor"
          * display-name="Display name for a MyMessageProcessor"
          * jndi-name="ejb/MyMessageProcessor"
          * description="Bean MyMessageProcessor"
          * destination-type="javax.jms.Queue"
          * transaction-type="Container"
          * acknowledge-mode="Auto-acknowledge"
          * subscription-durability="Durable"
          * generate="false"
          * @ejb.transaction type="Required"
          public class MyMessageProcessor implements MessageDrivenBean, MessageListener {
          public void onMessage(Message msg) {
               try {
                    //obtaining connections to two different databases via JNDi
                    java.sql.Connection connOne =
                    ((DataSource)ctx.lookup("DataSourceOne")).getConnection();          
                    java.sql.Connection connTwo =
                         ((DataSource)ctx.lookup("DataSourceTwo")).getConnection();
                    // performing some UPDATEs and INSERTs on connOne and connTwo
                    // calling some other methods of this bean
                    //creating the reply JMS message and sending it to another JMS queue
                    Message msgTwo = this.createReplyMessage(msg)
                    this.queueSender.send(msgTwo);
                    //commiting everything
                    this.queueSession.commit();          
               } catch (Exception ex) {
               try {
                    if (this.queueSession!=null) this.queueSession.rollback();
               } catch (JMSException JMSEx) {};     
               this.context.setRollbackOnly();
          Some days ago (before the final remarks from my client) there used to be only one DataSource configurated on the basis of the
          connection pool with non-XA jdbc driver. Everything worked fine
          including the transactions (if anything wrong happend not only wasn't the replymessage sent, but also no changes were written
          to database and the incomming message was thrown back to the my bean's
          queue).
          When I deployed the second DataSource I was informed by an error message, that only one non-transactional resource may
          participate in a global transaction. When I changed both datasources
          to depend on underlying datasources with transatcional (XA) jdbc drivers, everything stopped working. Even if
          EJB transaction was theoretically successfully rolledbacked, the changed were written to the database
          and the JMS message wasn't resent to the JMS queue.
          So here are my questions:
               1. How to configure connection pools to work in such situations? What JDBC drivers should I choose?
               Are there any global server configurations, which may influence this situation?
               2. Which jdbc drivers should I choose so that the container was able to rollback the database transactions
               (of course, if necessary)?
               3. Are there any JMS Queue settings, which would disable the container to send message back to the
               queue in case of setRollbackOnly()? How should be the Queue configurated?
          As I am new to the topic and the deadline for the project seems to be too close I would be grateful
          for any help.
          This message was sent to EJB list and JDBC list.
          Sincerely yours,
          Marcin Zakidalski

Hi,
          I found these information extremely useful and helpful.
          The seperate transaction for sending messages was, of course, unintentional. Thanks a lot.
          Anyway, I still have some problems. I have made some changes to the
          code cited in my previous mail. These changes included changing QueueSessions
          to non-transactional. I also set the "Honorate global transactions" to true.
          I am using XA JDBC driver. After setting "Enable local transactions" to false
          (I did it, because I assume that JDBC transactions should be part on the global
          EJB transaction) I got the following error:
          java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA
          driver supports performing SQL operations with no global transaction, explicitly allow it by setting
          "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local
          transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To
          complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().
          I have also inspected the calls of methods of bean inside of onMessage() method just to check, whether
          the transactions are correctly initialized (using the weblogic.transaction.Transaction class).
          My questions are as follows:
          1. Any suggestions how to solve it? I have gone through the google answers on that problem and only
          thing I managed to realize that JDBC must start its own transaction. Is there any way to prohibit it
          from doing that? Can using setAutocommit(true/false) change the situation for better?
          2. How to encourage the JDBC driver to be a part of EJB transaction?
          3. As I have noticed each of ejb method has its own transactions (transactions have different
          Xid). Each method of the bean has "required" transaction attribute. Shouldn't it work in such
          way that if already started transaction exists it is used by the called method?
          4. The DataSources are obtained in my application via JNDI and in the destination environment I will have slight
          impact on the configuration of WebLogic. What is least problematic and most common WebLogic configuration which would
          enable JDBC driver to participate in the EJB transaction? Is it the WebLogic configuration problem or can it be
          solved programmically?
          Currently my module works quite fine when "enable local transactions" for DataSources is set to true, but this way
          I am loosing the ability to perform all actions in one transaction.
          Any suggestions / hints are more than welcomed. This message was posted to jdbc list and ejb list.
          Marcin

Similar Messages

  • Foreign JMS and Enlisting Transactions?

    I'm working on implementing an XA interface layer to an implementation of a foreign JMS provider and am having a problem with enlisting XA transactions in WebLogic.
              I implemented a simple JNDI that stores and retrieves serialized versions of classes in the local filesystem.
              I create an XATopicConnectionFactory named ambxatcf and a Topic named ChatterTopic and store them in there.
              The XATopicConnection implements XAConnection.
              I put a client jar in bea/weblogic91/samples/domains/wl_server/lib/ which contains the JNDI code and all of my XA classes which call the JMS.
              That gets picked up by the server on startup.
              In the Web Logic Admin Console:
              I create a Foreign Server under JMS Modules, ambrosiaServer.
              I set the JNDI Initial Context Factory set to my JNDI InitialContext class and the JNDI Properties is the path to my JNDI filestore so that it can find the serialized objects.
              I create a Foreign Destination in this server which has a Local JNDI Name: Chatter and Remote JNDI Name: ChatterTopic
              And then also in this server, I create a Foreign Connection Factory, Local JNDI Name: ambxatcf and Remote JNDI Name: XATopicConnectionFactory.
              Then in Deployments, I Install the jar containing my bean and Start it.
              Then I run the client and the bean prints out the XATopicConnectionFactory and it's the one that came out my JNDI.
              I have messages in my XATopicConnectionFactory, XATopicConnection and XATopicSession code so I know they're getting called.
              What's not getting called is XATopicSession.getXAResource() or my XAResourceImpl.start() or XAResourceImpl.commit().
              This happens whether I have the bean set up for bean managed or container managed transactions.
              I'm testing against WebLogic 9.1.
              Thanks,
              Don Hermes

    Hi Tom,
              Thank you for your response.
              I saw the article in the 8.1 documentation but I also found the following in the 9.1 docs.
              So, I assumed it would work.
              Was that assumption wrong?
              Thanks,
              Don
              =====================
              http://e-docs.bea.com/wls/docs91/jms/j2ee.html
              Automatically Enlisting Transactions
              This feature works for either WebLogic JMS implementations or for third-party JMS providers that support two-phase commit transactions (XA protocol). If a wrapped JMS connection sends or receives a message inside a transaction context, the JMS session being used to send or receive the message is automatically enlisted in the transaction through the XA capabilities of the JMS provider. This is the case whether the transaction was started implicitly because the JMS code was invoked inside an EJB with container-managed transactions enabled, or whether the transaction was started manually using the UserTransaction interface in a servlet or an EJB that supports bean-managed transactions.

  • Non transactional data source and ejb transaction

    Inside an ejb method with trans-attribute = Required,
    Do a bunch of things using a transactional data source and a bunch of things using
    a non trasnactional data source.
    Looks like the time spent doing the non-transactional data source related work
    does not count for the transaction timeout defined for the ejb.
    So, what happens here, the ejb transaction is suspended ( when I start using the
    non transactional ds ) ?

    Hi,
    "siddiqut" <[email protected]> wrote in message news:3fa7c79d$[email protected]..
    Inside an ejb method with trans-attribute = Required,
    Do a bunch of things using a transactional data source and a bunch of things using
    a non trasnactional data source.
    Looks like the time spent doing the non-transactional data source related work
    does not count for the transaction timeout defined for the ejb.
    So, what happens here, the ejb transaction is suspended ( when I start using the
    non transactional ds ) ?The transaction is not suspended when you call something
    which is not non-transactional.
    Regards,
    Slava Imeshev

  • JMS and XA Transaction

              Hy,
              I see that the JMS is integrated as XA Transaction directly from the container management
              on the Weblogic version 7.0.
              I test the same testcase on the Weblogic 6.0 but it didn't work automatically (the
              publish never commit).
              Starting from wich version of Weblogic the JMS-XA Transaction is integrated ?
              Thank you.
              Luigi
              

              Hy,
              I see that the JMS is integrated as XA Transaction directly from the container management
              on the Weblogic version 7.0.
              I test the same testcase on the Weblogic 6.0 but it didn't work automatically (the
              publish never commit).
              Starting from wich version of Weblogic the JMS-XA Transaction is integrated ?
              Thank you.
              Luigi
              

  • Bootcamp and VMWare Fusion, possible problem with Bootcamp, cant see USB.

    Hey,
    Would really appreciate your help. So I have MBP mid 2010 with the latest version of OSX Mountain Lion and decided to install Windows 7 on it. I gave it to the professional IT guy, who installed Windows 7 through the latest version of VMWare Fusion. It is not bad overall, but at times incredible slow (which might be because of my slow processor).
    So I decided to install Windows 7 through the BootCamp Assistant - USB way. And did the following steps:
    1)Format USB, put Windows 7 .iso image on it
    2) Installed the latest Windows software through the Bootcamp (step2 tick). However, it said that the latest version would be installed only after Windows 7 is installed (in step3 tick). I clicked OK and moved to Step 3
    3) I started Installing Windows and had a few errors (which were solved by repairing the HDD after rebooting in recovery mode), but all went fine until almost the end. Before the bar almost moved to the end my macbook went to reboot and I though it was all done and ready. I clicked the alt at *ding* sound and no USB was detected.
    I checked disk utility and the thing was portioned.
    I was thinking that MBP doesn't recognize the second Windows installed, and VMWare Fusion needs to be deleted in order to run Bootcamp. I haven't deleted anything, wanted to ask for advice first.
    Any one could think of what's wrong? Thank you.

    You can only install Windows from a USB in one of these computers:
    - MacBook Pro with Retina display.
    - MacBook Air.
    - Mac mini (Mid 2010 and newer).
    - iMac (Late 2012).
    Your Mac doesn't support the Windows installation through a USB drive. However, you have installed Windows through a USB drive. What did you do?
    You did an EFI installation (or a native installation). Apple doesn't support this option because of the huge number of problems it gives, and you have probably erased OS X (or you erased the Windows partition that Boot Camp created, both possibilities). The error you mentioned in 3) was probably that the Windows installer detected that you have a MBR disk instead of a GPT one, and you erased everything.
    First of all, to make sure that you erased everything, hold the Option (Alt) key while your Mac is starting. If you see the OS X partition, start up from it, and make a complete backup of your files with Time Machine.
    Then, what I recommend you is to erase the whole drive by starting in Internet Recovery (hold Command, Option and R keys while your Mac is starting), and use the Time Machine option to restore your files

  • Com.sap.aii.adapter.jdbc.svc and com.sap.aii.adapter.jms.svc don't start

    Hello,
    In order to configure JMS Receiver Adapter to access Websphere Application Server 7.0, I have recently deployed file com.sap.aii.adapter.lib.sca with the following libraries:
    com.sap.aii.adapter.lib_api.jar
    com.ibm.ws.ejb.thinclient_7.0.0.jar
    com.ibm.ws.orb_7.0.0.jar
    com.ibm.ws.sib.client.thin.jms_7.0.0.jar
    com.ibm.ws.runtime.jar   
    javax.j2ee.jms.jar
    The communication channel can reach the queue but when I send a message it fails because services sap.com/com.sap.aii.adapter.jdbc.svc and com.sap.aii.adapter.jms.svc are not started.
    Checking dev_server0 file I found the following error.
    ==============================================================================================
    Service com.sap.aii.adapter.jdbc.svc start ================= ERROR =================
    com.sap.engine.frame.ServiceException: Could not obtain an initial context due to a communication failure. Since no provider
    URL was specified, the default provider URL of "corbaloc:iiop:1.0(at)sapdpi-lpar:2809/NameService" was used.  Make sure that any
    bootstrap address information in the URL is correct and that the target name server is running.  Possible causes other than
    an incorrect bootstrap address or unavailable name server include the network environment and workstation network configurati
    on.
    at com.sap.aii.adapter.jdbc.SapAdapterServiceFrameImpl.start(SapAdapterServiceFrameImpl.java:151)
    at com.sap.engine.core.service630.container.ServiceRunner.startFrame(ServiceRunner.java:155)
    at com.sap.engine.core.service630.container.ServiceRunner.startService(ServiceRunner.java:113)
    at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:60)
    at com.sap.engine.frame.core.thread.Task.run(Task.java:73)
    at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:162)
    at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:260)
    Caused by: javax.naming.ServiceUnavailableException: Could not obtain an initial context due to a communication failure. Sinc
    e no provider URL was specified, the default provider URL of "corbaloc:iiop:1.0(at)sapdpi-lpar:2809/NameService" was used.  Make
    sure that any bootstrap address information in the URL is correct and that the target name server is running.  Possible caus
    es other than an incorrect bootstrap address or unavailable name server include the network environment and workstation netwo
    rk configuration. [Root exception is org.omg.CORBA.TRANSIENT: java.net.ConnectException: Connection refused:host=sapdpi-lpar,
    port=2809  vmcid: 0x4942f000  minor code: 3586  completed: No]
    at com.ibm.ws.naming.util.WsnInitCtxFactory.mapInitialReferenceFailure(WsnInitCtxFactory.java:2228)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getWsnNameService(WsnInitCtxFactory.java:1414)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:944)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:865)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:545)
    at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:123)
    at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:798)
    at com.ibm.ws.naming.util.WsnInitCtx.rebind(WsnInitCtx.java:242)
    at com.ibm.ws.naming.util.WsnInitCtx.rebind(WsnInitCtx.java:255)
    at javax.naming.InitialContext.rebind(InitialContext.java:367)
    at javax.naming.InitialContext.rebind(InitialContext.java:367)
    at com.sap.aii.adapter.jdbc.SapAdapterServiceFrameImpl.start(SapAdapterServiceFrameImpl.java:100)
    ... 6 more
    Caused by: org.omg.CORBA.TRANSIENT: java.net.ConnectException: Connection refused:host=sapdpi-lpar,port=2809  vmcid: 0x4942f0
    00  minor code: 3586  completed: No
    at com.ibm.CORBA.transport.TransportConnectionBase.connect(TransportConnectionBase.java:425)
    at com.ibm.ws.orbimpl.transport.WSTransport.getConnection(WSTransport.java:436)
    at com.ibm.CORBA.transport.TransportBase.getConnection(TransportBase.java:187)
    at com.ibm.rmi.iiop.TransportManager.get(TransportManager.java:89)
    at com.ibm.rmi.iiop.GIOPImpl.getConnection(GIOPImpl.java:120)
    at com.ibm.rmi.iiop.GIOPImpl.locate(GIOPImpl.java:209)
    at com.ibm.rmi.corba.Corbaloc.locateUsingINS(Corbaloc.java:307)
    at com.ibm.rmi.corba.Corbaloc.resolve(Corbaloc.java:378)
    at com.ibm.rmi.corba.ORB.objectURLToObject(ORB.java:3721)
    at com.ibm.CORBA.iiop.ORB.objectURLToObject(ORB.java:3256)
    at com.ibm.rmi.corba.ORB.string_to_object(ORB.java:3619)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.stringToObject(WsnInitCtxFactory.java:1524)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getWsnNameService(WsnInitCtxFactory.java:1389)
    ... 16 more
    Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:522)
    at java.net.Socket.connect(Socket.java:470)
    at java.net.Socket.<init>(Socket.java:367)
    at java.net.Socket.<init>(Socket.java:180)
    at com.ibm.ws.orbimpl.transport.WSTCPTransportConnection.createSocket(WSTCPTransportConnection.java:270)
    at com.ibm.CORBA.transport.TransportConnectionBase.connect(TransportConnectionBase.java:354)
    ... 28 more
    Service com.sap.aii.adapter.jms.svc start ================= ERROR =================
    com.sap.engine.frame.ServiceRuntimeException: Could not obtain an initial context due to a communication failure. Since no pr
    ovider URL was specified, the default provider URL of "corbaloc:iiop:1.0(at)sapdpi-lpar:2809/NameService" was used.  Make sure t
    hat any bootstrap address information in the URL is correct and that the target name server is running.  Possible causes othe
    r than an incorrect bootstrap address or unavailable name server include the network environment and workstation network conf
    iguration.
    at com.sap.aii.adapter.jms.core.service.AdapterServiceFrameImpl.bindAdapter(AdapterServiceFrameImpl.java:171)
    at com.sap.aii.adapter.jms.core.service.AdapterServiceFrameImpl.start(AdapterServiceFrameImpl.java:125)
    at com.sap.engine.core.service630.container.ServiceRunner.startFrame(ServiceRunner.java:155)
    at com.sap.engine.core.service630.container.ServiceRunner.startService(ServiceRunner.java:113)
    at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:60)
    at com.sap.engine.frame.core.thread.Task.run(Task.java:73)
    at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:162)
    at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:260)
    Caused by: javax.naming.ServiceUnavailableException: Could not obtain an initial context due to a communication failure. Sinc
    e no provider URL was specified, the default provider URL of "corbaloc:iiop:1.0(at)sapdpi-lpar:2809/NameService" was used.  Make
    sure that any bootstrap address information in the URL is correct and that the target name server is running.  Possible caus
    es other than an incorrect bootstrap address or unavailable name server include the network environment and workstation netwo
    rk configuration. [Root exception is org.omg.CORBA.TRANSIENT: Connection state: State: ABORT (5)  vmcid: 0x4942f000  minor co
    de: 775  completed: No]
    at com.ibm.ws.naming.util.WsnInitCtxFactory.mapInitialReferenceFailure(WsnInitCtxFactory.java:2228)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getWsnNameService(WsnInitCtxFactory.java:1414)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:944)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:865)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:545)
    at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:123)
    at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:798)
    at com.ibm.ws.naming.util.WsnInitCtx.rebind(WsnInitCtx.java:242)
    at com.ibm.ws.naming.util.WsnInitCtx.rebind(WsnInitCtx.java:255)
    at javax.naming.InitialContext.rebind(InitialContext.java:367)
    at javax.naming.InitialContext.rebind(InitialContext.java:367)
    at com.sap.aii.adapter.jms.core.service.AdapterServiceFrameImpl.bindAdapter(AdapterServiceFrameImpl.java:163)
    ... 7 more
    Caused by: org.omg.CORBA.TRANSIENT: Connection state: State: ABORT (5)  vmcid: 0x4942f000  minor code: 775  completed: No
    at com.ibm.rmi.iiop.Connection.checkEstablished(Connection.java:3091)
    at com.ibm.rmi.iiop.Connection.send(Connection.java:2145)
    at com.ibm.rmi.iiop.Connection._locate(Connection.java:463)
    at com.ibm.rmi.iiop.Connection.locate(Connection.java:439)
    at com.ibm.rmi.iiop.GIOPImpl.locate(GIOPImpl.java:219)
    at com.ibm.rmi.corba.Corbaloc.locateUsingINS(Corbaloc.java:307)
    at com.ibm.rmi.corba.Corbaloc.resolve(Corbaloc.java:378)
    at com.ibm.rmi.corba.ORB.objectURLToObject(ORB.java:3721)
    at com.ibm.CORBA.iiop.ORB.objectURLToObject(ORB.java:3256)
    at com.ibm.rmi.corba.ORB.string_to_object(ORB.java:3619)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.stringToObject(WsnInitCtxFactory.java:1524)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getWsnNameService(WsnInitCtxFactory.java:1389)
    ... 17 more
    ==============================================================================================
    Could anyone tell me why is trying to connect to "corbaloc:iiop:1.0(at)sapdpi-lpar:2809/NameService"? Do I have to configure a default provider URL for SAP PI server? If so, where I configure it? Any help will be appreciated.
    Thank you in advance.
    Roger Allué i Vall

    Hi Roger,
    we also experience the same issue and would be very keen to understand how you resolved this problem.
    Many thanks.
    Dieter

  • JDBC query in the course of a separate EJB transaction

    Hi all,
    I am implementing a web application that let user upload file and send it to the backend for processing,which involves EJB level transaction(many read+write operations),say transaction L .The processing time may last for 10 minutes. Meanwhile the user can view the history of the files he uploaded and CURRENT STATUS of the file he submitted for processing,we call it file upload history summary (they are from direct JDBC query to the upload history table,say table U in the database,since they are read only data).
    My problem is: the user can not see his LATEST file upload status UNTIL the backend processing transaction is completed,although the row for latest file he just submits in Table U was created during the course of the transaction L by an EntityBean UEJB.
    I am using Jboss server,do u guys have any idea so that I can see the new file status once it's created by the UEJB even before the transaction L is completed?Thanks

    You can achieve this by using JMS and MDB. Because once your file is uploaded, the server is busy in loading the data to the database. So it is not sending you back the response as you are doing a synchronous communication. You have to use Asynchronuous communication to achieve this. This way the client will not wait for the response and the transaction to finish.
    While uploading you a send the file as a message object using JMS and MDB. Let the MDB call the other EJB to load the data to the database. Then you can refresh the status browser automatically in certain periods to retrieve data using other EJB like simple access. The browser will automatically submit itself and get the data from EJB while the other EJB uploading the data to the database.
    Hope this helps. If you are still not clear write again. I will explain it again.
    Thanks
    Amit

  • Distributed transaction (JDBC+JMS), durable MDB, NullPointException in weblogic

              I am cross posting to transaction & jms, sorry if this is a mistake...
              We have a setup where JMS messages are published to a topic. The posting is transacted
              (XA) and is a consequence of a CMP update so JMS and JDBC (Oracle OCI) cooperate
              to commit, or not.
              Most of the time, transactions issue just a few JMS messages but at least once
              a day, we issue hundred of thousands of such messages (max has been about 600000
              but typically 300000).
              Our setup is four instances of Weblogic 6.1SP3 (two clustered, two not), the topic
              is on one of them (all 3 other servers connect to that instance to publish) and
              we have a couple MDBs deployed only on the instance that has the JMSServer and
              they all listen to the local topic. The transactionnal settings of these MDBs
              is CMT and XA (because the beans will write to the DB). Furthermore, these MDB
              have been setup to be durable. One of these is just a logger MDB with 20 instances
              max.
              It worked fine for a couple weeks but we have been running into problems for the
              past two days. All of a sudden, the server no longer responds to weblogic.ADMIN
              PING. The server log indicates the following error repetitively (MB of logs just
              of this)
              ####<13 nov. 03 23:15:41 CET> <Alert> <JMS> <XXXXXXX> <send1> <ExecuteThread:
              '32' for queue: 'default'> <> <> <040060> <JMSServer "OutputServerSend1", unhandled
              exception during rollback, java.lang.NullPointerException.>
              java.lang.NullPointerException
              at weblogic.jms.backend.BEDurableTopicMessageInfo.rollbackReceiveTran(BEDurableTopicMessageInfo.java:352)
              at weblogic.jms.backend.BEXATranEntrySubscribe.startRollback(BEXATranEntrySubscribe.java:145)
              at weblogic.jms.backend.BEXATranEntry.execute(BEXATranEntry.java:127)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              The logger MDB seems to have started processing the JMS messages. This means that
              the transaction that included the JMS message publishing must have commited. Unfortunatly,
              there are only 20 log lines before the server restart, so the server must have
              hanged although it did commit the messages processed by the logger since the log
              messages are apparently not repeated. I have no idea why. I think this is coherant
              with the fact that exception above seems to relate to subscribers.
              When we restart the server, the topic gets purged and seem to be processed (we
              have not found a way to verify that each message has been processed but it's looking
              good)
              Any ideas ?
              Thanks
              Philippe
              

              I am cross posting to transaction & jms, sorry if this is a mistake...
              We have a setup where JMS messages are published to a topic. The posting is transacted
              (XA) and is a consequence of a CMP update so JMS and JDBC (Oracle OCI) cooperate
              to commit, or not.
              Most of the time, transactions issue just a few JMS messages but at least once
              a day, we issue hundred of thousands of such messages (max has been about 600000
              but typically 300000).
              Our setup is four instances of Weblogic 6.1SP3 (two clustered, two not), the topic
              is on one of them (all 3 other servers connect to that instance to publish) and
              we have a couple MDBs deployed only on the instance that has the JMSServer and
              they all listen to the local topic. The transactionnal settings of these MDBs
              is CMT and XA (because the beans will write to the DB). Furthermore, these MDB
              have been setup to be durable. One of these is just a logger MDB with 20 instances
              max.
              It worked fine for a couple weeks but we have been running into problems for the
              past two days. All of a sudden, the server no longer responds to weblogic.ADMIN
              PING. The server log indicates the following error repetitively (MB of logs just
              of this)
              ####<13 nov. 03 23:15:41 CET> <Alert> <JMS> <XXXXXXX> <send1> <ExecuteThread:
              '32' for queue: 'default'> <> <> <040060> <JMSServer "OutputServerSend1", unhandled
              exception during rollback, java.lang.NullPointerException.>
              java.lang.NullPointerException
              at weblogic.jms.backend.BEDurableTopicMessageInfo.rollbackReceiveTran(BEDurableTopicMessageInfo.java:352)
              at weblogic.jms.backend.BEXATranEntrySubscribe.startRollback(BEXATranEntrySubscribe.java:145)
              at weblogic.jms.backend.BEXATranEntry.execute(BEXATranEntry.java:127)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              The logger MDB seems to have started processing the JMS messages. This means that
              the transaction that included the JMS message publishing must have commited. Unfortunatly,
              there are only 20 log lines before the server restart, so the server must have
              hanged although it did commit the messages processed by the logger since the log
              messages are apparently not repeated. I have no idea why. I think this is coherant
              with the fact that exception above seems to relate to subscribers.
              When we restart the server, the topic gets purged and seem to be processed (we
              have not found a way to verify that each message has been processed but it's looking
              good)
              Any ideas ?
              Thanks
              Philippe
              

  • Get and close connections many times in an EJB transaction drains pool

    I have run into an odd bug in OC4J, and I'm hoping someone out there has the solution for it.
    If I am inside an EJB transaction and call datasource.getConnection() and connection.close() more than (10 * max-connections) times, I can no longer get a connection from the datasource. Instead, I get this message:
    java.sql.SQLException: Timed out waiting for an available connection after 60 seconds (connection pool reached max-connections which was set to 100)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].sql.OrionPooledDataSource.waitForConnection(OrionPooledDataSource.java:1012)
    Note the message says that max-connections is set to 100, when it is in fact set to 10. The figure is always 10 times the max-connections value.
    These connections are not being held, each is released before the next is fetched.
    The OC4J output looks like:
    [java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@d042d7 to pool (Pool size: 1)
    [java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@702936 to pool (Pool size: 2)
    [java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@1c0db6a to pool (Pool size: 3)
    [java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@616f6c to pool (Pool size: 98)
    [java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@19d83c7 to pool (Pool size: 99)
    [java] com.evermind.sql.DriverManagerConnectionPoolDataSource@1d4e49a: Releasing connection com.evermind.sql.DriverManagerPooledConnection@16ad2fd to pool (Pool size: 1)
    [java] null: Releasing connection com.evermind.sql.DriverManagerXAConnection@c1ec95 to pool (Pool size: 100)
    [java] com.evermind.sql.OrionPooledDataSource@46bb9f: Cache timeout, closing connection (Pool size: 0)
    [java] com.evermind.sql.OrionCMTDataSource@1c80063: Cache timeout, closing connection (Pool size: 99)
    [java] com.evermind.sql.OrionCMTDataSource@1c80063: Cache timeout, closing connection (Pool size: 98)
    [java] com.evermind.sql.OrionCMTDataSource@1c80063: Cache timeout, closing connection (Pool size: 2)
    [java] com.evermind.sql.OrionCMTDataSource@1c80063: Cache timeout, closing connection (Pool size: 1)
    [java] com.evermind.sql.OrionCMTDataSource@1c80063: Cache timeout, closing connection (Pool size: 0)
    Since often the number of times a connection is required in my application is data driven, I really need a general solution for this problem. Can anyone make a suggestion?

    We are facing the problem as given below.please advice.
    We have developed an application wherein we are calling DB functions using Type-4 connections. We have deployed it on Oracle AS OC4J 10.1.2.0.2. When the function executes we get the below error in the log file.
    When this error msg comes the application is unable to fetch the desired results.
    How do we solve this issue?
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 13)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 12)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 11)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 10)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 9)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 8)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 7)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 6)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 5)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 4)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 3)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 2)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 1)
    com.evermind.sql.OrionCMTDataSource@478e3074: Cache timeout, closing connection (Pool size: 0)
    com.evermind.sql.OrionCMTDataSource@1326b07a: Cache timeout, closing connection (Pool size: 2)
    com.evermind.sql.OrionCMTDataSource@1326b07a: Cache timeout, closing connection (Pool size: 1)
    com.evermind.sql.OrionCMTDataSource@1326b07a: Cache timeout, closing connection (Pool size: 0)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 1)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 2)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 3)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 4)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 5)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 6)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 7)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 8)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 9)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 10)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 11)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 12)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 13)
    null: Releasing connection oracle.jdbc.driver.T4CXAConnection@43bbf685 to pool (Pool size: 14)

  • Global transactions in OSB and EJB 2.1

    Hi,
    My team is working in a SOA service based on OSB 11g (11.1.1.5) using DB JCA Adapter and EJB 2.1 over WLS 10g(WLI environment). The logic of the service works in this way:
    1. A table in a database (XE) is polled by the DB Adapter which starts the service (1 row = 1 message).
    2. The message contains a collection of items to be inserted in another Oracle database.
         Once a message/row is picked, and after some steps (logging, validation,etc), there is a for..each action which extracts each item of the collection and executes a service callout action to a business service.
    3. This business service uses EJB protocol to call an EJB (2.1 + WLS Extensions). The EJB is deployed in another domain (WLS 10.3.0/10g and Oracle BEA drivers)  and only executes an store procedure with the parameters based on the message and inserts these values in a table.
    4. Once the for...each finishes, there is a call to another proxy service which marks the message/row as "processed" in the source table. This update is done via DB JCA also.
    5. In case of an error, the error handler of the proxy service calls the proxy service mentioned above to mark the row as "Failed" (in fact there is a retry mechanism, but it's not important for now).
    The service requires to work inside a global transaction. The main requirement is that the collection of items should be processed as "All or None", so basically we're using the options to manage the global transaction. However, the problem is that it's failing to rollback the whole insertion of items when an error is simulated. It only rolls back the last insertion/execution of SP.
    Additionally, the proxy service that should mark the row as FAILED, never updates this one, and the tables stay locked until we modify one of the store procedure in order to avoid the simulated error and commit the transaction.
    The EJB uses WLS extensions with the annotations to "transaction required". The proxy service has the option transaction required also. The database drivers are all XA and we're testing against Oracle11g XE (however, the EJB destiny will be Oracle 8i in production).
    We have tried different alternatives, splitting the logic in different proxies (Proxy services for JCA, Proxy with For Each for EJB, etc), isolating the specific part with the EJB call, without success.
    The security between domains is set as Global Trust.
    Do you have any idea, example or suggestion about this problem? Is EJB really supported in Global Transactions and XA?
    Thanks in advance.

    where do you find the J2EE Connector 1.5 compliant
    Resource Adapter?I wrote the compliant adapter myself. Hey Steve,
    Were you able to find a solution for this problem. I am struggling with the same problem with the RI Beta implementation.
    Sandeep

  • JMS and transactions

    Dear all,
    I need some clarification about JMS for my Thesis : after reading some tutorials I still am confused about JMS used with JTA transactions.
    1) If a JMS transacted session is started within a JTA transaction (let's say a UserTransaction spanned by an EJB) and the transaction rolls back, the message will be put back in the Queue, right ?
    2) Is it true also the opposite ? that is if I perform some insert/delete/update within a JMS transacted session, and the transaction is rolled back, the insert/delete/update are rolled back too ?
    Thank you very much for your help
    Lucas

    Hi Lucas,
    What you describe requires XA or distributed transactions. And (I'm fairly sure) XA doesn't work with Bean Managed Transactions and the UserTransaction interface. XA allows multiple transactional resources to get enlisted in a global transaction. When the app server decides all the work is done, the global transaction is committed or rolled back using a two-phase commit protocol.
    So except for the UserTransaction bit, what you describe is how it works. The messages will be only sent/received and the database work will only be committed if the whole global transaction is committed. If any part is rolled back, everything will be rolled back. JMS implementations typically will set the JMSRedelivered flag along with incrementing the JMSXDeliveryCount property when messages are put back on the destination.
    Dwayne
    =========================
    [http://dropboxmq.sourceforge.net/]

  • My iSight is not working on my Macbook Pro. What are the possible problems and solutions?

    My iSight is not working on my Macbook Pro. What are the possible problems and solutions?

    Hello Douglas,
    Thank you for the details of the issue you are experiencing with the built-in iSight camera on your MacBook Pro.  I recommend the following steps for this issue:
    Important: Follow these instructions in order. Test the camera between steps to see if the issue is resolved.
    Built-in iSight cameras
    These steps are for iSight cameras that are built into a computer, such as the iMac G5 (iSight) or later, the MacBook, or MacBook Pro.
    See if the issue is application-specific.
    Try another application (iSight works with applications like iChat, PhotoBooth, and iMovie HD 6) to see if the iSight camera exhibits the same behavior in all applications. If it only happens in one application, try reinstalling that application.
    See if the issue is user-specific.
    Test your iSight camera in another user account. If the issue only occurs in one user, the issue would be isolated to user settings.
    Find out if the computer recognizes the iSight
    Check System Profiler (in the Utilities folder, inside the Applications folder). Under the USB header, check to see if the iSight camera is detected.
    Reset SMC or PMU
    Reset your computer's SMC or PMU, and then check System Profiler again. (SMC reset instructions for iMac G5 (iSight), Intel-based iMacs; PMU reset instructions for MacBook and MacBook Pro.)
    If your built-in iSight camera is still not behaving correctly after trying all these steps, you may need to contact Apple or an Apple-Authorized Service Provider for service.
    You can find the full article here:
    How to Troubleshoot iSight
    http://support.apple.com/kb/ht2090
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Hello  My system version 10.5.8  I have installed Safari update - 5.0.6 and the browser stopped working. At openingit shows the following icon:   "Safari has suddenly finished working. Possible problem is in the action of the plugin "TastyAppsAVPlugin".

    Hello
    My system version 10.5.8
    I have installed Safari update - 5.0.6 and the browser stopped working. At openingit shows the following icon:
    "Safari has suddenly finished working. Possible problem is in the action of the plugin "TastyAppsAVPlugin".
    After deleting all plugins from the folder "Internet Plugin", Safari worked again no problem, BUT all sites with flash content (e.g.YouTube) did not work.
    I then tried the following experimental steps:
    a) Moved all plugins from the folder "Internet Plugin" into a temporary folder.
    b) Downloaded and istalled Adobe Flash Player version 10.3.181.34
    c) Started Safari and it did not work ( same message"TastyAppsAVPlugin")
    d) Deleted Adobe Flash Player from the folder "Internet Plugin". Safari worked.
    e) Moved back all plugins, except Adobe Flash Player, from the temporary folder to "Internet Plugin" folder. Safari works... But Flash won't work!!! Before update to Safari 5.0.6 , ev erything worked perfectly well.
    Guys, please solve the problem
    Regards
    Ruslan Reed
    [email protected]

    MayaMa --
    There are many threads on this.  I typed "Uninstalling TastyApps" in the Google search, and came up with these:
    http://www.google.com/search?client=safari&rls=en&q=Uninstalling+tastyapps&ie=UT F-8&oe=UTF-8
    I do not know which of the many TastyApps haxies you have.  Perhaps it would be better to contact them directly, once you know which of their products you have.

  • Problem with ALV_GRID and CALL TRANSACTION.

    Hi all, Could you please tell me
    At SE38
    Why REUSE_ALV_GRID_DISPLAY and CALL TRANSACTION  after called then I click the back button to return to the calling program but it automatic return to the source code? (it hasn't saves the data in alv grid )
    In another case of this program, after automatic return to the source code then I have to waiting for 5-10 mins for execute again cuz if  immediately execute the program don't fill any data to the alv grid.
    I have problem with a simple source code like this
    REPORT ZFS_ALV_DEMO.
    TYPE-POOLS: slis.
    DATA: itab LIKE STANDARD TABLE OF aufk WITH HEADER LINE.
    DATA: gs_selfield TYPE slis_selfield   "Information cursor position ALV
        , w_aufnr     LIKE aufk-aufnr.     "Order Number
    SELECT * FROM aufk INTO TABLE itab WHERE autyp = 40.     "//Process Order
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
              i_structure_name        = 'aufk'
              i_callback_program      = sy-cprog
              i_callback_user_command = 'USER_COMMAND_COR3'
         TABLES
              t_outtab         = itab
         EXCEPTIONS
              program_error    = 1
              OTHERS           = 2.
    FORM user_command_cor3 USING u_ucomm     LIKE sy-ucomm
                                 us_selfield TYPE slis_selfield."#EC CALLED
      CASE u_ucomm.
        WHEN '&IC1'.
          gs_selfield = us_selfield.
          IF gs_selfield-fieldname = 'AUFNR'.
            SET PARAMETER ID 'ANR' FIELD gs_selfield-value.
            CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.
          ELSE.
            MESSAGE w208(00) WITH 'Select by Order only!'.
          ENDIF.
      ENDCASE.
    ENDFORM.

    Hi all, Could you please tell me
    At SE38
    Why REUSE_ALV_GRID_DISPLAY and CALL TRANSACTION  after called then I click the back button to return to the calling program but it automatic return to the source code? (it hasn't saves the data in alv grid )
    In another case of this program, after automatic return to the source code then I have to waiting for 5-10 mins for execute again cuz if  immediately execute the program don't fill any data to the alv grid.
    I have problem with a simple source code like this
    REPORT ZFS_ALV_DEMO.
    TYPE-POOLS: slis.
    DATA: itab LIKE STANDARD TABLE OF aufk WITH HEADER LINE.
    DATA: gs_selfield TYPE slis_selfield   "Information cursor position ALV
        , w_aufnr     LIKE aufk-aufnr.     "Order Number
    SELECT * FROM aufk INTO TABLE itab WHERE autyp = 40.     "//Process Order
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
              i_structure_name        = 'aufk'
              i_callback_program      = sy-cprog
              i_callback_user_command = 'USER_COMMAND_COR3'
         TABLES
              t_outtab         = itab
         EXCEPTIONS
              program_error    = 1
              OTHERS           = 2.
    FORM user_command_cor3 USING u_ucomm     LIKE sy-ucomm
                                 us_selfield TYPE slis_selfield."#EC CALLED
      CASE u_ucomm.
        WHEN '&IC1'.
          gs_selfield = us_selfield.
          IF gs_selfield-fieldname = 'AUFNR'.
            SET PARAMETER ID 'ANR' FIELD gs_selfield-value.
            CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.
          ELSE.
            MESSAGE w208(00) WITH 'Select by Order only!'.
          ENDIF.
      ENDCASE.
    ENDFORM.

  • I want to transfer pictures from my iphone 4 to a hardrive, but the problem is i dont know how. Can the genius bar help me with that, and can they possibly do this for me if i bring my iphone and hard drive with me there. Also if there is a cost, how much

    I want to transfer pictures from my iphone 4 to a hardrive, but the problem is i dont know how. Can the genius bar help me with that, and can they possibly do this for me if i bring my iphone and hard drive with me there. Also if there is a cost, how much?

    iOS: Importing personal photos and videos from iOS devices to your computer

Maybe you are looking for

  • Switching the x-fi fatal1ty card from an XP system to a vista 64 bit sys

    I just recently purchased a new computer system that has vista 64 bit. I want to use my x-fi fatalty sound card in this new system. The card use to be in an old XP system (home edition). I can't seem to be able to download any drivers for it from the

  • Can't Send Texts

    I upgraded to this phone just before Christmas. It worked great until about two weeks ago - about a week after I got it. I can't send texts!  I've tried while out in a 4LTE signal, 3G signal and we have a network extender at home and it won't work on

  • Accessing OID in OBIEE VM Samples Files

    I'm trying to set up access to the expanded OBIEE 11.1.1.5 Sample files, by loading the VM application. I've successfully set up the Virtual Machine and loaded the Sample App image and I'm trying to work thru the instructions to get all of the compon

  • JP2 Format - does this work in Photoshop Elements 12?

    I need to download a JP2photo.  Does this work in photoshop elements 12?  I have windows 8.

  • Place a component over another

    Hello World ! First: sorry for my bad english..... This is a great Forum with a lot of answers but I was not able to find my problem :( I have a JTable with editable cells. Each Cell contains a CarretListener for quick validation of the entered text.