JMS Queue problems causing EJB to rollback....
We recently purchased WLS 6.1 and we have been using the product for the last few
months. I am having a problem which I have detailed below. I have provided as much
information as possible. If you need additional information, please let me know.
Server A Config:
Pentium III, 1000Mhz
Windows 2000, SP2
WLS WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529
Server B Config:
SunBlade 100
Solaris 5.8
WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529
Server A contains a session EJB called GoalManager. This EJB has a method named cancel().
The transactional attribute for all methods supported by this bean is REQUIRED. GoalManager
uses a transactional data source deployed on Server A named "goal". There is nothing
special about this data source aside from the fact that I have enabled two phase
commit for it because a previous error was indicating that this was a required setting
for the pool. A JMS server exists on Server B. A queue named "emailQueue" is set
up as a destination on this JMS server. I also have a MDB on Server B that listens
for messages on this queue. When a message is received, the MDB's onMessage() method
extracts some properties from the message and sends an email to the specified recipient
in the message. I have confirmed that this queue and MDB are working properly because
I ran a small test program from the command prompt which creates a message and sends
it to the queue on Server B. The MDB gets the message and sends the email to the
correct recipient, so I am sure there are no misconfigurations on the server.
The problem is as follows: The cancel() method in the GoalManager EJB on Server A
performs some database work. If no exceptions are raised, the last task in the method
attempts to access the queue on Server B and send a message to the queue. Here is
the code that I am using to access the queue:
QueueConnectionFactory queueFactory = (QueueConnectionFactory)context.lookup( "javax.jms.QueueConnectionFactory");
QueueConnection queueConnection = queueFactory.createQueueConnection();
Queue queue = (Queue)context.lookup( "emailQueue");
QueueSession queueSession = queueConnection.createQueueSession( false, Session.AUTO_ACKNOWLEDGE);
QueueSender queueSender = queueSession.createSender( queue);
The cancel() method executes without error, but when the EJB container on Server
A attempts to commit the transaction at the end of the cancel() method, I am receiving
the following error on Server A's log:
<Error> <EJB> <Exception during commit of transaction Name=[EJB com.frx.emp.go.ejb.session.goal.GoalManagerBean.cancelGoal(com.frx.emp.entity.Employee,com.frx.emp.go.entity.Goal)],
Xid=0:7c2dda32cf39a36e(6911242),
Status=Rolled back. [Reason=javax.transaction.xa.XAException],
numRepliesOwedMe=0,
numRepliesOwedOthers=0,
seconds since begin=2,
seconds left=10,
ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=rolledback,assigned=server1),
ServerResourceInfo[JMS_EMailServer_NotDurable]=(state=rolledback,assigned=server1),
SCInfo[FRX+server1]=(state=rolledback),
SCInfo[frxnet+wlsvr1]=(state=rolledback),
properties=({weblogic.transaction.name=[EJB com.frx.emp.go.ejb.session.goal.GoalManagerBean.cancelGoal(com.frx.emp.entity.Employee,com.frx.emp.go.entity.Goal)],
weblogic.jdbc=t3://172.16.200.9:9005}),
OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=server1+172.16.200.9:9005+FRX+,
Resources={})],
CoordinatorURL=server1+172.16.200.9:9005+FRX+): javax.transaction.xa.XAException
at weblogic.jms.backend.BEXAResource.prepare(BEXAResource.java:853)
at weblogic.transaction.internal.ServerResourceInfo.prepare(ServerResourceInfo.java:1124)
at weblogic.transaction.internal.ServerResourceInfo.prepare(ServerResourceInfo.java:370)
at weblogic.transaction.internal.ServerSCInfo.startPrepare(ServerSCInfo.java:186)
at weblogic.transaction.internal.ServerTransactionImpl.localPrepare(ServerTransactionImpl.java:1822)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrepare(ServerTransactionImpl.java:1607)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:218)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:190)
at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:231)
at com.frx.emp.go.ejb.session.goal.GoalManagerBean_e3dvd2_EOImpl.cancelGoal(GoalManagerBean_e3dvd2_EOImpl.java:459)
at com.frx.emp.go.web.handler.UpdateGoalHandler.handleRequest(UpdateGoalHandler.java:55)
at com.frx.emp.web.mvc.HandlerMappedController.service(HandlerMappedController.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'JMS_EMailServer_NotDurable
- with nested exception:
[javax.transaction.xa.XAException]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1475)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:263)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:190)
at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:231)
at com.frx.emp.go.ejb.session.goal.GoalManagerBean_e3dvd2_EOImpl.cancelGoal(GoalManagerBean_e3dvd2_EOImpl.java:459)
at com.frx.emp.go.web.handler.UpdateGoalHandler.handleRequest(UpdateGoalHandler.java:55)
at com.frx.emp.web.mvc.HandlerMappedController.service(HandlerMappedController.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Just a quick note, I tried to change the following line to specify a "transacted"
JMS session by passing "true" to the statement below. When I tested this, the cancel()
method raised no exceptions, but the MDB on Server B is never invoked and the email
is never sent. Strange.
QueueSession queueSession = queueConnection.createQueueSession( true, Session.AUTO_ACKNOWLEDGE);
If you need more info, let me know. I thank you for your help.
Correct. According to the trace you have it set at 10 seconds, while the default is 30 seconds.
Tom
SAF wrote:
> Thanks for the reply.
>
> Increase the trx time? You mean JTA, right?
>
> I already opened a case with BEA, so I'm waiting to get a response from them.
>
> Thanks again,
>
> Raffi
>
> Tom Barnes <[email protected]> wrote:
> >Hi,
> >
> >I looked at the BEXAResource.java source code which the stack trace points
> >at. It seems that from the
> >JMS server's resource manager's point of view, it never heard of the transaction
> >before, indicating
> >that the transaction may have already rolled back. I think this could
> >happen if the transaction
> >times out before commit() is called, but I'm not sure what is wrong in your
> >case -- as according
> >to the trace you provided, your tx is 2 seconds old and your tx-timout is
> >10 seconds.
> >
> >In any case, it looks like the culprit may be in the transaction code and
> >not the JMS code...
> >
> >I suggest:
> > A) increasing your tx timeout (what the heck give it a try)
> > B) could it somehow be a clock synchronization problem? are multiple
> >servers involved?
> > C) posting to the transaction newsgroup
> > D) contacting customer support
> >
> >Tom
> >
> >SAF wrote:
> >
> >> We recently purchased WLS 6.1 and we have been using the product for the
> >last few
> >> months. I am having a problem which I have detailed below. I have provided
> >as much
> >> information as possible. If you need additional information, please let
> >me know.
> >>
> >> Server A Config:
> >> Pentium III, 1000Mhz
> >> Windows 2000, SP2
> >> WLS WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529
> >>
> >> Server B Config:
> >> SunBlade 100
> >> Solaris 5.8
> >> WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529
> >>
> >> Server A contains a session EJB called GoalManager. This EJB has a method
> >named cancel().
> >> The transactional attribute for all methods supported by this bean is
> >REQUIRED. GoalManager
> >> uses a transactional data source deployed on Server A named "goal". There
> >is nothing
> >> special about this data source aside from the fact that I have enabled
> >two phase
> >> commit for it because a previous error was indicating that this was a
> >required setting
> >> for the pool. A JMS server exists on Server B. A queue named "emailQueue"
> >is set
> >> up as a destination on this JMS server. I also have a MDB on Server B
> >that listens
> >> for messages on this queue. When a message is received, the MDB's onMessage()
> >method
> >> extracts some properties from the message and sends an email to the specified
> >recipient
> >> in the message. I have confirmed that this queue and MDB are working properly
> >because
> >> I ran a small test program from the command prompt which creates a message
> >and sends
> >> it to the queue on Server B. The MDB gets the message and sends the email
> >to the
> >> correct recipient, so I am sure there are no misconfigurations on the
> >server.
> >>
> >> The problem is as follows: The cancel() method in the GoalManager EJB
> >on Server A
> >> performs some database work. If no exceptions are raised, the last task
> >in the method
> >> attempts to access the queue on Server B and send a message to the queue.
> >Here is
> >> the code that I am using to access the queue:
> >>
> >> QueueConnectionFactory queueFactory = (QueueConnectionFactory)context.lookup(
> >"javax.jms.QueueConnectionFactory");
> >> QueueConnection queueConnection = queueFactory.createQueueConnection();
> >> Queue queue = (Queue)context.lookup( "emailQueue");
> >> QueueSession queueSession = queueConnection.createQueueSession( false,
> >Session.AUTO_ACKNOWLEDGE);
> >> QueueSender queueSender = queueSession.createSender( queue);
> >>
> >> The cancel() method executes without error, but when the EJB container
> >on Server
> >> A attempts to commit the transaction at the end of the cancel() method,
> >I am receiving
> >> the following error on Server A's log:
> >>
> >> <Error> <EJB> <Exception during commit of transaction Name=[EJB com.frx.emp.go.ejb.session.goal.GoalManagerBean.cancelGoal(com.frx.emp.entity.Employee,com.frx.emp.go.entity.Goal)],
> >> Xid=0:7c2dda32cf39a36e(6911242),
> >> Status=Rolled back. [Reason=javax.transaction.xa.XAException],
> >> numRepliesOwedMe=0,
> >> numRepliesOwedOthers=0,
> >> seconds since begin=2,
> >> seconds left=10,
> >> ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=rolledback,assigned=server1),
> >> ServerResourceInfo[JMS_EMailServer_NotDurable]=(state=rolledback,assigned=server1),
> >> SCInfo[FRX+server1]=(state=rolledback),
> >> SCInfo[frxnet+wlsvr1]=(state=rolledback),
> >> properties=({weblogic.transaction.name=[EJB com.frx.emp.go.ejb.session.goal.GoalManagerBean.cancelGoal(com.frx.emp.entity.Employee,com.frx.emp.go.entity.Goal)],
> >>
> >> weblogic.jdbc=t3://172.16.200.9:9005}),
> >> OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=server1+172.16.200.9:9005+FRX+,
> >> Resources={})],
> >> CoordinatorURL=server1+172.16.200.9:9005+FRX+): javax.transaction.xa.XAException
> >> at weblogic.jms.backend.BEXAResource.prepare(BEXAResource.java:853)
> >> at weblogic.transaction.internal.ServerResourceInfo.prepare(ServerResourceInfo.java:1124)
> >> at weblogic.transaction.internal.ServerResourceInfo.prepare(ServerResourceInfo.java:370)
> >> at weblogic.transaction.internal.ServerSCInfo.startPrepare(ServerSCInfo.java:186)
> >> at weblogic.transaction.internal.ServerTransactionImpl.localPrepare(ServerTransactionImpl.java:1822)
> >> at weblogic.transaction.internal.ServerTransactionImpl.globalPrepare(ServerTransactionImpl.java:1607)
> >> at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:218)
> >> at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:190)
> >> at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:231)
> >> at com.frx.emp.go.ejb.session.goal.GoalManagerBean_e3dvd2_EOImpl.cancelGoal(GoalManagerBean_e3dvd2_EOImpl.java:459)
> >> at com.frx.emp.go.web.handler.UpdateGoalHandler.handleRequest(UpdateGoalHandler.java:55)
> >> at com.frx.emp.web.mvc.HandlerMappedController.service(HandlerMappedController.java:115)
> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
> >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
> >> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
> >> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
> >> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> >> --------------- nested within: ------------------
> >> weblogic.transaction.RollbackException: Could not prepare resource 'JMS_EMailServer_NotDurable
> >> - with nested exception:
> >> [javax.transaction.xa.XAException]
> >> at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1475)
> >> at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:263)
> >> at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:190)
> >> at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:231)
> >> at com.frx.emp.go.ejb.session.goal.GoalManagerBean_e3dvd2_EOImpl.cancelGoal(GoalManagerBean_e3dvd2_EOImpl.java:459)
> >> at com.frx.emp.go.web.handler.UpdateGoalHandler.handleRequest(UpdateGoalHandler.java:55)
> >> at com.frx.emp.web.mvc.HandlerMappedController.service(HandlerMappedController.java:115)
> >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
> >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
> >> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
> >> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
> >> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> >>
> >> Just a quick note, I tried to change the following line to specify a "transacted"
> >> JMS session by passing "true" to the statement below. When I tested this,
> >the cancel()
> >> method raised no exceptions, but the MDB on Server B is never invoked
> >and the email
> >> is never sent. Strange.
> >>
> >> QueueSession queueSession = queueConnection.createQueueSession( true,
> >Session.AUTO_ACKNOWLEDGE);
> >>
> >> If you need more info, let me know. I thank you for your help.
> >
Similar Messages
-
OSB 10.3 JMS queue problem: JMSCorrelationID is null
Hi everybody,
I am new to OSB/ALSB, and need some help regarding JMS message handling. I am trying to put some input data into a JMS queue( say, reqQueue) and to get the response from another JMS queue(say resQueue). My architecture is:
OSB proxy service->OSB business service->JMS queue(reqQueue)->BPEL process(through JMS adapter) ->JMS queue(resQueue)->OSB business service->OSB proxy service.
I have used JMSCorrelationID for response correlation. but my problem is that when I am trying to test the service from proxy service, I am getting the JMSCorrelationId as null in BPEL process as well as in the weblogic server JMS log, and as I am getting the CorrelationId as null, I am unable to correlate the response, so I am not getting any response.
This is urgent, please help me as soon as possible as possible.
Thanks in advance.
JoySovled it..
OSB 10.3 JMS queue problem: JMSCorrelationID is null -
I have an ear that contains 2 Jar (for example JAR1.jar and JAR2.jar).
JAR1 contains the MessageDrivenBean EJB1.
JAR2 contains 2 Stateful EJBs: (for example EJB2 and EJB3).
On webserver there is an JMS Queue called JMSQUEUE.
The behaviour of my system are:
When arrive an message on JMSQUEUE the EJB1 get this message.
I'd like that when a particular external event occurs, the EJB1 stops to process the messages in the JMSQUEUE and that the continue to store all other messages that arrive.
I thought to Undeploy the EJB1 but this is not a good solution, because if i do it, i undeploy all ear and all EJBs contained in the ear!
There is another solution to do this ???
best reagards
SimoneHi Simone,
IMHO, a MDB for might not be the best match for this. Anyway, if you want to keep using it here's a workaround:
void onMessage(Message message) {
if (!enabled()) {
// wait a bit to avoid CPU load
Thread.sleep(10000);
// rollback the message
messageDrivenContext.setRollbackOnly(); // or throw a runtime exception
} else {
// business code here
bool enabled() {
// implement lookup for enabled/disabled condition here
}If you have any more questions on this, feel free to ask in this thread as I'm watching it ;-)
Good luck
Benoit -
JMS queue problem integrating with TIBCO
Hi all!
We have several communication channels between XI 3.0 (SP21) and TIBCO via JMS queues. All of them are working fine except one. This problem only happens in development and quality systems with SP21, production has SP17 and doesn't have this error on the same communication channel.
We are getting the following error in communication channel details...
27-03-2008 16:32:21 XI message ID corresponding to the JMS message ID 'ID:EMS-QUALITY.14C46ECF3303EC:61' has the value 'null', with the ID: prefix removed+
27-03-2008 16:32:21 XI message ID corresponding to JMS message with ID 'ID:EMS-QUALITY.14C46ECF3303EC:61' will be created with same value as JMSCorrelationID with value 'null'+
27-03-2008 16:32:20 Error while processing message 'null'; detailed error description: com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: Error in converting Binary message <?xml version="1.0" encoding="UTF-8"?> <ns0:MT_PedCarga_GE xmlns:ns0="http://pt.galp.is-oil.ec"> <Partner> <ZIDIF>62</ZIDIF> </Partner> <Controle> <Nr_Envio>29183049</Nr_Envio> <Dt_envio>20080229</Dt_envio> <Tipo_Carga>CPAT</Tipo_Carga> <Operador>230</Operador> </Controle> <PedCarga> <FRETE> <Tipo_Registo>N</Tipo_Registo> <Inst_Carreg>ES41</Inst_Carreg> <Data_Execucao>20080228</Data_Execucao> <Resp_Transporte>13</Resp_Transporte> <Transporte> </Transporte> <Transportador>1700</Transportador> <Ref_Externa_head>2008022931859</Ref_Externa_head> <Gera_Docs>X</Gera_Docs> <Imprim_Docs>X</Imprim_Docs> <Imprim_Ordem_Carreg>X</Imprim_Ordem_Carreg> <Confirm_Autom>X</Confirm_Autom> <Operador>230</Operador> </FRETE> <ENTREGA> <Tipo_Destinatario>1</Tipo_Destinatario> <Local_Entrega>14018</Local_Entrega> <Cod_Produto>GOA []</Cod_Produto> <Quantidade>05100</Quantidade> <Ref_Externa_Item>01737307470601</Ref_Externa_Item> <Regime_Fiscal>N</Regime_Fiscal> </ENTREGA> <ENTREGA> <Tipo_Destinatario>1</Tipo_Destinatario> <Local_Entrega>14018</Local_Entrega> <Cod_Produto>GOC []</Cod_Produto> <Quantidade>13300</Quantidade> <Ref_Externa_Item>02737307470602</Ref_Externa_Item> <Regime_Fiscal>R</Regime_Fiscal> </ENTREGA> </PedCarga> </ns0:MT_PedCarga_GE> to XI message for message: null: InvalidParamException: Invalid message id: com.sap.guid.GUIDFormatException+
Any clues?
Regards,
Fernando FigueiredoWe changed the conversation ID from Message ID to Correlation ID.
-
exception trace is comming, while running the project in weblogic, in the project iam using jms queue, i configured the jms server and jms module and connection factory but it is showing these exception
[The selected operation process could not be invoked.
An exception occured while invoking the webservice operation. Please see logs for more details.
oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: InvalidSecurity : error in processing the WS-Security security header]
can any one please, provide the suggestionsi got the solution for my problem, i just need to add owsm policies to my processs
-
Integration Sap PI - JCAPS through JMS queue problem
Hi to all,
we have to send data through Sap PI 7.1 to an application server Sun Seebeyond JCAPS via JNDI JMS.
We created a Simple Java Test Class that sends data to Jcaps Queues using stcms libraries suggested from Sun.
I already tested this code on Eclipse, and it works fine. (Jcaps receive correctly messages sent from Java Class)
Using JMS Communication Channel on Sap PI with same settings used on Java Class (Queue Connection Factory, Initial Context Factory, URL, Queue Name) and deployed the same stcms libraries on PI,
Jcaps doesn't receive any message. In ABAP Monitor and Communication Channel Monitor we don't check any error: infact in CC Monitor a "Succesfully Connected to Queue" is displayed.
During our tests on Java Class, we tried to change CreateQueueSession istruction ( qsession = qcon.createQueueSession( false, javax.jms.Session.CLIENT_ACKNOWLEDGE ));
we checked that any other setting (changing parameters required from Java Method), different from setting just exposed,
messages are not received from Jcaps and we don't have any error during sending operation (like happens in Sap PI).
So correct setting to send message to JCAPS are:
Transacted = False;
acknowledgeMode = CLIENT_ACKNOWLEDGE;
How we can set this parameter in JMS Communication Channel on Sap PI?
If the CC configuration is correct, where we can find the problem and what kind of issue could be? On client side (Sap PI) or on Server side (JCAPS)?
ThanksIn order to set Transacted = false, uncheck "Transactional JMS Session" in the Processing Tab of JMS adapter. Keep in mind that the message delivery is NOT guaranteed in such a scenario. It is recommended to use transactional sessions in JMS scenarios.
The JMS sessions created by JMS adapter are of type "AUTO_ACKNOWLEDGE".
Regards,
TK
Edited by: Sameej T.K. on Oct 20, 2010 10:47 PM -
Can I create multiple QueueReceiver object using createReceiver(queueObj) over same QueueConnection and QueueSession ?
Like :
-------QueueConnectionFactory qConnFactory=null;
QueueConnection qConn =null;
QueueSession qSession=null;
QueueReceiver receiver_1=null;
QueueReceiver receiver_2=null;Multiple Queue Object
Queue queueObjOne=null;
Queue queueObjTwo=null;
qConnFactory= getQueueConnectionFactory();
qConn = (QueueConnection)qConnFactory.createConnection();
qSession=qConn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);start the Queue Connection
qConn.start();Create Receiver One
receiver_1 = qSession.createReceiver(queueObjOne,);Create receiver Two
receiver_2 = qSession.createReceiver(queueObjTwo,);Can any bosy please help whether the approach is Ok or some better way?I don't know about other JMS providers but with SUN MQ, yes, you can have multiple receivers on the same session.
Tom -
Problem with EJB and JMS - Failed to obtain/create connection
hello ejb and jms programmers,
My problem is my topic MDB keep on retrieving the same message when there is a database connection failure. Maybe somebody could help me how to prevent to retrieve the same data?
Given:
- I purposedly turn off the pointbase database because im testing my error handling.
- Im using SJSAS 8 as my application server.
- My message Driven Bean of topic type.
- Im using CMP for my entity bean
Here is the scenario of whats happening - step by step:
1. A separate application publishes a message to JMS queue server
2. My MDB retrieves this message and do some processing then inserts a record (transaction history) in my database
3. But my db is turned off or down
4. My MDB sends a successful processing reply to the JMS queue server
5. Then i noticed that my server.log keeps on growing so when i opened it, the record was not inserted and printed the stacktrace below "RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException" (complete stacktrace below)
6. I understand the cause of the stacktrace is because the DB is turned off. But what i dont understand is that my MDB keeps on reading the same message. Since my MDB is of topic type, isnt a topic MDB supposedly reads a message only once???
So my questions are:
1. how do i handle insert database error?
2. how can i stop my MDB from processing the same message?
3. any better suggestions?
Thank you in advance :)
leigh
*** more complete stack trace ***
[#|2005-01-09T15:35:57.097+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=17;|JTS5041: The resource manager is doing work outside a global transaction
javax.transaction.xa.XAException
at com.pointbase.xa.xaException.getXAException(Unknown Source)
at com.pointbase.xa.xaConnectionResource.start(Unknown Source)
at com.sun.gjc.spi.XAResourceImpl.start(XAResourceImpl.java:162)
[#|2005-01-09T15:35:57.167+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5027:Unexpected exception in resource pooling
javax.transaction.SystemException
at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:185)
at com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:360)
at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:303)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:115)
[#|2005-01-09T15:35:57.177+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException|#]
[#|2005-01-09T15:35:57.227+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException]|#]
[#|2005-01-09T15:35:57.237+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=17;|EJB5071: Some remote or transactional roll back exception occurred
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO77006: SQL exception: state = null, error code = 0.
NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
FailedObjectArray: [[email protected]5ac]
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnectionInternal(TransactionImpl.java:1444)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnection(TransactionImpl.java:1339)Hi annie,
Wherever you are handling database transactions,
you'd not be able to create a Connection if database
is closed (I think you mentioned turning off the
database) then at this condition, you should
certainly throw a System level exception and stop all
processing with some meaningful flow to indicate a
failure (like display message on UI). Even
network problems are handled by exceptions... so I
don't see a reason why you didn't wrap it in the
first place.
Anyway, try handling specific exceptions rather than
the general Exception... this will give you a better
idea of what to do in case of an exception.Yes i know this. I am practicing this in my non-j2ee server applications. But the j2ee app im making, i just pass the db url in the descriptor and the app server automatically creates the connection for my app. So where would i put exception handling?
2. how can i stop my MDB from processing the same
message?Guaranteed delivery is not supposed to stop
processing. It will continue to process the message
after certain intervals till the message is
delivered. You shouldn't deliver it at all, if you
are able to detect that the database is off
The problem here is that my MDB automatically retrieves the message from the JMS queue server. Im not the one retrieving the messages manually.
My assumed behavior of topic MDB is once the a certain MDB retrieves a message it will not retrieve the same message anymore.
thank you in advance.
leigh -
Authentication problem w MDB on WL8.1 and JMS Queue on WL6.1
Hi,
I'm having problems with a MessageDrivenBean that is deployed on a Weblogic 8.1
server. It listens to a JMS Queue on a Weblogic 6.1 server.
I'm getting the following error message upon deployment:
[java.lang.SecurityException: Authentication for user system denied in realm wl_realm
I've made sure that both servers are installed with the user "system" and a password
of "password".
This worked fine for two WL6.1 servers.
Here's my ejb-jar.xml:
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>WebResponseJMSBean</ejb-name>
<ejb-class>com.ditech.webresponse.jms.WebResponseJMSBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<description>Transaction attributes for 'WebResponseJMSBean' methods</description>
<method>
<ejb-name>WebResponseJMSBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Here's my weblogic-ejb-jar.xml:
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>WebResponseJMSBean</ejb-name>
<message-driven-descriptor>
<destination-jndi-name>com.ditech.jms.CowResponseQueue</destination-jndi-name>
<provider-url>t3://localhost:7003</provider-url>
<connection-factory-jndi-name>com.ptp.jms.AppOnlineConnectionFactory</connection-factory-jndi-name>
</message-driven-descriptor>
<jndi-name>ejb/WebResponseJMSBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Can anyone give me any suggestions?
Thanks in advance,
-Ben
We are facing a similar issue, between MDB's and JMS Queues on 2 separated WebLogic
8.1 domains. What I will test next week are:
1. In the domain where my MDB's are deployed, configure Foreign JMS Servers/Connection
Factories/Queues, for which passwords can be specified (not possible in weblogic-ejb-jar.xml)
2. If No.1 does not work, I will add CredentialGenerated="false" in <SecurityConfiguration>
in config.xml in both domains
3. If No. 2 still does not work, I will specify run-as principal and security-role
in my MDB DD files, and specify CredentialMapping via the WebLogic admin console.
Maybe you can try the same?
Eric Ma
"B Liu" <[email protected]> wrote:
>
>Hi,
>
>I'm having problems with a MessageDrivenBean that is deployed on a Weblogic
>8.1
>server. It listens to a JMS Queue on a Weblogic 6.1 server.
>
>I'm getting the following error message upon deployment:
>
>[java.lang.SecurityException: Authentication for user system denied in
>realm wl_realm
>
>I've made sure that both servers are installed with the user "system"
>and a password
>of "password".
>
>This worked fine for two WL6.1 servers.
>
>Here's my ejb-jar.xml:
>
><!DOCTYPE ejb-jar PUBLIC
>
>'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
>
>'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
>
>
><ejb-jar>
>
> <enterprise-beans>
>
> <message-driven>
>
> <ejb-name>WebResponseJMSBean</ejb-name>
> <ejb-class>com.ditech.webresponse.jms.WebResponseJMSBean</ejb-class>
> <transaction-type>Container</transaction-type>
> <message-driven-destination>
> <destination-type>javax.jms.Queue</destination-type>
> </message-driven-destination>
>
> </message-driven>
>
> </enterprise-beans>
>
> <assembly-descriptor>
>
> <container-transaction>
>
> <description>Transaction attributes for 'WebResponseJMSBean'
>methods</description>
> <method>
> <ejb-name>WebResponseJMSBean</ejb-name>
> <method-name>*</method-name>
> </method>
> <trans-attribute>NotSupported</trans-attribute>
>
> </container-transaction>
>
> </assembly-descriptor>
>
></ejb-jar>
>
>Here's my weblogic-ejb-jar.xml:
>
><?xml version="1.0"?>
>
>
>
><!DOCTYPE weblogic-ejb-jar PUBLIC
>
>'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
>
>'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
>
>
><weblogic-ejb-jar>
>
> <weblogic-enterprise-bean>
>
> <ejb-name>WebResponseJMSBean</ejb-name>
>
> <message-driven-descriptor>
>
> <destination-jndi-name>com.ditech.jms.CowResponseQueue</destination-jndi-name>
> <provider-url>t3://localhost:7003</provider-url>
> <connection-factory-jndi-name>com.ptp.jms.AppOnlineConnectionFactory</connection-factory-jndi-name>
> </message-driven-descriptor>
>
> <jndi-name>ejb/WebResponseJMSBean</jndi-name>
>
> </weblogic-enterprise-bean>
>
></weblogic-ejb-jar>
>
>
>Can anyone give me any suggestions?
>
>Thanks in advance,
>-Ben
>
-
Problem Connecting to JMS queue with C sharp client
Hi there,
I am trying to connect to a JMS queue using a C# client but i have a problem trying to connect. The problem comes in when i run the C# script a dialog box appears requesting a T3TransportFactory.cs which i do not have on the client. and when i close it i get an exception on
IContext context = ContextFactory.CreateContext(paramMap);
Exception - Failed to connect using URL <t3://10.103.130.18:7001>
StackTrace - at WebLogic.Messaging.Physical.T3TransportFactory.CreateT3Transport(IDictionary`2 paramMap) in c:\weblogic\dev\src1032\modules\weblogic-jms-dotnetclient\jmsimpl\src\WebLogic\Messaging\Physical\T3TransportFactory.cs:line 226
at WebLogic.Messaging.Physical.ContextPhysical.CreateContext(IDictionary`2 paramMap) in c:\weblogic\dev\src1032\modules\weblogic-jms-dotnetclient\jmsimpl\src\WebLogic\Messaging\Physical\ContextPhysical.cs:line 83
at WebLogic.Messaging.Context.CreateContext(IDictionary`2 paramMap) in c:\weblogic\dev\src1032\modules\weblogic-jms-dotnetclient\jmsimpl\src\WebLogic\Messaging\Context.cs:line 56
The stacktrace indicates that it is looking for a T3TransportFactory.cs file in that particular path on the client (This is my speculation) but this directory path does not exist on the client machine with the c# code.
I got a WebLogic.Messaging.dll referenced in my c# project and the ip/port numbers are correct (we know this cause we tried a java client that connected successfully)
Can anyone assist me on this issue?The issue might be the dll file you are referring to. Did you use the dll from the weblogic installation folder (BEA_HOME/modules/com.bea.weblogic.jms.dotnetclient_1.X.X.X).
Refer - http://docs.oracle.com/cd/E15051_01/wls/docs103/jms_dotnet/install.html#wp1075258
Hope this helps.
Thanks,
Patrick -
Connection Problem To "JMS Queue XML"
Hi.
I can't connect to the JMS Queue XML.While Creating Data Server using the JMS XML Queue Technology pointing to WLS and the XML document type definition (dtd ) file books.dtd is provided from the local(C:\Documents and Settings\348773\Desktop\XML FILES) directory. The connection details are as below:-
Definition Tab:
Connection:
User: userXXX
Password: passYYY
These are user name and password for the application server
JNDI tab:
JNDI Authorization: None
JNDI User/password (same as above)
JNDI Protocol: Undefined
JNDI Driver: weblogic.jndi.WLInitialContextFactory
JNDI URL: http://172.18.41.47:7001?d=C:\Documents and Settings\348773\Desktop\XML FILES\books.dtd&JMS_DESTINATION=jms/demoQueue
JNDI Resource:eis/ConnFact/Queue
FYI:-I h'v just copy and pasted the value of JNDI Driver(weblogic.jndi.WLInitialContextFactory) from a document because I don't know how to find the JNDI drivers name for WLS.I think it is a default name.If I'm wrong then Please tell me how to find it.when I test the connection it shows an error like this:-
java.sql.SQLException: Cannot load connection class because of underlying exception: 'java.sql.SQLException: Cannot load connection class because of underlying exception: 'javax.jms.JMSException: ODI-40201: Cannot create the initial JNDI context)'.'.
at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java:1118)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.getLocalConnect(SnpsDialogTestConnet.java:420)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.localConnect(SnpsDialogTestConnet.java:860)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.jButtonTest_ActionPerformed(SnpsDialogTestConnet.java:806)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.connEtoC1(SnpsDialogTestConnet.java:165)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.access$1(SnpsDialogTestConnet.java:161)
at com.sunopsis.graphical.dialog.SnpsDialogTestConnet$IvjEventHandler.actionPerformed(SnpsDialogTestConnet.java:111)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2319)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6289)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3268)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2042)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2101)
at java.awt.Component.dispatchEvent(Component.java:4483)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2479)
at java.awt.Component.dispatchEvent(Component.java:4483)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:604)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:618)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:175)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:162)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.sql.SQLException: Cannot load connection class because of underlying exception: 'java.sql.SQLException: Cannot load connection class because of underlying exception: 'javax.jms.JMSException: ODI-40201: Cannot create the initial JNDI context)'.'.
at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
at oracle.odi.core.datasource.dwgobject.support.OnConnectOnDisconnectDataSourceAdapter.getConnection(OnConnectOnDisconnectDataSourceAdapter.java:74)
at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter$ConnectionProcessor.run(LoginTimeoutDatasourceAdapter.java:217)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:139)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:909)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: Cannot load connection class because of underlying exception: 'java.sql.SQLException: Cannot load connection class because of underlying exception: 'javax.jms.JMSException: ODI-40201: Cannot create the initial JNDI context)'.'.
at com.sunopsis.jdbc.driver.JMSXMLDriver.connect(JMSXMLDriver.java:113)
at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:409)
at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:385)
at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:352)
at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:331)
... 7 more
Caused by: java.sql.SQLException: Cannot load connection class because of underlying exception: 'javax.jms.JMSException: ODI-40201: Cannot create the initial JNDI context)'.
at com.sunopsis.jdbc.driver.JMSXMLConnection.<init>(JMSXMLConnection.java:295)
at com.sunopsis.jdbc.driver.JMSXMLDriver.connect(JMSXMLDriver.java:99)
... 11 more
So,
please advise
Thanks
AnindyaHi,
Hope till now you might have solved this problem.
If not lets do this below workout , we had same kind of problem.
in JNDI tab , you have JNDI authentication, this authentication is for JNDI resources, I am sure you might be using weblogic credentials.
Steps :
1. Clear JNDI User : Blank (No value)
2. Clear Password : Blank (No Value)
3. set JNDI Authentication as None, regenerate the scenario and check
For accessing JNDI responses , JMS XML Queue uses Connection parameters from Definition tab.
Hope this helps -
How to send to Weblogic 9.1 JMS queue from EJB running in Glassfish?
Hi.
I hope this is the correct forum.
I need to send a message to a jms queue on a remote weblogic 9.1 server. To this end I believe I will have to:
1) Install one or more weblogic client libraries/jar files on my glassfish application server. The weblogic server expects communication in the "t3" protocol, which I believe tunnels iiop, jms etc. inside their own proprietary protocol
2) Define the jms queue in my glassfish application server with a queue connection factory that creates the queue using classes from the weblogic jars?
3) Otherwise code the EJB methods sending messages as I would code and send messages to any jms queue
It's the first two steps that have me baffled. The more I dig in glassfish administrator's manual, the more confused I become.
Anybody have any idea if/how this can be accomplished?
Some reference to where I may find information as to how to accomplish this?
Thank you,
Jacob.Jacob,
I suggest you try, either a GlassFish forum (http://forums.java.net/jive/forum.jspa?forumID=56), or perhaps the GenericJMSRA project https://genericjmsra.dev.java.net .This forum is primarily about the Sun JMS provider, Java MQ or Open MQ -- or the JMS Specification.
-- Ed Bratt -
OC4J 9.0.4: Problem receiving message from JMS queue
I've created an application which puts XML files in a JMS queue and try to get it out again. The enqueing (sending) is no problem, but when I dequeue from the same queue I receive nothing and if I don't specify a wait time the programs hangs.
If I create a QueueBrowser I can see there are messages in the queue.
Can someone tell me what I do wrong?
Here is the code of my dequeue action:
public String dequeue(int qName) throws RbsSysException
final String method = "dequeue(int qName)";
_log.debug(method);
QueueConnection queueConnection = null;
try
queueConnection = _queueConnectionFactory.createQueueConnection();
QueueSession queueSession = queueConnection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
QueueReceiver queueRcv = queueSession.createReceiver(getQueue(qName));
_log.debug("queue = "+ queueRcv.getQueue().getQueueName());
// Due to bug 3376983 in OC4J We cannot use TextMessage if it exceeds
// 64 kb. Therefore use ObjectMessage.
Message msg = queueRcv.receiveNoWait();
_log.debug("msg = " + msg);
ObjectMessage objMsg = (ObjectMessage)msg;
//ObjectMessage objMsg = (ObjectMessage) queueRcv.receiveNoWait();
_log.debug("objMsg = " + objMsg);
if (objMsg != null)
return (String) objMsg.getObject();
else
return null;
catch (JMSException je)
throw new RbsSysException(je);
finally
if (queueConnection != null)
try
queueConnection.close();
catch (Exception any)
_log.error("Error while closing QueueConnection: ", any);
}Did you implement javax.jms.MessageListener and the method onMessage(Message)?
If you use onMessage() as wel as receive (or receiveNoWait() or receive(long)), the onMessage() can be called, while the main thread is blocking on a synchronous receive, so make sure you use only one of the two methods: onMessage() or receive.
Receive() blocks your thread until a message is published. So your program 'hangs' by design. Usually this is used when your program is waiting for a particular message. Otherwise use onMessage().
ReceiveNoWait() checks if something is in the queue at that very moment, so if nothing is there (yet), the main thread continues.
Hope this helps,
Lonneke -
Problem parsing TextMessage from a JMS queue
I'm attempting to read and parse a TextMessage from a JMS queue. The message is in an XML format and I'm trying to parse it using "oraext:parseXML". If I hardcode a value such as:
<copy>
<from expression="'<ns:person xmlns:ns="urn:mynamespace"><ns:personname><ns:first>bob</ns:first></ns:personname></ns:person>'"/>
<to variable="tempString"/>
</copy>
I can then parse "tempString" just fine. If I read the TextMessage in as a string and attempt the same thing, I constantly get
"XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is oraext:parseXML(bpws:getVariableData('tempString')). The XPath expression failed to execute; the reason was: internal xpath error. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. "
If I look at "tempString" in both scenarios (hardcoding the value and reading it in) the contents are basically the same, when reading it in via the JMS queue it does seem to put in line breaks after the elements to format it more like an XML document. For example, coming in from JMS the string looks like:
<ns:person>
<ns:personname>
<ns:first>bob</ns:first>
</ns:personname>
</ns:person>
But hardcoding the value it looks like:
<ns:person><ns:personname><ns:first>bob</ns:first></ns:personname></ns:person>
Should this affect anything?
Thanks.Thanks for the reply. I'm not sure I understand the difference between XML and an XML string. XML is just a well-formed text string, right?
Anyway, your suggestion didn't work for me. The "ora:getContentAsString" call you suggested apparently strips away the XML and gives just the contents. For example, given the XML:
<ns:person>
<ns:personname>
<ns:first>bob</ns:first>
<ns:last>smith</ns:last>
</ns:personname>
</ns:person>
"ora:getContentAsString" yields: "bobsmith", not the data structure.
Again, thanks for the reply. -
JMS Queue servicing algorithm problems
I'm using WLS 5.1, and have run into a problem with the way that WLS
services JMS queues.
I have two queues (Q1 and Q2, created in that order), each of which is
serviced by a session pool.
The problem is that as long as there are messages pending in Q1, there will
be no messages serviced from Q2. The message listeners for Q2 don't get any
work until Q1 is completely empty. If Q1 happens to get a big chunk of
messages dumped into it, then all work on Q2 grinds to a halt until the
first queue is cleared up.
If I reverse the creation order, then the same problem occurs the other way
around.
Are there any patches or workarounds for this? I would have expected a more
balanced approach to servicing the queues.
-Chris Solar, MetaSolv Software.
Known problem with 5.1. No good 5.1 work arounds. Use 6.x or 7.x,
preferably 7.x.
_sjz.
"Chris Solar" <[email protected]> wrote in message
news:[email protected]..
> I'm using WLS 5.1, and have run into a problem with the way that WLS
> services JMS queues.
>
> I have two queues (Q1 and Q2, created in that order), each of which is
> serviced by a session pool.
>
> The problem is that as long as there are messages pending in Q1, there
will
> be no messages serviced from Q2. The message listeners for Q2 don't get
any
> work until Q1 is completely empty. If Q1 happens to get a big chunk of
> messages dumped into it, then all work on Q2 grinds to a halt until the
> first queue is cleared up.
>
> If I reverse the creation order, then the same problem occurs the other
way
> around.
>
> Are there any patches or workarounds for this? I would have expected a
more
> balanced approach to servicing the queues.
>
> -Chris Solar, MetaSolv Software.
>
>
Maybe you are looking for
-
1.1.1 update fixes Exchange email sync issue
Before the update, when I deleted an email on Exchange on my PC and then hit the wireless/update button on the iPhone, the message would be deleted on the phone. But when I deleted an email on the device, it would never get deleted on the Exchange se
-
Error while consuming external WSDL file
Hi, I have created the client proxy for the WSDL file(i.e. .Net webservice's WSDL file). While creating the logical port it is giving the error, 'Error: Uninstantiated object "subject sidl service" in method IF_SRT_WSP_CONFIG_SIDL~CREATE_CLNT_CFG_FRO
-
hi experts, There were some MRP controllers were assigned for User exit in SPRO for planning run (T code :- MD01 ). Now i have defined additional MRP controllers and also assigned them for user exit (in SPRO) for planning run. With old MRP controller
-
Hi Experts, I am working on webdynpro abap,i need material on WEBDYNPRO ABAP PORTAL INTEGRATION if u provide me with screen shots it will be good reference to me. THANKS & REGARDS. krishna.
-
How to call Bex Browser from CRM
Hi I would call the Bex Browser from a CRM user menu. could you help me? thanks! S.