MQ with MDB on WL 7.1
I have setup MQ 5.2 and want to use it with MDB's on weblogic 7.1.
I DO NOT WANT TO use bridging.
I have a netscape LDAP server from which i get the JNDI context for the MQ.This
works fine with a pure java client and reciever class.
But when using MDB to recieve i get the following error:
<Sep 3, 2003 11:00:23 AM EDT> <Warning> <EJB> <010061> <The Message-Driven EJB:
com.message.MyMessageDrivenEJB is unable to connect to the JMS destination: JAVA
BEEN.TEST. The EJB container will automatically attempt to re-establish the conn
ection with the JMS server. This warning may occur during WebLogic Cluster start
-up if the JMS destination is located on another server. When the JMS server con
nection is re-established, the Message-Driven EJB will again receive JMS message
s.
The Error was:
The JMS destination with the JNDI name: JAVABEEN.TEST could not be found. Please
ensure that the JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS
d
estination has been deployed.>
here is my weblogic-ejb-jar.xml
<?xml version="1.0" ?>
<!DOCTYPE weblogic-ejb-jar (View Source for full doctype...)>
- <!-- Sample MessageDriven bean Weblogic deployment descriptor
-->
- <weblogic-ejb-jar>
- <weblogic-enterprise-bean>
<ejb-name>com.message.MyMessageDrivenEJB</ejb-name>
- <message-driven-descriptor>
- <pool>
<max-beans-in-free-pool>5</max-beans-in-free-pool>
<initial-beans-in-free-pool>2</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>cn=JAVABEEN.TEST</destination-jndi-name>
<initial-context-factory>com.sun.jndi.ldap.LdapCtxFactory</initial-context-factory>
<provider-url>ldap://aseq05.test.com:1390/ou=jms,ou=naming,o=com.test</provider-url>
<connection-factory-jndi-name>cn=TEST0D2</connection-factory-jndi-name>
</message-driven-descriptor>
<jndi-name>MdbForMQ</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Yes, it works - even transactionally - although sometimes it
takes a little fiddling.
If you haven't already done so, I suggest that you start
by reading the "Using Foreign JMS Providers with WebLogic Server"
white-paper on http://dev2dev.bea.com/technologies/jms/index.jsp
Furthermore note that WL 8.1 contains features that ease
the integration task somewhat (the white-paper was written before 8.1).
Do the tracing flags Greg suggested reveal anything?
Tom
sam wrote:
> Greg,
>
> thks for taking time to respond, i appreciate.
>
> I still cant get this working, can we even use MDB( deployed on WL 7.1) with MQ
> ??
>
> thks
>
> Sam
>
>
>
>
> "Greg Brail" <[email protected]> wrote:
>
>>The basic stuff appears to be there and OK in weblogic-ejb-jar.xml. Are
>>you
>>sure that you have the classes for your LDAP provider in the server's
>>CLASSPATH? That's a pretty common problem.
>>
>>You could also start your server with:
>>
>>-Dweblogic.ejb.jms.connect.debug=true
>>-Dweblogic.ejb.jms.connect.verbose=true
>>
>>and the "StdoutDebugEnabled" flag set on the "Server" element in config.xml.
>>This will cause the EJB container to print all sorts of diagnostic
>>information that should help with the debugging.
>>
>> greg
>>
>>"sam" <[email protected]> wrote in message
>>news:[email protected]...
>>
>>>I have setup MQ 5.2 and want to use it with MDB's on weblogic 7.1.
>>>I DO NOT WANT TO use bridging.
>>>
>>>I have a netscape LDAP server from which i get the JNDI context for
>>
>>the
>>MQ.This
>>
>>>works fine with a pure java client and reciever class.
>>>
>>>But when using MDB to recieve i get the following error:
>>>
>>><Sep 3, 2003 11:00:23 AM EDT> <Warning> <EJB> <010061> <The Message-Driven
>>
>>EJB:
>>
>>>com.message.MyMessageDrivenEJB is unable to connect to the JMS
>>
>>destination: JAVA
>>
>>>BEEN.TEST. The EJB container will automatically attempt to re-establish
>>
>>the conn
>>
>>>ection with the JMS server. This warning may occur during WebLogic
>>
>>Cluster
>>start
>>
>>>-up if the JMS destination is located on another server. When the JMS
>>
>>server con
>>
>>>nection is re-established, the Message-Driven EJB will again receive
>>
>>JMS
>>message
>>
>>>s.
>>>The Error was:
>>>The JMS destination with the JNDI name: JAVABEEN.TEST could not be
>>
>>found.
>>Please
>>
>>> ensure that the JNDI name in the weblogic-ejb-jar.xml is correct,
>>
>>and the
>>JMS
>>
>>>d
>>>estination has been deployed.>
>>>
>>>
>>>here is my weblogic-ejb-jar.xml
>>>
>>>
>>>
>>> <?xml version="1.0" ?>
>>> <!DOCTYPE weblogic-ejb-jar (View Source for full doctype...)>
>>>- <!-- Sample MessageDriven bean Weblogic deployment descriptor
>>> -->
>>>- <weblogic-ejb-jar>
>>>- <weblogic-enterprise-bean>
>>> <ejb-name>com.message.MyMessageDrivenEJB</ejb-name>
>>>- <message-driven-descriptor>
>>>- <pool>
>>> <max-beans-in-free-pool>5</max-beans-in-free-pool>
>>> <initial-beans-in-free-pool>2</initial-beans-in-free-pool>
>>> </pool>
>>> <destination-jndi-name>cn=JAVABEEN.TEST</destination-jndi-name>
>>>
>><initial-context-factory>com.sun.jndi.ldap.LdapCtxFactory</initial-context-f
>>actory>
>>
>>>
>><provider-url>ldap://aseq05.test.com:1390/ou=jms,ou=naming,o=com.test</provi
>>der-url>
>>
>>> <connection-factory-jndi-name>cn=TEST0D2</connection-factory-jndi-name>
>>> </message-driven-descriptor>
>>> <jndi-name>MdbForMQ</jndi-name>
>>> </weblogic-enterprise-bean>
>>> </weblogic-ejb-jar>
>>
>>
>
Similar Messages
-
Deploying J2EE application with MDB
Hi,
I am looking for a solution to deploy a J2EE application with MDB and the resource provider as well. For now, I only see the solution to manually create a resource provider by the EM enterprise console or to add the resource provider into the application.xml in the oc4j instance.
Any help appreciated
PeterHi,
This looks like an incorrect AQ JMS Jar file. Please contact the AQ team if this is a known issue and if required log a tar against AQ.
Thanks
Raja -
Issue with MDB (jms Queue) in weblogic 8.1
Hi all...
I'm facing a strange kind of problem with MDB using weblogic 8.1.
The code worked perfectly in weblogic 7.0.
This is wht i'm trying to achieve..
i'm having a MDB which implements a onMessage().
I'm publishing message thru a standalone client. Publishing works fine..
The problem is onMessage(javax.jms.Message msg) is never been called :-(.
when i monitor it shows that messages are recieved..
Am is missing something that is really important..
here is my code
package com.csxwt.zodiac.service.domain;
import javax.ejb.*;
import javax.jms.*;
import javax.naming.*;
import java.io.Serializable;
//import com.csxwt.zodiac.service.domain.TestObject;
public class MDBTestBean implements MessageDrivenBean, MessageListener {
MessageDrivenContext messageDrivenContext;
public void ejbCreate() throws CreateException {
System.out.println("into the ejb create");
/**@todo Complete this method*/
public void ejbRemove() {
/**@todo Complete this method*/
public void onMessage(javax.jms.Message msg) {
System.out.println("into the onMessage method 1 ");
ObjectMessage objectMsg = null;
String strObject = "Test";
try
System.out.println("into the onMessage method 2 ");
if (msg instanceof ObjectMessage)
System.out.println("into the onMessage method 3");
objectMsg = (ObjectMessage) msg;
Serializable serializableObj = objectMsg.getObject();
String test = serializableObj.toString();
System.out.println("value of the message sent " + test);
TestObject test1 = null;
if(serializableObj instanceof TestObject )
test1 = (TestObject) serializableObj;
System.out.println("after getting the test value ");
System.out.println("getting the test object valuye " + test1.getName());
else
return;
catch (Exception e)
System.out.println("Message Bean:unexpected Exception thrown ");
e.printStackTrace();
public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext)
System.out.println("into MDB context");
this.messageDrivenContext = messageDrivenContext;
here are the 2 xml files....
<ejb-jar>
<enterprise-beans>
<message-driven>
<display-name>MDBTest</display-name>
<ejb-name>MDBTest</ejb-name>
<ejb-class>com.csxwt.zodiac.service.domain.MDBTestBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-selector>GATE_LANE</message-selector>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MDBTest</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>MDBTest</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>200</max-beans-in-free-pool>
<initial-beans-in-free-pool>20</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>zodiac.jms.queue.HardWareOutMessageQueue</destination-jndi-name>
</message-driven-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Am i missing something somewhere?????
any help in this is highly appreciated..
thanks in advance.
r
sasi
Check your log for error and warning messages. If there
are some, they should help trace down the problem. If there
aren't any, try confirm that your MDB is deploying in
the first place.
The MDB below is a Q MDB, but you write below that your client
is a "publisher". "Publisher" implies a topic producer, not
a queue producer, and topic producer can't publish to queues.
Tom
T. Sasii Dharma wrote:
> Hi all...
>
> I'm facing a strange kind of problem with MDB using weblogic 8.1.
> The code worked perfectly in weblogic 7.0.
> This is wht i'm trying to achieve..
> i'm having a MDB which implements a onMessage().
> I'm publishing message thru a standalone client. Publishing works fine..
> The problem is onMessage(javax.jms.Message msg) is never been called :-(.
> when i monitor it shows that messages are recieved..
> Am is missing something that is really important..
>
> here is my code
>
> package com.csxwt.zodiac.service.domain;
>
> import javax.ejb.*;
> import javax.jms.*;
> import javax.naming.*;
> import java.io.Serializable;
> //import com.csxwt.zodiac.service.domain.TestObject;
>
> public class MDBTestBean implements MessageDrivenBean, MessageListener {
> MessageDrivenContext messageDrivenContext;
> public void ejbCreate() throws CreateException {
> System.out.println("into the ejb create");
> /**@todo Complete this method*/
> }
> public void ejbRemove() {
> /**@todo Complete this method*/
> }
> public void onMessage(javax.jms.Message msg) {
> System.out.println("into the onMessage method 1 ");
> ObjectMessage objectMsg = null;
> String strObject = "Test";
> try
> {
> System.out.println("into the onMessage method 2 ");
> if (msg instanceof ObjectMessage)
> {
> System.out.println("into the onMessage method 3");
> objectMsg = (ObjectMessage) msg;
> Serializable serializableObj = objectMsg.getObject();
> String test = serializableObj.toString();
> System.out.println("value of the message sent " + test);
> TestObject test1 = null;
> if(serializableObj instanceof TestObject )
> {
> test1 = (TestObject) serializableObj;
> System.out.println("after getting the test value ");
> System.out.println("getting the test object valuye " + test1.getName());
> }
>
> }
> else
> {
> return;
> }
>
> }
> catch (Exception e)
> {
> System.out.println("Message Bean:unexpected Exception thrown ");
> e.printStackTrace();
> }
>
> }
> public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext)
> {
> System.out.println("into MDB context");
>
> this.messageDrivenContext = messageDrivenContext;
> }
> }
>
>
> here are the 2 xml files....
>
> <ejb-jar>
> <enterprise-beans>
> <message-driven>
> <display-name>MDBTest</display-name>
> <ejb-name>MDBTest</ejb-name>
> <ejb-class>com.csxwt.zodiac.service.domain.MDBTestBean</ejb-class>
> <transaction-type>Container</transaction-type>
> <message-selector>GATE_LANE</message-selector>
> <message-driven-destination>
> <destination-type>javax.jms.Queue</destination-type>
> </message-driven-destination>
> </message-driven>
> </enterprise-beans>
> <assembly-descriptor>
> <container-transaction>
> <method>
> <ejb-name>MDBTest</ejb-name>
> <method-name>*</method-name>
> </method>
> <trans-attribute>Required</trans-attribute>
> </container-transaction>
> </assembly-descriptor>
> </ejb-jar>
>
> <weblogic-ejb-jar>
> <weblogic-enterprise-bean>
> <ejb-name>MDBTest</ejb-name>
> <message-driven-descriptor>
> <pool>
> <max-beans-in-free-pool>200</max-beans-in-free-pool>
> <initial-beans-in-free-pool>20</initial-beans-in-free-pool>
> </pool>
> <destination-jndi-name>zodiac.jms.queue.HardWareOutMessageQueue</destination-jndi-name>
> </message-driven-descriptor>
> </weblogic-enterprise-bean>
> </weblogic-ejb-jar>
>
> Am i missing something somewhere?????
> any help in this is highly appreciated..
>
> thanks in advance.
>
> r
> sasi
-
MS SQL Server problem with MDB's: javax.transaction.xa.XAException
I am programming agents in j2ee and using MDB to implement the asynchronicity of
the agents.
Those MDB's get messages (MapMessage) from a controller (an SFSB) that contain
the agent's ID and the action that the agent has to perform. The MDB creates a
SFSB, and calls the appropriate action from this session bean. Those actions require
to read and write from my MS SQL Server 2000 XA database. But when running my
program, I often get this error, which doesn't seem to affect the action, because
when I check my database data, everything is updated correctly. So the program
still completes, but the errors slow down the execution (the program hangs for
about 3 seconds, each time the error occurs).
Does anybody has an explanation or solution for this?
Thank you...
This is the error output:
onMessage()
Reading MapMessage: 1
<26-apr-2004 14.34 u. CEST> <Error> <EJB> <BEA-010026> <Exception occurred during
commit of transaction Xid=BEA1-005F88135FFBA636FFF7(15619088),Status=Rolled back.
[Reason=javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=4,seconds
left=30,XAServerResourceInfo[JMS_JMS Server2_NotDurable]=(ServerResourceInfo[JMS_JMS
Server2_NotDurable]=(state=rolledback,assigned=lucille3_ms),xar=JMS_JMS Server2_NotDurable),XAServerResourceInfo[MSSQL
Connection Pool]=(ServerResourceInfo[MSSQL Connection Pool]=(state=rolledback,assigned=lucille3_ms),xar=MSSQL
Connection Pool),SCInfo[cluster+lucille3_ms]=(state=rolledback),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+,
XAResources={},NonXAResources={})],CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+):
javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0)returns -4
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown
Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.prepare(Unknown Source)
at weblogic.jdbcx.base.BaseXAResource.prepare(Unknown Source)
at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:821)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'MSSQL Connection
Pool
[BEA][SQLServer JDBC Driver][SQLServer]xa_prepare (0) returns -4 - with nested
exception:
[javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).>
I am programming agents in j2ee and using MDB to implement the asynchronicity of
the agents.
Those MDB's get messages (MapMessage) from a controller (an SFSB) that contain
the agent's ID and the action that the agent has to perform. The MDB creates a
SFSB, and calls the appropriate action from this session bean. Those actions require
to read and write from my MS SQL Server 2000 XA database. But when running my
program, I often get this error, which doesn't seem to affect the action, because
when I check my database data, everything is updated correctly. So the program
still completes, but the errors slow down the execution (the program hangs for
about 3 seconds, each time the error occurs).
Does anybody has an explanation or solution for this?
Thank you...
This is the error output:
onMessage()
Reading MapMessage: 1
<26-apr-2004 14.34 u. CEST> <Error> <EJB> <BEA-010026> <Exception occurred during
commit of transaction Xid=BEA1-005F88135FFBA636FFF7(15619088),Status=Rolled back.
[Reason=javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=4,seconds
left=30,XAServerResourceInfo[JMS_JMS Server2_NotDurable]=(ServerResourceInfo[JMS_JMS
Server2_NotDurable]=(state=rolledback,assigned=lucille3_ms),xar=JMS_JMS Server2_NotDurable),XAServerResourceInfo[MSSQL
Connection Pool]=(ServerResourceInfo[MSSQL Connection Pool]=(state=rolledback,assigned=lucille3_ms),xar=MSSQL
Connection Pool),SCInfo[cluster+lucille3_ms]=(state=rolledback),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+,
XAResources={},NonXAResources={})],CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+):
javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0)returns -4
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown
Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.prepare(Unknown Source)
at weblogic.jdbcx.base.BaseXAResource.prepare(Unknown Source)
at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:821)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'MSSQL Connection
Pool
[BEA][SQLServer JDBC Driver][SQLServer]xa_prepare (0) returns -4 - with nested
exception:
[javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).>
-
Hi,
We currently run WLS 6.1, SP3. We'd like to use Message Driven Beans over MQSeries. Does anyone know what the minimum version of WLS/SP is needed to make this work? Also, is there any clear documentation on the BEA site. I haven't seen anything.
Thanks,
Frank
Hi Frank,
In 6.1 you can use the messaging bridge (with patches) to forward
the MQ messages transactionally to a WL destination, and then have
the MDB transactionally read from the WL destination. Otherwise,
you can use 7.0 to have MQ drive the MDB directly.
I highly recommend you start by reading this white-paper
on dev2dev.bea.com:
"Whitepaper: Using Foreign JMS Providers with WebLogic Server"
Note that this white-paper does not take into account
some 8.1 ease-of-use features that simplify
integration - see the 8.1 release notes for the two following
JMS features:
Foreign Vendor Destination Wrappers
and
Resource-Reference Pools
(I may have the names wrong, but don't have time to look
them up.)
Note also that the very latest version of MQ provides
a remote capable XA JMS client. Previous versions only
supported transactions if the MQ client ran on the same
server as the MQ server.
Tom, BEA
Frank Guerino wrote:
> Hi,
>
> We currently run WLS 6.1, SP3. We'd like to use Message Driven Beans over MQSeries. Does anyone know what the minimum version of WLS/SP is needed to make this work? Also, is there any clear documentation on the BEA site. I haven't seen anything.
>
> Thanks,
>
> Frank
>
-
Null Pointer Exception with MDB
Hi,
I have a problem deploying a MDB which is connecting to a AQ. It works fine when the AQ is in single consumers mode, but with multiple consumers set to true, I get the following error:
04/12/20 16:45:16 java.lang.NullPointerException
04/12/20 16:45:16 at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:1091)
04/12/20 16:45:16 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
04/12/20 16:45:16 at java.lang.Thread.run(Thread.java:534)
Here are my configurations:
orion-ejb-jar:
<message-driven-deployment name="AQReceiver"
destination-location="java:comp/resource/ojmsIZN/Topics/izn_inbound"
connection-factory-location="java:comp/resource/ojmsIZN/TopicConnectionFactories/myQCF"
subscription-name="SUB1">
<resource-ref-mapping name="jms/demoTopic"
location="java:comp/resource/ojmsIZN/Topics/izn_inbound"/>
<resource-ref-mapping name="jms/TopicConnectionFactory"
location="java:comp/resource/ojmsIZN/TopicConnectionFactories/myQCF"/>
</message-driven-deployment>
ejb-jar:
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
</message-driven-destination>
<security-identity/>
<resource-ref>
<description>The log topic where log events are broadcasted...</description>
<res-ref-name>jms/demoTopic</res-ref-name>
<res-type>javax.jms.Topic</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>The Factory used to produce connections to the log topic...</description>
<res-ref-name>jms/TopicConnectionFactory</res-ref-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
Any help is very welcome!
Regards
Peterthanks Timo
through this URL i get possible deletion methods...
pls give more Information about the concept of removeRowWithKey, setCurrentRowWithKey, setCurrentRowWithKeyValue operation.... Just For Knowledge....
Edited by: NZL on Mar 2, 2012 9:37 AM
Edited by: NZL on Mar 2, 2012 9:42 AM -
Help with mdb core analysis tool
Hi,
We are having a possibly memory leak problem but we don't know for sure. In order to find out if there any memory leaks, we are trying to use "mdb" tool that comes along with Solaris (version: SunOS romeo 5.10 Generic_125100-10 sun4v sparc SUNW,Sun-Fire-T200). Problem is when I run "mdb" the module "libumem.so.1" is not loaded. This is what I get
$$mdb core.25688
Loading modules: [ libc.so.1 libuutil.so.1 ld.so.1 ] I have set the following:
UMEM_DEBUG=default
UMEM_LOGGING=transaction
LD_PRELOAD=libumem.so.1
But still no luck. Can anyone tell me what I need to do to load libumem.so.1 module?
Many thanks
PrasadHi guys!
I'm new to Java and need advice on how to develop a
tool that analyses logfiles created by a groupware server.
I need to this for my thesis hence the importance.
Thanks.Ok. What's your question. Or are you looking for someone to write it for you? -
Problem integrating Oracle 9i and Weblogic 7 with MDBs
All:
I would really appreciate an answer to this question.
Background:
- We are using Oracle 9i and Weblogic 7
- I have an MDB that receives a message, then in the onMessage(Message) method
performs a findByPrimaryKey(String).
Problem:
The deployment descriptors and the MDB all work fine when I set them up to query
against a Pointbase database and deploy to Weblogic. Everything worked fine. But
this was only a test to see if everything would work.
I now need to query against an Oracle database. I got the updated version of the
Oracle Thin Driver and put it in the WL_HOME/server/lib/classes12.zip file. I
even added it to the beginning of the classpath in the startWeblogic.cmd file.
But am still having problems.
To test the just the Oracle connection I double checked the user, password, URL,
and driver settings in a java file using JDBC connections - and they worked fine.
They just aren't working when integrated into Weblogic.
The problem lies in the Weblogic 7 server integration with Oracle 9i. The software
integrated fine when tables from a Pointbase database were queried. The only changes
made have been to make the connectivity to Oracle.
My errors are in the attached myserver.log file. If anyone knows if this is a
known problem or what the problem is please let me know.
Just FYI my settings are as follows:
Driver: oracle.jdbc.driver.OracleDriver
URL=jdbc:oracle:thin:@192.168.6.10:1521:proType1
user=protype1
password=protype1
Any advice is welcomed! I've tried everything I can think of.
Angie
[myserver_errors.txt]Hi Angela
you can try the following parameters in the FileRealm.properties to set
acl.reserve.weblogic.jdbc.connectionPool.<connectionPool>=everyone
Thomas
Angela Biche schrieb:
Thanks, I set the initial pool count to 2 and have up to 10
connections (for this testing). Unfortunately it hasn't helped
any.
The error that I am getting is an SQLException:
Exception = Access not allowed
But when I ran the java utils.dbping it makes the connection
with the connection and driver parameters I enter in the console.
I'm still open to ideas on this! :)
Thanks,
Angie -
Durable Subscription with MDB in Weblogic 7.0
Hi,
I am using WLS 7.0 as the JMS Provider and as the EJB Container(no
clustering). My question is do I need MDB with durable subscription. I
cannot think of a instance when the container will be down but JMS
provider is still running if I am using WLS as both container and JMS
provider.
One instance i can think of is if the MDB is not deployed (upon a new
release of our application, for some strange reason) but rest of the
application is deployed then the producers will produce messages for
the off-line subscriber.
If I assume that the above is not likely to happen, can you think of
any compelling reason for me to use MDB with durable subcription .
Thanks for your input.
ssahu
1) The MDB should only specify "durable" if it is receiving from a
topic. Durable does not apply to queues.
2) If messages are non-persistent, then you likely don't need durable.
As these messages don't survive the shutdown...
3) Making it durable helps with race-conditions during shutdown or
startup where messages are sent but the MDB isn't up. It also helps
with the condition where shutdown occurs before the MDB finishes
processing all of its messages. (So Durable ensures that the
MDB does not miss a message. It may even help in the non-persistent
case if is possible that the MDB is temporarily undeployed (by you)
while the server is up.
[email protected] wrote:
> Hi,
> I am using WLS 7.0 as the JMS Provider and as the EJB Container(no
> clustering). My question is do I need MDB with durable subscription. I
> cannot think of a instance when the container will be down but JMS
> provider is still running if I am using WLS as both container and JMS
> provider.
> One instance i can think of is if the MDB is not deployed (upon a new
> release of our application, for some strange reason) but rest of the
> application is deployed then the producers will produce messages for
> the off-line subscriber.
>
> If I assume that the above is not likely to happen, can you think of
> any compelling reason for me to use MDB with durable subcription .
>
> Thanks for your input.
>
> ssahu
-
Re: AQ/Referenceable Objects work with MDB on WebLogic
Great work! So you don't have to touch any of Oracle's classes, correct?
Do you have time to document the whole thing and post it here, including the source
code of all your custom classes?
Eric Ma
"Diptanshu Parui" <[email protected]> wrote:
>
>Forgot to add an important point.
>The extended classes have to in the oracle.jms package (not necessarily
>in the
>same jar) to extend the Oracle classes. And I have used aqapi13.jar.
>
>Dips
>
>"Diptanshu Parui" <[email protected]> wrote:
>>
>>Hi,
>>
>>After days of work on getting to integrate Oracle's AQ with WebLogic
>>I have managed
>>to get to a solution without making changes to the Oracle's AQ API.
>>
>>Eric Ma had managed to provide a solution about an year back changing
>>Oracle's
>>API and making the AQjmsConnection, AQjmsSession, AQjmsQueueConnectionFactory
>>& AQjmsDestination NOT implement Referenceable. This solution worked
>>with WebLogic
>>but meant that this cannot be deployed on Production environment.
>>
>>There was a myth that WebLogic's JNDI didn't provide support to Referenceable
>>objects like Oracle's AQjmsQueueConnectionFactory etc.
>>
>>This myth has been broken. Referenceable object CAN be bound and looked
>>up from
>>WebLogic's JNDI provided right Factory classes are written and the correct
>>constructor
>>for Reference is used in the getReference method of the Referenceable
>>implementation.
>>
>>In case of Oracle's objects, I wrote classes extending AQjmsQueueConnectionFactory
>>& AQjmsDestination. In the extended classes, I wrote toString method
>>and set private
>>String variable.
>>This string variable is just special character separated concat of all
>>parameters
>>used to call the constructor of the extended class.
>>Then, in the getReference method of the extended class, I used the following
>>constructor
>>of Reference.
>>
>>return new Reference( DipsAQQueueConnectionFactory.class.getName(),
>new
>>StringRefAddr("value",
>>value), DipsAQConnectionFactory.class.getName(), null);
>>
>>DipsAQQueueConnectionFactory is my class extending AQjmsQueueConnectionFactory
>>and DipsAQConnectionFactory is the factory class for DipsAQQueueConnectionFactory.
>>The object value passed in the StringRefAddr above is nothing but the
>>toString
>>of the extended class which was stored in the private String variable.
>>In the
>>factory class, the string is taken out the StringRefAddr and stripped
>>to get individual
>>parameters which were separated by special characters. Once, the individual
>>parameters
>>are got back, the Factory class instantiates the Referenceable object
>>and returns
>>it back.
>>
>>Another important point is in the extended class DipsAQQueueConnectionFactory
>>I wrote this method
>> public QueueConnection createQueueConnection() throws JMSException
>>
>> {
>> return createQueueConnection("user","user");
>> }
>>
>>And then using a startup class I bound the DipsAQQueueConnectionFactory
>>& DipsAQDestination
>>Referenceable objects to WLS. The MDB deployed on WLS was made lookup
>>for the
>>bound QF & Q and it started reading AQ messages.
>>
>>Few other points to note.
>>I have kept the user & pwd of WLS same as DB.
>>I have used OCI driver.
>>
>>Please feel free to raise further queries/suggestions.
>>
>>Dips
>
Eric,
This is the relevant part of the config.xml you were looking for.
<JMSDistributedQueue JNDIName="DQueue1" Name="DQueue1" Targets="ClusterTwo" Template="DQueue1">
<JMSDistributedQueueMember JMSQueue="Queue1" Name="DQM1"/>
<JMSDistributedQueueMember JMSQueue="Queue2" Name="DQM2"/>
</JMSDistributedQueue>
<JMSBridgeDestination
ConnectionFactoryJNDIName="AQJMSConnectionFactory" ConnectionURL="t3://ip:port"
DestinationJNDIName="AQJMSQueue" Name="AQJMSDest"/>
<JMSConnectionFactory JNDIName="ConnectionFactory" Name="ConnectionFactory"
ServerAffinityEnabled="false" Targets="IAServer,ClusterTwo" XAConnectionFactoryEnabled="true"/>
<JMSBridgeDestination ConnectionFactoryJNDIName="ConnectionFactory" ConnectionURL="t3://ip:port"
DestinationJNDIName="DQueue1" Name="Dest"/>
<MessagingBridge Name="MB1" QualityOfService="Duplicate-okay"
SourceDestination="AQJMSDest" TargetDestination="Dest"
Targets="IAServer,MS1 (migratable),MS2 (migratable),ClusterTwo"/>
No, I haven't used Oracle's OC4J 10g's AQJMS XA TX support classes.
cheers!
Dips
"Eric Ma" <[email protected]> wrote:
>
>Dips:
>
>Can you post your config.xml here to show how you set up WLS messaging
>bridges?
>
>Also, have you played with OC4J 10g's AQJMS XA TX support classes?
>
>Eric
>
>"Diptanshu Parui" <[email protected]> wrote:
>>
>>The sample code is now available at
>>http://dev2dev.bea.com/codelibrary/code/startupclass.jsp
>>
>>cheers,
>>Dips
>>
>>
>>"Diptanshu Parui" <[email protected]> wrote:
>>>
>>>Yes, no need to touch Oracle's code at all.
>>>
>>>I will post the whitepaper/code soon.
>>>
>>>
>>>"Eric Ma" <[email protected]> wrote:
>>>>
>>>>Great work! So you don't have to touch any of Oracle's classes, correct?
>>>>
>>>>Do you have time to document the whole thing and post it here, including
>>>>the source
>>>>code of all your custom classes?
>>>>
>>>>Eric Ma
>>>>
>>>>
>>>>"Diptanshu Parui" <[email protected]> wrote:
>>>>>
>>>>>Forgot to add an important point.
>>>>>The extended classes have to in the oracle.jms package (not necessarily
>>>>>in the
>>>>>same jar) to extend the Oracle classes. And I have used aqapi13.jar.
>>>>>
>>>>>Dips
>>>>>
>>>>>"Diptanshu Parui" <[email protected]> wrote:
>>>>>>
>>>>>>Hi,
>>>>>>
>>>>>>After days of work on getting to integrate Oracle's AQ with WebLogic
>>>>>>I have managed
>>>>>>to get to a solution without making changes to the Oracle's AQ API.
>>>>>>
>>>>>>Eric Ma had managed to provide a solution about an year back changing
>>>>>>Oracle's
>>>>>>API and making the AQjmsConnection, AQjmsSession, AQjmsQueueConnectionFactory
>>>>>>& AQjmsDestination NOT implement Referenceable. This solution worked
>>>>>>with WebLogic
>>>>>>but meant that this cannot be deployed on Production environment.
>>>>>>
>>>>>>There was a myth that WebLogic's JNDI didn't provide support to
>Referenceable
>>>>>>objects like Oracle's AQjmsQueueConnectionFactory etc.
>>>>>>
>>>>>>This myth has been broken. Referenceable object CAN be bound and
>>looked
>>>>>>up from
>>>>>>WebLogic's JNDI provided right Factory classes are written and the
>>>>correct
>>>>>>constructor
>>>>>>for Reference is used in the getReference method of the Referenceable
>>>>>>implementation.
>>>>>>
>>>>>>In case of Oracle's objects, I wrote classes extending AQjmsQueueConnectionFactory
>>>>>>& AQjmsDestination. In the extended classes, I wrote toString method
>>>>>>and set private
>>>>>>String variable.
>>>>>>This string variable is just special character separated concat
>of
>>>>all
>>>>>>parameters
>>>>>>used to call the constructor of the extended class.
>>>>>>Then, in the getReference method of the extended class, I used the
>>>>following
>>>>>>constructor
>>>>>>of Reference.
>>>>>>
>>>>>>return new Reference( DipsAQQueueConnectionFactory.class.getName(),
>>>>>new
>>>>>>StringRefAddr("value",
>>>>>>value), DipsAQConnectionFactory.class.getName(), null);
>>>>>>
>>>>>>DipsAQQueueConnectionFactory is my class extending AQjmsQueueConnectionFactory
>>>>>>and DipsAQConnectionFactory is the factory class for DipsAQQueueConnectionFactory.
>>>>>>The object value passed in the StringRefAddr above is nothing but
>>>the
>>>>>>toString
>>>>>>of the extended class which was stored in the private String variable.
>>>>>>In the
>>>>>>factory class, the string is taken out the StringRefAddr and stripped
>>>>>>to get individual
>>>>>>parameters which were separated by special characters. Once, the
>>individual
>>>>>>parameters
>>>>>>are got back, the Factory class instantiates the Referenceable object
>>>>>>and returns
>>>>>>it back.
>>>>>>
>>>>>>Another important point is in the extended class DipsAQQueueConnectionFactory
>>>>>>I wrote this method
>>>>>> public QueueConnection createQueueConnection() throws JMSException
>>>>>>
>>>>>> {
>>>>>> return createQueueConnection("user","user");
>>>>>> }
>>>>>>
>>>>>>And then using a startup class I bound the DipsAQQueueConnectionFactory
>>>>>>& DipsAQDestination
>>>>>>Referenceable objects to WLS. The MDB deployed on WLS was made lookup
>>>>>>for the
>>>>>>bound QF & Q and it started reading AQ messages.
>>>>>>
>>>>>>Few other points to note.
>>>>>>I have kept the user & pwd of WLS same as DB.
>>>>>>I have used OCI driver.
>>>>>>
>>>>>>Please feel free to raise further queries/suggestions.
>>>>>>
>>>>>>Dips
>>>>>
>>>>
>>>
>>
>
-
What am I doing wrong with my MDB? I have written before to this groups and
I thought this would fix itself due to the new SP Bea released but it is
either still a bug or I am still lost.
My MDB works fine, the onMessage method is invoked alright and all tasks are
performed well until I try to call another bean, a session bean which is
protected in my deployment descriptor to only be run if you are in the
administration role. So, I set the security-identity to be
use-calle-identity for the MDB and log on to the system as a administrator.
But no, the MDB still throws a security exception saying I don't have enough
permission to access and create the session bean.
Have anyone seen this? Please?
It works fine to access the session bean direct with the same user as I
mentioned before.
Another try I have done is to use the run-as but weblogic does not allow me
to specify a group pnly a user to run the bean as and that is not very good.
Lika I said, there might be some things I have not foreseen please show me
the right direction.
regards, AndersThis is user to user forum only, so no one on these boards can answer your questions. When the contracts for all Canadian copyright holders are in place for Apple to distribute this content in the store, Apple will announce. Until then, anything else that may be discussed is strictly speculation & speculation on new products or services from Apple is against the "terms of use" of these forums. Sorry.
-
WL6.1 - browsing and receiving from queues with MDBs
Hi all,
I have hit on a problem that has been brought up previously without,
as far as I can tell, any conclusive response.
I am using a queue which is processed by message driven beans. This
queue contains jobs which may take a long time to execute and hence it
is important to allow users to manage the queue. Ideally this
management should work in the same way as, say, a printer queue where
it is possible to view queued jobs and cancel them if necessary.
It has been said that MDBs in WLS6.1 use an internal pipeline which
[quote from previous thread " QueueBrowser not working in WL6"]
"uses an optimistic algorithm and pushes the message at the bean
before it is ready"
and, sure enough, pointing a queue browser, activated from a JSP, at
the queue always returns a queue length of zero, whatever the number
of pooled MDBs and whatever the actual number of messages queued. I
have worked around this by creating a second 'monitoring' queue not
listened to by any MDBs and which I then have to manually synchronise
with the 'real' jobs queue. However, removing jobs does not work
either (I am storing the job message ID and trying to access the jobs
queue using this as a selector) since the queue is empty when looked
at from any client which is not the listening MDB. In contrast with
the browsing, there seems to be no obvious way around this as I need
to access the jobs queue itself before I can remove any jobs.
My intended 'queue management' functionality does not seem
particularly esoteric to me and hence I am puzzled that this appears
difficult to implement. I have therefore been wondering whether I have
been missing any obvious point and I would be grateful to hear of
anybody else's experiences trying to achieve similar functionality.
It would also be interesting to hear whether moving to WLS 7.0 would
change/fix this 'pipelining' behaviour of MDBs.
Many thanks.
Peter
Hi Peter,
Since 6.0, when pipelining was introduced,
the pipeline size is configurable via the connection
factory (see "MessagesMaximum"). To tune this setting,
you will need to configure a
custom connection factory for the MDB rather than use
the default one, and specify its name in the xml descriptor.
I'm a little surprised you did not find reference to this
setting in your search.
Regardless, you will not be able to stop the current message in the MDB.
In the next release (beta December) you can force the current tx to
rollback through the JTA mbeans. Of course, this won't stop
the onMessage() from continuing its work, but it will
guarantee that any of its transactional
work will be ultimately discarded.
Since the app server has no control of the thread
once it is passed to the MDB app (it can't just kill
the thread), you will need to roll your
own mechanism to make it stop. One possibility is to have your MDB
"register" that it is starting with a "manager" application, and then
have the MDB poll this application to see if the system admin
has requested that the current job be aborted.
You will likely find it useful to read through the JMS FAQ. You
might also find it useful to look at the jsp queue browser app
posted on dev2dev by Adarsh...
Tom, BEA
P.S. The release after next release will contain more advanced message
management features.
Peter Case wrote:
> Hi all,
>
> I have hit on a problem that has been brought up previously without,
> as far as I can tell, any conclusive response.
> I am using a queue which is processed by message driven beans. This
> queue contains jobs which may take a long time to execute and hence it
> is important to allow users to manage the queue. Ideally this
> management should work in the same way as, say, a printer queue where
> it is possible to view queued jobs and cancel them if necessary.
> It has been said that MDBs in WLS6.1 use an internal pipeline which
>
> [quote from previous thread " QueueBrowser not working in WL6"]
> "uses an optimistic algorithm and pushes the message at the bean
> before it is ready"
>
>
> and, sure enough, pointing a queue browser, activated from a JSP, at
> the queue always returns a queue length of zero, whatever the number
> of pooled MDBs and whatever the actual number of messages queued. I
> have worked around this by creating a second 'monitoring' queue not
> listened to by any MDBs and which I then have to manually synchronise
> with the 'real' jobs queue. However, removing jobs does not work
> either (I am storing the job message ID and trying to access the jobs
> queue using this as a selector) since the queue is empty when looked
> at from any client which is not the listening MDB. In contrast with
> the browsing, there seems to be no obvious way around this as I need
> to access the jobs queue itself before I can remove any jobs.
> My intended 'queue management' functionality does not seem
> particularly esoteric to me and hence I am puzzled that this appears
> difficult to implement. I have therefore been wondering whether I have
> been missing any obvious point and I would be grateful to hear of
> anybody else's experiences trying to achieve similar functionality.
> It would also be interesting to hear whether moving to WLS 7.0 would
> change/fix this 'pipelining' behaviour of MDBs.
>
> Many thanks.
>
> Peter
-
Hi All,
Here is my situation. I have a JMS Queue and a MDB that consumes the messages delivered to this queue. In the OnMessage method of the MDB,I do some business processing including talking to a database. My requirement is that if the database is not available for some reason,I have to keep retrying the whole thing for half an hour at some predefined intervals. How can this be achieved?
Thankshi.
i agree with arnaud that the use of timer is better. thanks for that, arnaud.
additionally, i'd like to add that i don't think you should use a transaction for this sort of messaging, since from what i understand, you are talking single messaging here, and creating transactions for a single message flow is an overkill for most needs. also, it takes a lot of resources from the application server.
the other point to consider is that you are not talking about a case where a message did not reach it's destination. as far as the messaging provider is concerned, the message was consumed by the MDB, and the problem occured in latter processing. you also, as crackers noted, have the issue of configuring the provider to handle the redeliveries, which is again a pain in a body-part.
i think this is a design-related case, and i might go over the messaging-provider's acks here, and send acks on a different queue.
nimo. -
Java on Linux with .MDB file
Hi,
I have created a small java project (experementing actually) to connect to my database .mdb in windows. it works find in my windows environment (Vista + Java + .mdb). I created a .jar file and try to execute it in the Linux (obundu) the program opens but it does not connect to the database instead it throws an error (null),
I am using the DNSless connection. I have attached the code for checking
Connection getConnection() throws Exception {
try{
String dir=System.getProperty("user.dir")+"/db/Client.mdb";
System.out.println("1");
Driver d = (Driver)Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
System.out.println("2");
Connection c=DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver(*.mdb)};DBQ="+dir, "admin", "pass");
System.out.println("3");
return c;
catch (exception e){
System.out.println(e.getMessage());
System.out.println("4");
}When I run this code in linux (I have included some print statements for debugging purpose) it print 1,2,null,4
but with windows 1,2,3 (which has opened the connection)
could anyone help me with this connection. I have even installed jdk 6 with netbeans in my linux pc to re-compile in linux itself to check. I still get the same error. the programme not connecting to the database
Thanksjwenting wrote:
jschell wrote:
jwenting wrote:
there is no ODBC on Linux, hence no bridge driver.ODBC exists on unix.not as standard. Not sure what you mean. It available for most flavors of unix including linux, solaris, OSX, HPUX and AIX.
How more 'standard' does it need to be?
Even if it is installed on OPs machine, it's a fair bet that OP doesn't have a valid DSN set up and doesn't know how to configure one.Could be. But the fact that they are using MS Access means that that point is meaningless.
>
Bridge driver exists on linux.
never seen it, but then I've never looked for it because it's rubbish.That for course doesn't mean it doesn't exist. It exists in all of the Sun VM releases.
>>>
You never use the bridge driver. Not only is it complete rubbish, but it is also a class from the sun.* packages and none of those should ever be used directly.The notation of the bridge driver being a sun.* package is not relevant. One must use the bridge driver or another ODBC driver when using an ODBC only source.
One should never use the bridge driver. It's rubbish. See the documentation for the driver.The driver was donated to Sun by a company that was at the time and still does sell java ODBC drivers. The documentation was probably worded that way specifically to steer people to the commercial drivers.
I have never seen a single problem with the driver itself. The driver up until recently I believe (rather strongly since I have seen bug reports on it for interim releases) was used for unit testing all of the JDBC functonality for the Sun VM releases.
When it was released it was basically the only driver and certainly the only free one. I am rather certain that many projects were successful with it. It was certainly used successfully by me on a large system.
If you insist on using ODBC through Java, get another driver.
mdb file is a MS Access file.I know that... It's however completely irrelevant here, as all that counts is that there's a bad driver being used (and almost certainly incorrectly too).You have a completely different view of the problem domain than I do then. I provided all of the possible solutions for the problem domain that I saw. -
Database transaction management with MDB
Hi all,
I'm working on an Online Order Processing system. One of the functionalities that we've developed is mass order upload, that consists of one CSV file with a lot of orders inside.
To have concurrent processing on the processing of an order upload file (as the orders present in file are independent of each), we've implemented a Message Driven Bean that receives an order to process in a request queue, processes the order and answers with the processed order in a response queue. The flow is like:
1- Struts action is invoked to handle order upload.
2- A method on a session bean is called to process the file.
3- The session bean parses the file, separates all the order lines by origin customer (one order for each customer in the file) and sends messages to the request queue.
4- For each order, an instance of the MDB will receive the message, process the order and send the processed order via response queue.
5- After the Session Bean sends all the requests with the orders to process, he will wait for all the responses in the response queue until all the orders are processed and provide a valid answer, according to the whole process result, to the online user.
My doubt is how can I manage efficiently transactions (mainly database transactions) so if inside a bunch of 200 orders processed concurrently one fails, I am able to rollback all the database transactions used by the MDB to process all the orders?
As the failure of an order can be related to some error in the file, I want to rollback everything, give a message to the user to fix the file and allow him to upload the whole file (fixed) again.
Any help would be appreciated.
Regards,
CamposHi,
1) As Of Version 4.6 C BAPIs has autocommit.ie Once you call a BAPI from anywhere before it returns it commits.So, we no need to worry about that.
But some BAPI's doesn't in that case only we need to make COMMIT call.
2)Transaction doesn't depend on Client object.
3)No.
Regards,
Abdul Raheem .S
Maybe you are looking for
-
Air 2.7 is installed but can't be opened to download Muse(Beta)
Hello There, OS: Windows Vista Premium I have just installed Adobe Air 2.7 to download and test the Adobe Muse(code name) Beta. Whenever I click the Get Muse on http://muse.adobe.com/learn.html an error message appears: "Something went wrong trying
-
I'm having problems with the Spry Widgets, Help!
I'm using Dreamweaver CS6 and Have installed it twice, to no avail. When I try to insert any of the spry widgets, I get the HTML code for the widget but none of the javascript or css code and I cannot figure out why. Also, The Spryassets folder nev
-
Script to force Full Screen SWF?
I'm creating eBrochures in ID_CS5 but looking to create SWFs that fun full screen for local playback, not web based. Is the full screen paramter scriptable from within ID so that the SWF opens as such ?
-
Consider the pending PO and Purchase requisition fore cast base planning (vv)
Dear friends, Our client at presently they are using Forecast based planning for RAW material , in that requirement will not consider Pending Pur req and PO, Is that any option for consider pending PO for Forecast based planning , kindly do the need
-
How to add a table to Favorites
Hello Friends I have this table that I keep using regularly. Everytime I want to use it, I have to give transaction code SE11 and then select the table I want etc. etc., Instead, is there a way to just put it on my favorite and once I click on it, it