CMT and using non-Weblogic JMS in a session bean

          I am writing a session bean which sends a JMS message using a non-weblogic JMS
          provider. This bean is marked for CMT and I want the JMS send to participate in
          this CMT as well. My understanding is that I should be able to do this by defining
          a <resource-ref> element in the ejb-jar.xml and a corresponding <resource-descriptor>
          element in the weblogic-ejb-jar.xml file. The bean would then use the <res-ref-name>
          defined under the <resource-ref> element to lookup the connection factory. What
          do I have to put in weblogic-ejb-jar.xml file to make sure that the connection
          factory specified in <res-ref-name> maps to a connection factory that is in a
          foreign JNDI provider (e.g. in the non-Weblogic JMS provider's JNDI) and not in
          Weblogic's JNDI?
          Thanks in advance for your help.
          

It sounds like you're using Tibco JMS to receive messages from the MDB, and
          then to send out a message. WLS 7.0 will handle the transaction enlistment
          properly when it receives messages for the MDB, but you'll have to enlist
          the JMS provider yourself when you send the message, using the white paper
          that Tom pointed you to as a guide.
          In WLS 8.1, coming soon, we'll automatically enlist the provider in the
          transaction if you look it up using a "resource-ref" element in the EJB like
          you described. Today, you can use that element but no transaction
          enlistement is being done.
          greg
          "Venkat" <[email protected]> wrote in message
          news:[email protected]...
          >
          > We also need this feature.
          > We are using Weblogic 7.0 and Tibco JMS 3.0,
          > which supports XA.
          >
          > We are mainly interested in subscribing using MDB
          > and publishing using a session bean in one transaction.
          > Do you think by using resource-refs in conjunction
          > with registering with Weblogic JNDI during startup
          > can do the job?
          >
          > Or how about using XAConnectionFactory and XASession
          > classes for JMS publishing ?
          >
          > Thanks.
          >
          > Tom Barnes <[email protected]> wrote:
          > >Hi Mihir,
          > >
          > >Support for automatic enlistment of foreign JMS vendors
          > >via the resource-ref approach is not available in WLS.
          > >This support will be available in the next release:
          > >limited access beta is available now, public beta is available
          > >in 2-3 months. You are the first customer I've heard of that
          > >asked for this feature. Very cool. Good timing.
          > >
          > >As you are not using WebLogic JMS, you will need to do the
          > >transaction enlistment yourself. This isn't that hard
          > >to do. I suggest that you refer to the integrating foreign
          > >JMS vendor white-paper available on dev2dev.bea.com.
          > >Also, refer to the integrating transactions with
          > >MQSeries integration paper, which will likely serve your
          > >purposes better. Note that some JMS vendors
          > >have problems with concurrent transactions in a single
          > >JMS connection, or with transactions that attempt
          > >to switch threads (eg. suspend() in one thread
          > >and resume() in another).
          > >
          >
          >http://dev2dev.bea.com/resourcelibrary/whitepapersdetail.jsp?highlight=whit
          epapers&filePath=components%2Fdev2dev%2Fresourcelibrary%2Fwhitepapers%2Fwp_j
          msproviders.htm
          >
          >http://dev2dev.bea.com/resourcelibrary/whitepapersdetail.jsp?highlight=whit
          epapers&filePath=components%2Fdev2dev%2Fresourcelibrary%2Fwhitepapers%2Fwp_j
          tatransactions.htm
          > >
          > >Tom
          > >
          > >mihir sharma wrote:
          > >> I am writing a session bean which sends a JMS message using a
          non-weblogic
          > >JMS
          > >> provider. This bean is marked for CMT and I want the JMS send to
          participate
          > >in
          > >> this CMT as well. My understanding is that I should be able to do this
          > >by defining
          > >> a <resource-ref> element in the ejb-jar.xml and a corresponding
          <resource-descriptor>
          > >> element in the weblogic-ejb-jar.xml file. The bean would then use the
          > ><res-ref-name>
          > >> defined under the <resource-ref> element to lookup the connection
          factory.
          > >What
          > >> do I have to put in weblogic-ejb-jar.xml file to make sure that the
          > >connection
          > >> factory specified in <res-ref-name> maps to a connection factory that
          > >is in a
          > >> foreign JNDI provider (e.g. in the non-Weblogic JMS provider's JNDI)
          > >and not in
          > >> Weblogic's JNDI?
          > >>
          > >> Thanks in advance for your help.
          > >>
          > >
          >
          

Similar Messages

  • CMT with non-weblogic JMS in a session bean

    I am writing a session bean which sends a JMS message using a non-weblogic JMS
    provider. This bean is marked for CMT and I want the JMS send to participate in
    this CMT as well. My understanding is that I should be able to do this by defining
    a <resource-ref> element in the ejb-jar.xml and a corresponding <resource-descriptor>
    element in the weblogic-ejb-jar.xml file. The bean would then use the <res-ref-name>
    defined under the <resource-ref> element to lookup the connection factory. What
    do I have to put in weblogic-ejb-jar.xml file to make sure that the connection
    factory specified in <res-ref-name> maps to a connection factory that is in a
    foreign JNDI provider (e.g. in the non-Weblogic JMS provider's JNDI) and not in
    Weblogic's JNDI?
    Thanks in advance for your help.

    I am writing a session bean which sends a JMS message using a non-weblogic JMS
    provider. This bean is marked for CMT and I want the JMS send to participate in
    this CMT as well. My understanding is that I should be able to do this by defining
    a <resource-ref> element in the ejb-jar.xml and a corresponding <resource-descriptor>
    element in the weblogic-ejb-jar.xml file. The bean would then use the <res-ref-name>
    defined under the <resource-ref> element to lookup the connection factory. What
    do I have to put in weblogic-ejb-jar.xml file to make sure that the connection
    factory specified in <res-ref-name> maps to a connection factory that is in a
    foreign JNDI provider (e.g. in the non-Weblogic JMS provider's JNDI) and not in
    Weblogic's JNDI?
    Thanks in advance for your help.

  • Can I download and use non-Universal Games like Bookworm and Word Whomp ?

    Can I download and use non-Universal Games like Bookworm and Word Whomp on my Macbook Pro? If I can, will they interfere with the computer's functions in any way? What about non-Universal widgets? Thanks.

    hi Chevaux - Welcome to apple discussions!
    i dont know how resource-intensive those apps are but you can certainly run them. if they are not universal binary they'll operate through an emulation layer called Rosetta. there's a performance penalty there, but if the app is not intensive in the first place, and/or you've maxxed out the RAM, you might very well not notice the penalty at all...
    i assume the same comments apply to non-UB widgets, but as i abhor Dashboard i don't use it at all.......
    cheers

  • How to Configure and Use Oracle's JMS Connector with Tibco EMS

    Jeff,
    I am getting the below exception while try to do the deployment of the sample provided on 'How to Configure and Use Oracle's JMS Connector with Tibco Enterprise for JMS'
    While deployment not able to get the 'TibcoJMSReference',
    As I understand in the 'orion-application.xml for the below, unable to get the instance. Could you adivce how I can enable the trace more?
    <resource-provider class="com.evermind.server.deployment.ContextScanningResourceProvider" name="TibcoJMSReference">
    could you help to resolve the issue?
    Error
    Operation failed with error: No resource named 'TibcoJMSReference/TibcoXACF'found

    Hi,
    I'm also looking for the same 'Configure and Use Oracle's JMS Connector with Tibco JMS to consume message'. If you have already implemented and working fine, please let me know the steps and some documents.

  • How to Set and Use a global variable within a session?

    Dear All,
    I'm new to jsp, and would like to ask how to set and use a global variable within a session?
    Thanks in advance.
    Regards,
    Cecil

    With session.setAttribute("name",object) you can store a Attribute in the session object.
    with session.getAttribute("name") you can get it.
    That's it.
    Regards,
    Geri

  • Problem using application client for local stateful session bean

    Hi,
    I have deployed a local stateful session bean in Sun J2EE 1.4 application server.
    On running the applclient for the stateful session bean application client i get the following error:
    Warning: ACC006: No application client descriptor defined for: [null]
    cant we use application client for local stateful session beans. becoz the application runs smoothly when i changed the stateful sesion bean to remote.

    Hi,
    No, an ejb that exposes a local view can only be accessed by an ejb or web component packaged within the same application. Parameters and return values for invocations through the ejb local view are passed by reference instead of by value. That can't work for an application client since it's running in a separate JVM.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to Configure and Use Oracle's JMS Connector with Tibco Enterprise

    Following the advice here: http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-connect-to-tibco/doc/how-to-connect-to-tibco.html
    I believe I need to provide a username and password for the Tibco JMS provider, and would like to know the correct way. Is this right, in orion-application.xml
        <resource-provider class="com.evermind.server.deployment.ContextScanningResourceProvider" name="TibcoJMSReference">
            <property
                name="java.naming.factory.initial"
                value="com.tibco.tibjms.naming.TibjmsInitialContextFactory">
            </property>
            <property
                name="java.naming.provider.url"
                value="tibjmsnaming://jleinawe-sun:7222">
            </property>
      <property name="java.naming.security.principal" value="user" />
      <property name="java.naming.security.credentials" value="password" />
        </resource-provider>

    This is kind of up to Tibco...
    When you add properties to the resource-provider element, you are just adding entries to a Map which gets passed to the initial context factory, which in this case is implemented by Tibco (TibjmsInitialContextFactory), so you may want to check their docs.
    It's possible they only use that for username/password for JNDI access purposes and not for JMS. If so, you can explicitly set username/password for outbound connections in the oc4j-ra.xml file, and using ResUser/ResPassword in the MDB's activation-spec to set username/password for inbound connections.
    -Jeff

  • Transactional error when using JMS from stateless session bean

    I get a transaction exception when committing a bean method responsible for sending to a JMS topic. This happens only occasionally when two separate threads invoke this method "at the same time".
    The scenario:
    Two separate threads running two different instances of a stateless session bean (slsb A). This ejb (slsb A) has an injected slsb B which is communicating with the the topic.
    Both instances of slsb A are utilising the same instance of slsb B.
    The CMT transactions for the two threads start in slsb A from methods with transaction attribute "RequiresNew". All nested methods are to other slsbs and have the transaction attribute "Required". The method in slsb B which sends the message is closing both the session and the connection to the topic.
    I'm running Glassfish version 9.1_02 (build b04-fcs) and JMS implementation OpenMQ version 4.1.
    Stacktrace (glassfish log):
    [#|2008-09-09T13:00:40.515+0200|SEVERE|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=108e8418-71a6-4d8b-a94d-9e1edc885891;|commitTransaction (XA) on JMSService:jmsdirect failed for connectionId:5754505514139844608 and onePhase:false due to unkown JMSService server error.|#]
    [#|2008-09-09T13:00:40.515+0200|SEVERE|sun-appserver9.1|javax.enterprise.system.core.transaction|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;org.omg.CORBA.INTERNAL:   vmcid: 0x0  minor code: 0 completed: Maybe;commit;_RequestID=108e8418-71a6-4d8b-a94d-9e1edc885891;|JTS5031: Exception [org.omg.CORBA.INTERNAL:   vmcid: 0x0  minor code: 0 completed: Maybe] on Resource [commit] operation.|#]
    [#|2008-09-09T13:00:40.531+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;SubscriptionBean;|EJB5018: An exception was thrown during an ejb invocation on [SubscriptionBean]|#]
    [#|2008-09-09T13:00:40.531+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-1;|
    javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL:   vmcid: 0x0  minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No
    javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL:   vmcid: 0x0  minor code: 0 completed: Maybe] on Resource [commit] operation. vmcid: 0x0 minor code: 0 completed: No
         at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:321)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1030)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3585)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:127)
         at $Proxy130.requestNewSubscription(Unknown Source)
         at com.abeldrm.kms.core.services.subscription.SubscriptionWSBean.requestNewSubscription(SubscriptionWSBean.java:94)
         at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
         at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
         at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
         at $Proxy129.requestNewSubscription(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
         at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
         at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
         at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
         at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
         at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
         at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
         at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:329)
         at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
         at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
         at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
         at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
         at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
         at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
         at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
         at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
         at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
         at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
         at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
         at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    IMQ broker log:
    [09/Sep/2008:13:00:40 CEST] ERROR CommitTransaction: commit failed. Connection ID: 5754505514139844608, Transaction ID: 0:
    com.sun.messaging.jmq.jmsserver.util.BrokerException: Unknown Transaction 0
         at com.sun.messaging.jmq.jmsserver.data.protocol.ProtocolImpl.commitTransaction(ProtocolImpl.java:630)
         at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService.commitTransaction(IMQDirectService.java:1735)
         at com.sun.messaging.jms.ra.DirectXAResource.commit(DirectXAResource.java:201)
         at com.sun.jts.jtsxa.OTSResourceImpl.commit(OTSResourceImpl.java:114)
         at com.sun.jts.CosTransactions.RegisteredResources.distributeCommit(RegisteredResources.java:795)
         at com.sun.jts.CosTransactions.TopCoordinator.commit(TopCoordinator.java:2111)
         at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:403)
         at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:249)
         at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
         at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:309)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1030)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3792)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3585)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:205)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:127)
         at $Proxy130.requestNewSubscription(Unknown Source)
         at com.abeldrm.kms.core.services.subscription.SubscriptionWSBean.requestNewSubscription(SubscriptionWSBean.java:94)
         at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
         at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
         at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(WebServiceInvocationHandler.java:189)
         at $Proxy129.requestNewSubscription(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java:81)
         at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(EjbInvokerImpl.java:82)
         at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
         at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
         at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
         at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
         at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
         at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:329)
         at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
         at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
         at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
         at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
         at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
         at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
         at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
         at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
         at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:226)
         at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:155)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
         at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
         at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Have anyone any idea why this should fail?
    Regards,
    Jon

    I would suggest opening a case with [email protected] FWIW, I recall seeing
              something like this in WLS 6.0. I believe it is fixed in WLS 6.1
              -- Rob
              Chris Dupuy wrote:
              > Btw, this occurs when I create an stateful session bean that ends up
              > throwing an exception and setRollbackOnly() is called. From that point
              > forward, my logs fill with this message.
              >
              > Chris
              >
              > "Chris Dupuy" <[email protected]> wrote in message
              > news:[email protected]..
              > > anyone know what this means, and what you can do about it?
              > >
              > >
              > > <Error> <ConnectionManager> <atossd03> <cbeyondServer> <ExecuteThread:
              > '14'
              > > for queue: 'd
              > > efault'> <> <> <000000> <Closing:
              > 'weblogic.rjvm.t3.T3JVMConnection@488831'
              > > because of: 'Server received a message over an uniniti
              > > alized connection: 'JVMMessage from: 'null' to:
              > >
              > '5825313123619479267S:10.6.6.40:[8000,8000,8001,8001,8000,8001,-1]:cbeyond:c
              > > beyond
              > > Server' cmd: 'CMD_REQUEST', QOS: '101', responseId: '2', invokableId: '1',
              > > flags: 'JVMIDs Not Sent, TX Context Not Sent', abbrev o
              > > ffset: '204'''>
              > >
              > >
              > >
              

  • EJB question: How to use abstract class in writing a session bean?

    I had written an abstract class which implements the session bean as follow:
    public abstract class LoggingSessionBean implements SessionBean {
    protected SessionContext ctx;
    protected abstract Object editRecord(Object obj) throws Exception;
    public LoggingSessionBean()
    super();
    private final String getBeforeUpdateImage(Object obj) throws Exception {
    // implement the details of extracting the backup image ...
    public void setSessionContext(SessionContext ctx)
    this.ctx = ctx;
    private final void writeThisImageToDatabase(String aStr) {
    // connect to database to write the record ...
    public final Object update(final Object obj) {
    try {
    final String aStr = getBeforeUpdateImage(obj);
    writeThisImageToDatabase(aStr);
    editRecord(obj);
    } catch (Exception e) {
    ctx.setRollbackOnly();
    This abstract class is to write the backup image to the database so that other session beans extending it only need to implement the details in editRecord(Object Obj) and they do not need to take care of the operation of making the backup image.
    However, some several questions for me are:
    1. If I write a class ScheduleSessionBean extending the above abstract class and the according 2 interfaces ScheduleSession and ScheduleSessionHome for this session bean (void update(Object obj); defined in ScheduleSession), do I still need to write the interfaces for LoggingSession and LoggingSessionHome?
    2. If I wrote the interface LoggingSession extending EJBObject where it defined the abstract methods "void update(Object obj);" and "void setSessionContext(SessionContext ctx);", that this meant I needed to write the ScheduleSession to implement the Logging Session?
    3. I used OC4J 9.0.4. How can I define the ejb-jar.xml in this case?

    Hi Maggie,
    1. do I still need to write
    the interfaces for LoggingSession and
    LoggingSessionHome?"LoggingSessionBean" can't be a session bean, because it's an abstract class. Therefore there's no point in thinking about the 'home' and 'remote' interfaces.
    2. this
    meant I needed to write the ScheduleSession to
    implement the Logging Session?Again, not really a question worth considering, since "LoggingSessionBean" can't be an EJB.
    3. I used OC4J 9.0.4. How can I define the
    ejb-jar.xml in this case?Same as you define it for any version of OC4J and for any EJB container, for that matter, since the "ejb-jar.xml" file is defined by the EJB specification.
    Let me suggest that you create a "Logging" class as a regular java class, and give your "ScheduleSessionBean" a member that is an instance of the "Logging" class.
    Alternatively, the "ScheduleSessionBean" can extend the "Logging" class and implement the "SessionBean" interface.
    Good Luck,
    Avi.

  • Using PetStore components externally within a Session Bean.

    Hi,
    I tried to access the personalization component externally within a Session Bean.
    Therefore I've got to import some packages like "import com.sun.j2ee.blueprints.personalization.profilemgr.ejb.*;"
    which are defined in personalizationEjb_Client.jar. My development environment
    is JBuilder, Ant and WLS6.1. There is no problem compiling the stuff in JBuilder
    if I specify the .jar-file as "Required Libraries". As soon as a want to deploy
    the stuff with Ant, a NoClassDefinitionFound-Exception is thrown within the WLS.
    I tried to add the personalizationEjb_Client.jar-File to .ear-File. Didn't work.
    I tried to add it to my Beans jar-File. Didn't work either.
    Is there a chance that I have to add the file to some classpath within weblogic?
    Has anybody an idea? Urgent! Thanks
    Joe

    Any thoughts on this anyone?
    It's really a question for anyone who has done this before or knows if there is an issue in relation to the EJB/servlet specification with doing this.
    Thanks,
    Tim

  • AQ to be phased out and replaced by Weblogic JMS??

    I work at a large company in Los Angeles and was recently in a meeting with our architecture team where i was trying to make a case for using AQ for some internal apps.
    I had not used AQ in the past but found it very easy to set up and get running in a proof of concept test case.
    However, in my meeting I was informed by our main architect that:
    1) AQ was not an enterprise solution and had never been fully completed or vetted in production environments.
    2) AQ queues "get stuck" when processing large numbers of messages.
    3) Contacts at Oracle had told him that AQ is being phased out in the very near term in favor of JMS Queues in Weblogic.
    Based on the above statements by our architecture group, our company has essentially disallowed any development on AQ.
    Are these statements true?
    Thanks.

    Your architect is incorrect on multiple counts.
    1. AQ is definitely in use as an enterprise solution in a wide variety of very larger "name" corporations.
    2. So do insert statements. The statement has no meaning unless it has a context. Have this person state the hardware, operating system, database version, and metrics and present the numbers. Try to not to gloat when they can't. Everything has a limitation. But my bet is they have no idea what AQ's is.
    3. Ask for the name and contact information for the person at Oracle that made that statement: It is preposterous on its face. AQ is a foundation technology in RAC, Streams, the Grid Control, and numerous other technologies. Oracle is not removing these technologies from the database any more than they are going to force all database customers to install middleware.
    The only thing that should be removed is your architect for a lack of being honest with the team and management.
    Feel free to have your management contact me directly at the university if they wish to have me confirm what I have written here.

  • ANE Native extension freezes app when debug=false and using non-interpreted IOS build

    There’s a problem with Adobe Air iOS that is somewhat known, and that problem has an unknown variant that’s very tricky.
    The problem is with linking optimized flash and ANEs. If the linker treats the ANE as an included SWC, calls to the library will hang the app. But it will work in the ADB simulator, and it will work in debug builds and in interpreted builds. It only manifests when a release build is attempted.
    The known remedy for this problem is to specify the ANE code as extern to the app, usually via external-library-path argument instead of library-path option.
    What I’ve learned is that even with correct linkage specified, our apps show this problem anyway. And the reason is that the calls between the app and the ANE happen in a non-first frame. A simple test case of a preloader on frame #1 and all the content on second frame will “intern” the symbols of the ANE, breaking the application; but only in non debug, non-interpreted builds, like ipa-test and ipa-ad-hoc.
    Adobe, please detect and report this condition so others won’t all the problems to deal with that I’ve encountered. Thanks.

    I seem to be running into freezes with my ANE's and it has been hard to troubleshoot and came across your post.  I am using Flash CS6 so not sure how to apply your remedy.  The options in CS6 for library path ANE's are 'Merged into Code' and 'Runtime Shared Library'.  Currently it is merged, not sure if this is the same issue or not but I am trying everything here...

  • How to use WS-RM web Service from Session Bean?

    Hi all.
    Could you tell me the way how to call WS-RM web service(Staring BPM Process) from SessionBean?
    Our environment: SAP NetWeaver CE 7.2 SP3
    I do the following.
    I have created a BPM Process starting with Message Start Event.
    This Message Start Event was created by Service Interface(stateless and asynchronous) which was imported from ESR.
    I deployed this into my server and it worked fine in webservice navigator as a WS-RM WebService.
    But I can't call this webservice from SessionBean in EJBExplorer.
    I get the following error message:
    Caused by: This exception is wrapper of javax.xml.ws.soap.SOAPFaultException. com.sap.engine.services.webservices.espba
    se.client.bindings.exceptions.SOAPFaultException: Invalid WS-RM message. There are no WS-RM headers within SOAP message.
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.JAXWSUtil.processFault(JAXWSUtil.java:412)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1366)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:960)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:915)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:168)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)
    at $Proxy2753.zwsvCheckOrderdataMainprocessStart(Unknown Source)
    at jp.co.ogis_ri.WSTestSessionBean.exeWS(WSTestSessionBean.java:81)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    I created this SessionBean as follows:
    I created DCs for EJB and created SessionBean in EJB DC.
    I imported a WSDL file(WS-RM web service) from Service Registory and
    I created service clients and Service References.
    After that I implemented SessionBean to call web service checking with this help.
    http://help.sap.com/saphelp_nwce72/helpdata/en/44/4d2bb1c6b00597e10000000a155369/frameset.htm
    After deploying this EJB,I configured properties in nwa.
    Thanks
    Yuichi

    Yuichi
    Did you manage to solve this?  I'm doing something similar and seeing the same problem, although they're up to 7.3 SP7.
    Any help greatly appreciated.
    Lewis

  • Pros and Cons of using REST over JMS (and other technologies)

    Hey all,
    I am working on a project where we were using JMS initially to send messages between servers. Our front end servers have a RESTful API and use JEE6, with EJB 3.1 entity beans connected to a mysql database and so forth. The back end servers are more like "agents" so to speak.. we send some work for them to do, they do it. They are deployed in GlassFish 3.1 as well, but initially I was using JMS to listen to messages. I learned that JMS onMessage() is not threaded, so in order to facilitate handling of potentially hundreds of messages at once, I had to implement my own threading framework. Basically I used the Executor class. I could have used MDBs, but they are a lot more heavyweight than I needed, as the code within the onMessage was not using any of the container services.
    We ran into other issues, such as deploying our app in a distributed architecture in the cloud like EC2 was painful at best. Currently the cloud services we found don't support multi-cast so the nice "discover" feature for clustering JMS and other applications wasn't going to work. For some odd reason there seems to be little info on building out a scalable JEE application in the cloud. Even the EC2 techs, and RackSpace and two others had nobody that understood how to do it.
    So in light of this, plus the data we were sending via JMS was a number of different types that had to all be together in a group to be processed.. I started looking at using REST. Java/Jersey (JAX-RS) is so easy to implement and has thus far had wide industry adoption. The fact that our API is already using it on the front end meant I could re-use some of the representations on the back end servers, while a few had to be modified as our public API was not quite needed in full on the back end. Replacing JMS took about a day or so to put the "onmessage" handler into a REST form on the back end servers. Being able to submit an object (via JAXB) from the front servers to the back servers was much nicer to work with than building up a MapMessage object full of Map objects to contain the variety of data elements we needed to send as a group to our back end servers. Since it goes as XML, I am looking at using gzip as well, which should compress it by about 90% or so, making it use much less bandwidth and thus be faster. I don't know how JMS handles large messages. We were using HornetQ server and client.
    So I am curious what anyone thinks.. especially anyone that is knowledgeable with JMS and may understand REST as well. What benefits do we lose out on via JMS. Mind you, we were using a single queue and not broadcasting messages.. we wanted to make sure that one and only one end server got the message and handled it.
    Thanks..look forward to anyone's thoughts on this.

    851827 wrote:
    Thank you for the reply. One of the main reasons to switch to REST was JMS is strongly tied to Java. While I believe it can work with other message brokers that other platforms/languages can also use, we didn't want to spend more time researching all those paths. REST is very simple, works very well and is easy to implement in almost any language and platform. Our architecture is basically a front end rest API consumed by clients, and the back end servers are more like worker threads. We apply a set of rules, validations, and such on the front end, then send the work to be done to the back end. We could do it all in one server tier, but we also want to allow other 3rd parties to implement the "worker" server pieces in their own domains with their own language/platform of choice. Now, with this model, they simply provide a URL to send some REST calls to, and send some REST calls back to our servers.well, this sounds like this would be one of those requirements which might make jms not a good fit. as ejp mentioned, message brokers usually have bindings in multiple languages, so jms does not necessarily restrict you from using other languages/platforms as the worker nodes. using a REST based api certainly makes that more simple, though.
    As for load balancing, I am not entirely sure how glassfish or JBoss does it. Last time I did anything with scaling, it involved load balancers in front of servers that were session/cookie aware for stateful needs, and could round robin or based on some load factor on each server send requests to appropriate servers in a cluster. If you're saying that JBoss and/or GlassFish no longer need that.. then how is it done? I read up on HornetQ where a request sent to one ip/hornetq server could "discover" other servers in a cluster and balance the load by sending requests to other hornetq servers. I assume this is how the JEE containers are now doing it? The problem with that to me is.. you have one server that is loaded with all incoming traffic and then has to resend it on to other servers in the cluster. With enough load, it seems that the glassfish or jboss server become a load balancer and not doing what they were designed to do.. be a JEE container. I don't recall now if load balancing is in the spec or not..I would think it would not be required to be part of a container though, including session replication and such? Is that part of the spec now?you are confusing many different types of scaling. different layers of the jee stack scale in different ways. you usually scale/load balance at the web layer by putting a load balancer in front of your servers. at the ejb layer, however, you don't necessarily need that. in jboss, the client-side stub for invoking remote ejbs in a cluster will actually include the addresses for all the boxes and do some sort of work distribution itself. so, no given ejb server would be receiving all the incoming load. for jms, again, there are various points of work to consider. you have the message broker itself which is scaled/load balanced in whatever fashion it supports (don't know many details on actual message broker impls). but, for the mdbs themselves, each jee server is pretty independent. each jee server in the cluster will start a pool of mdbs and setup a connection to the relevant queue. then, the incoming messages will be distributed to the various servers and mdbs accordingly. again, no single box will be more loaded than any other.
    load balancing/clustering is not part of the jee "spec", but it is one of the many features that a decent jee server will handle for you. the point of jee was to specify patterns for doing work which, if followed, allow the app server to do all the "hard" parts. some of those features are required (transactions, authentication, etc), and some of those features are not (clustering, load-balancing, other robustness features).
    I still would think dedicated load balancers, whether physical hardware or virtual software running in a cloud/VM setup would be a better solution for handling load to different tiers?like i said, that depends on the tier. makes sense in some situations, not others. (for one thing, load-balancers tend to be http based, so they don't work so well for non-http protocols.)

  • How to use same transaction when calling CMP entity beans and  DAO (JDBC)

    We are currently using Weblogic 8.1 SP2 with an Oracle 10g database (using XA thin and non-XA drivers).
    We have a session bean that invokes an entity bean and a DAO (data access object pattern) in order to add data in 2 separate tables (account and history). Rows are added to the first (account) table using a CMP Entity bean while inserts are done in the 2nd (history) table using a DAO. Here is some pseudo code:
    addHistorySessionBean (trans-attribute="Required")
    begin
    Step #1 - call addAccountEntityBean (trans- attribute="Required")
    Step #2 - call addHistoryDAO (get datasource, connection)
    end
    The 2nd table (history) has a foreign key constraint to ensure that the corresponding key exists in the first (account) table. Unfortunately, DAO inserts on the 2nd (history) table fail with a foreign key constraint violation (INTEGRITY CONSTRAINT VIOLATION - PARENT KEY NOT FOUND!) since they cannot see the row added to the 1st (account) table in step #1 by the CMP entity bean.
    How does one ensure that all this is done in a single transaction ? It appears that the app server creates two seperate transactions (one for the session bean facade and the entity bean and a 2nd transaction (when we retrieve a connection using the same data source JNDI name) for the DAO.
    A post on server side suggested using a "<resource-ref>" in the session bean to tie the two potentially separate transactions together, but that does not work for us. However, I am not sure if we are doing that correctly. After we define the resource ref in the session facade bean, do we use the resource ref "name" attribute to lookup the datasource or do we still lookup the datasource by JNDI name ? Do we need to define the resource-ref tag in the entity bean also ?
    Does Weblogic allow using a single transaction for this type of a scenario ? How does one specify within Weblogic that the same transaction should be utilized by the entity bean and any subsequent DAOs?
    People have also suggested that we defer constraint checking until the transaction(s) are committed but that sounds like a work acount without addressing this issue. Would postponing the constraint checking in Oracle cause any additional overhead ?
    Any suggestions with specific examples or documentation on how to address this issue will be gratefully appreciated.

    Thanks for your suggestion. Unfortunately, this does not work since it appears that there are 2 separate transactions going on here. One, the original one initiated by the session bean and used by the entity bean and the other initiated by the DAO. Any other ideas appreciated.
    Hi,
    Try setting the delay-database-inserts tag to
    ejbCreate in RDBMS descriptor file.
    http://bernal/stage/wls/docs81/ejb/DDreference-cmp-jar
    .html#1113981
    vasanthi ramesh

Maybe you are looking for