Can you set isolation levels of message-driven bean transactions?

The problem: I have 3 different message-driven beans which each get a different type of message, except for a field that is common to all. That field is used as the primary key of an entity object. The message-driven beans configured to use a container managed transaction. Each message-driven bean, in processing the message, first does a lookup by primary key to see if the object associated with the key exists, and if it does not, it requests the entity's home object to create it. After that, they do further processing. The problem is that sometimes all the beans simultaneously get a message, resulting in each bean checking for the entity object at about the same time, and if they fail to find it (because none of them has created it yet), each creates an object, all with the same primary key. This is not caught until the beans start to complete their onMessage method, which I believe results in the container committing the transaction. One of the transactions will be committed successfully, while the other two will fail, get rolled back, and then be retried with the same message. The second time through, the other beans will find the entity object (since it has been created and committed) and they will complete correctly. In the end, they right thing occurs, except that there is a troubling exception or 2 in the log telling about the constraint violation (with the primary key) and the rollback. If it was just me, that would be fine, but our customer does not like to see exceptions in the log; that indicates to him that something is wrong.
So, I am looking for someway to make sure that the actions of the message-driven beans are serialized. One suggestion from a colleague was to set the isolation level of the transactions being used by the container in processing the message-driven beans' onMessage method. However, the documentation does not mention any way to do this for a message-driven bean. Suggestions?
Is the use of a UserTransaction a better way to do this? If I acquire a UserTransaction within the onMessage method of a message-driven bean, can I set its isolation level? How would this work? When I get a UserTransaction, does each client get a different transaction, or do they all get the same one?

(1) The WebLogic JMS "unit-of-order" feature is a heavily adopted feature that was specifically designed to handle similar use cases - see the JMS developer guide for extensive documentation. In your use case, if "key" is used to define UOO, then there's no limit on the number of keys that can be processed concurrently, but messages for any particular key will be processed single-threaded in the order in which they were first submitted.
Note that if you're using distributed destinations, the UOO feature is still fully supported - but the developer and/or administrator needs to decide whether to configure the destination to use "hash" or "path service" based routing (the JMS UOO edoc outlines the trade-offs).
(2) Another alternative is to use a single MDB with max-beans-free-pool that processes all three types (as the other poster suggested). I think this assumes all MDBs run on the same JVM.
(3) Another alternative is to use multiple queues, with a single MDB on each Q. Where some sort of hash algorithm is used to determine which Q is for the key. This approach is a "hand-coded" variant of the approach in (1) with "hash" based routing enabled...
(4) If all MDBs actually do run in the same JVM, a third alternative is to use code the application to use a common lock to protect each key, eg, something like:
// assume MyLock is simply a class with a "reference counter"
// assume some global "staticHM" hash map that is all MDBs can access
onMessage() {
MyLock lock = null;
key= msg.getKey();
synchronized(staticHM) {
lock = staticHM.get();
if (lock = null) {
lock = new lock();
staticHM.put(key, new lock());
lock.incRefCount();
try {
synchronized(lock) {
// only one onMessage will be able to lock a particular key at a time
do your work;
} finally {
synchronized(staticHT) {
if (lock.defRefCount() == 0) staticHM.remove(lock);
if (lock = null) staticHM.put(key);
If multiple threads get a message with the same key, then only one thread at a time will work on the key.
Hope this helps,
Tom

Similar Messages

  • Can you set log level

    Does weblogic supply any way of setting the level of log messages that
    actually get written out to the log. So that if can turn off all my debug
    messages (e.g. LogServicesDef log, log.info(), log.debug())
    in production. I'm currently doing this with application level code

    Hi,
    Yes, weblogic does supply a way of setting the level of log messages that actually
    get written out to the log.
    This can be changed at Admin Console> idbmsDem
    o> Servers> myserver> Logging> General> Stdout severity threshold>
    Yuan Dai
    BEA Adapter Factory Group
    InfoGain
    408-355-6098
    "maurice lowenthal" <[email protected]> wrote:>Does weblogic supply any way
    of setting the level of log messages that
    actually get written out to the log. So that if can turn off all my debug
    messages (e.g. LogServicesDef log, log.info(), log.debug())
    in production. I'm currently doing this with application level code

  • Can you set the level of the logfile

    Hello,
    Is there a way to set the level off information put in the logfile? How can
    I change this.
    Kind Regards,

    That only sets the level for stdout, not for the logfile.
    regards,
    -Ade
    "Naggi Rao" <[email protected]> wrote in message
    news:[email protected]..
    Console-->Servers-->Myserver--Logging-->Stdout severity threshold
    "Ruud Janssen" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    Is there a way to set the level off information put in the logfile? Howcan
    I change this.
    Kind Regards,

  • Can you set display of 50 messages as a default?

    I could be missing something, such as a preferences screen.  Anyone know?
    Regards,
    Len Swierski

    Len Swierski wrote:
    Ok, thanks, I saw that part.  I just wish it would remember that setting, which it hasn't so far.
    Regards,
    Len Swierski
    exactly. it doesn't remember that setting. i keep going back and it's back to 30.

  • Set isolation level in EJB 2.0

    how can i set isolation level to a transaction in EJB 2.0.
    If anybody can give example code much appriciated

    For 5.1, look at:
              http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#107261
              7
              http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_reference.html#1061916
              "marshalli" <[email protected]> wrote in message
              news:3a59546d$[email protected]..
              >
              > How to set the isolation level(Container Manager or Bean Manager) in EJB.
              Thanks
              >
              >
              

  • Only one Message Driven Bean

    hi
    i have some heavy calculating beans and i want that only one EJB is calculating at one time. can i do this by using Message Driven Beans? is it possible that the server creates only one Message Driven Bean at one time and gets the next one out of the queue when the old one finished calculating?
    thanks, jo

    It is possible to set up that there should be only one mdb in the pool, but it's not quite what mdbs are intended for. Remember that this is an asynchronous message service, and you will not receive a reply after you put a message on the queue.

  • Help Needed in Message Driven Beans

    Hi,
    I am using JMS and MDB for an asynchronuous communication. I configured the JMS on Sun App server successfully. But I am getting a error message for JNDI Naming. It is not able to find the MDB bean in the JNDI. So it is throwing a NameNotFoundException. Can anybody help me out here. What do I need to put in the Web.xml and Sun-web.xml for getting the reference from JNDI. Please help. My session and Entity beans are working fine. Only having problem in MDB.
    Thanks
    Amit

    Just want to get the terminology straight. I assume you mean you have a web component that wants to produce a JMS message that is consumed by a message-driven bean? In that case, what you want to focus on is the name of the queue/topic that will be used. It's not that you're looking up a "message-driven bean" from your client component. You'll need to look up a queue/topic. That same queue/topic will need to be associated with the message-driven bean so that it consumes from the right place.
    To set up the client-side configuration, create a resource-env-ref in your web.xml. Then, in the sun-web.xml, map the resource-env-ref to the global JNDI name of the queue/topic JMS resource you created using the admin tools. Your client code will do a lookup under the java:comp/env namespace for the resource-env-ref.
    Refer to the JMS portion of the J2EE tutorial for more information :
    java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
    Kenneth Saks
    J2EE SDK Team
    SUN Microsystems

  • Asynchronous request/reply with message driven beans?

    HI,
    Can I implement requet/reply with message driven beans in an asynchronous way? If so can somebody give me some hints?
    I read that this can be done by creating a temporary queue on the producer and then calling setJMSReplyTo methond on the request message and passing in the temporary queue. By how do you specify a response message in the MessageDrivenBean, MessageListener class with only onMessage()?
    Thanks

    The MDB can only really be used for the server side of a request-response.
    I'd recommend you look at Lingo which implements request-response remoting using JMS...
    http://lingo.codehaus.org/Example
    James
    http://logicblaze.com/
    Open Source SOA

  • Exception in setting up message-driven bean container: [MQJMS1010: not impl

    Problem
    =======
    We are trying to configure and deploy a Message Driven
    Bean to listen on a WebSphere MQ queue, using LDAP to
    share knowledge of the Queue & Connection Factory.
    But when we start the Sun One domain we get an exception:
    javax.jms.JMSException: MQJMS1010: not implemented
    (see log file at the end of this email)
    Can anybody help please ?
    The configuration of the various components are listed
    below:
    WebSphere MQ Configuration
    ==========================
    Version 5.3
    Queue Manager
    QM_Test
    Queues
    PATH_MFP.Case.Request           
         Queue Type:     Local
    Channels
    Channel_Test               
         Channel Type:     Server Connection
         Protocol Type:     TCP/IP
    LDAP configuration
    ==================
    ldap://localhost/o=mqtest
    cn=MFP_LOCAL_Factory
    javaFactory=com.ibm.mq.jms.MQQueueConnectionFactoryFactory
    javaClassName=com.ibm.mq.jms.MQQueueConnectionFactory
    javaReferenceAddress=#3#QMGR#QM_Test
    javaReferenceAddress=#6#CHAN#Channel_Test
    javaReferenceAddress=#14#TM#SYSTEM.DEFAULT.MODEL.QUEUE
    cn=MFP_LOCAL_Case_Request_Queue
    javaFactory=com.ibm.mq.jms.MQQueueFactory
    javaClassName=com.ibm.mq.jms.MQQueue
    javaReferenceAddress=#9#QU#PATH_MFP.Case.Request
    javaReferenceAddress=#10#QMGR#QM_Test
    EJB configuration
    =================
    ejb-jar.xml
         <message-driven>
    <display-name>ServerMessageDrivenBean</display-name>
    <ejb-name>ServerMessageDrivenBean</ejb-name>
         <ejb-class>nz.co.acc.emi.server.connector.mdb.ServerMessageDrivenBean</ejb-class>
         <transaction-type>Container</transaction-type>
    <message-driven-destination>
              <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
         </message-driven>
    sun-ejb-jar.xml
    <ejb>
         <ejb-name>ServerMessageDrivenBean</ejb-name>
    <jndi-name>MFP_LOCAL_Case_Request_Queue</jndi-name>
         <mdb-connection-factory>
              <jndi-name>MFP_LOCAL_Factory</jndi-name>
         </mdb-connection-factory>
         </ejb>
    Sun One configuration
    =====================
    MFPProcessing: JNDI: External Resources
    MFP_LOCAL_Factory          Enabled javax.jms.QueueConnectionFactory
         JNDI Name:      MFP_LOCAL_Factory
         Resource Type:     javax.jms.QueueConnectionFactory
         JNDI Lookup:     cn=MFP_LOCAL_Factory
         Factoryclass:     com.sun.jndi.ldap.LdapCtxFactory
         Properties:
              java.naming.provider.url          ldap://localhost:389/o=mqtest
              java.naming.security.authentication     none
    MFP_LOCAL_Case_Request_Queue     Enabled javax.jms.Queue
         JNDI Name:      MFP_LOCAL_Case_Request_Queue
         Resource Type:     javax.jms.Queue
         JNDI Lookup:     cn=MFP_LOCAL_Case_Request_Queue
         Factoryclass:     com.sun.jndi.ldap.LdapCtxFactory
         Properties:
              java.naming.provider.url          ldap://localhost:389/o=mqtest
    server.xml
    <mdb-container steady-pool-size="10" pool-resize-quantity="2" max-pool-size="60" idle-timeout-in-seconds="600" monitoring-enabled="true" log-level="FINEST" />
    <jms-service port="1240" admin-user-name="admin" admin-password="admin" init-timeout-in-seconds="30" enabled="true" log-level="FINE" />
    Sun One log file
    ================
    server.log
    [01/Mar/2004:10:06:48] INFO ( 657): CORE1116: Sun ONE Application Server 7.0.0_01
    [01/Mar/2004:10:06:51] INFO ( 657): CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_01] from [Sun Microsystems Inc.]
    [01/Mar/2004:10:07:09] INFO ( 657): JMS5023: JMS service successfully started. Instance Name = domain1_MFPProcessing, Home = [C:/Sun/AppServer7/imq/bin].
    [01/Mar/2004:10:07:13] INFO ( 657): JTS5014: Recoverable JTS instance, serverId = [100]
    [01/Mar/2004:10:07:14] INFO ( 657): RAR5060: Install JDBC Datasources ...
    [01/Mar/2004:10:07:14] INFO ( 657): RAR5059: Binding [JDBC DataSource Name: jdbc/MfsDataSourceJConn, Pool Name: MFSConnectionPool]
    [01/Mar/2004:10:07:15] INFO ( 657): JMS5015: Install JMS resources ...
    [01/Mar/2004:10:07:47] WARNING ( 657): [EntityContainer] Created EntityContainer....
    [01/Mar/2004:10:07:49] INFO ( 657): LDR5010: All ejb(s) of [mfs] loaded successfully!
    [01/Mar/2004:10:07:52] INFO ( 657): MDB00044: Deploying message-driven bean [emi:ServerMessageDrivenBean], consuming from [MFP_LOCAL_Case_Request_Queue]
    [01/Mar/2004:10:07:52] FINE ( 657): Messages delivery is part of a container-managed tx
    [01/Mar/2004:10:07:52] FINE ( 657): emi:ServerMessageDrivenBean:reconnect-delay-in-seconds=60, reconnect-max-retries=60, reconnect-enabled=true
    [01/Mar/2004:10:07:53] INFO ( 657): MDB00028: [emi:ServerMessageDrivenBean]: Message-driven bean container using external connection factory object: [com.ibm.mq.jms.MQQueueConnectionFactory]
    [01/Mar/2004:10:07:55] FINE ( 657): emi:ServerMessageDrivenBean: Setting message-driven bean pool max-pool-size=60, steady-pool-size=10, pool-resize-quantity=2, idle-timeout-in-seconds=600
    [01/Mar/2004:10:07:55] FINE ( 657): Initializing server session factory
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] INFO ( 657): MDB0001: Create message-driven bean pool with maximum pool size [60], bean idle timeout [600] seconds
    [01/Mar/2004:10:07:55] SEVERE ( 657): MDB00030: [emi:ServerMessageDrivenBean]: Exception in setting up message-driven bean container: [MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] FINE ( 657): MDB00018: [emi:ServerMessageDrivenBean]: Closing message-driven bean container connection
    [01/Mar/2004:10:07:55] WARNING ( 657): [AbstractPool]: Cancelled pool timer task at: Mon Mar 01 10:07:55 NZDT 2004
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] SEVERE ( 657): MDB00017: [ServerMessageDrivenBean]: Exception in creating message-driven bean container: [javax.jms.JMSException: MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] SEVERE ( 657): javax.jms.JMSException
    javax.jms.JMSException: MQJMS1010: not implemented
         at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
         at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
         at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
         at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
         at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
         at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
         at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
         at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
         at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
         at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
         at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
         at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
         at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
    [01/Mar/2004:10:07:55] SEVERE ( 657): EJB5090: Exception in creating EJB container [javax.jms.JMSException: MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] SEVERE ( 657): appId=emi moduleName=emiEjb_jar ejbName=ServerMessageDrivenBean
    [01/Mar/2004:10:07:55] SEVERE ( 657): LDR5004: UnExpected error occured while creating ejb container
    javax.jms.JMSException: MQJMS1010: not implemented
         at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
         at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
         at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
         at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
         at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
         at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
         at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
         at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
         at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
         at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
         at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
         at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
         at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
    [01/Mar/2004:10:07:55] WARNING ( 657): CORE5021: Application NOT loaded: [emi]
    [01/Mar/2004:10:07:55] INFO ( 657): WEB0100: Loading web module [mfs:mfs.war] in virtual server [MFPProcessing] at [mfs]
    [01/Mar/2004:10:08:31] INFO ( 657): HTTP3072: HTTP listener http-listener-1 [http://ch042dysz0405:1080] ready to accept requests
    [01/Mar/2004:10:08:31] INFO ( 657): CORE3274: successful server startup
    [01/Mar/2004:10:08:33] INFO ( 657): CORE5053: Application onReady complete.

    Hi,
    You have not created the jms destination queue object
    jms/Warehouse
    Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
    Create jms destination queue object using
    asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme>  jms/Warehouse
    Then use list-jms-resources <instance_name> to
    find if jms/Warehouse destionation queue object has been created.
    Get back in case of any issues

  • BMT - Setting Isolation Level

              (I posted this in ejb but didn't really get a solution that works)
              I'm able to set the isolation level of a CMT using weblogic-ejb-jar.xml without
              any problems. Below is a snipet which shows how that:
              <transaction-isolation> <isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
              <method> <description><![CDATA[Transaction isolation for StateHandlerMessage]]></description>
              <ejb-name>StateHandlerMessage</ejb-name> <method-name>*</method-name> </method>
              </transaction-isolation>
              That works perfectly for a CMT bean, however it does not seem to work for a BMT.
              I'm using weblogic81 in development mode with an oracle jdriver and it seems my
              BMT bean is getting an isolation level of TRANSACTION_SERIALIZABLE.
              Is this a bug? If not how do I set the isolation level for a BMT bean? (I don't
              think I can using Connection.setIsolationLevel since I don't have a connection
              within my Session and Message Beans)
              thanks!
              lance
              

              But weblogic.transaction.Transaction does have setProperty method and you should
              be able to use :
              weblogic.transaction.TxHelper.getTransaction().setProperty() to set that property.
              "Lance" <[email protected]> wrote:
              >
              >Thanks for the reply, however javax.transaction.UserTransaction does
              >not have a
              >.setProperty method.
              >
              >Any ideas?
              >
              >lance
              >
              >"asafbu" <[email protected]> wrote:
              >>
              >>
              >>
              >>You set the isolation level for user transactions in the beans java
              >code.
              >>When
              >>the application runs, the transaction is explicitly started.
              >>
              >>
              >>User Transaction tx = (UserTransaction) ctx.lookup("javax.transaction.UserTransaction");
              >>
              >>tx.begin();
              >>
              >>tx.setProperty (TxConstants.ISOLATION_LEVEL, new Integer
              >> (Connection.TRANSACTION_READ_COMMITED));
              >>....
              >>....
              >>
              >>
              >>
              >>
              >>
              >>"Lance" <[email protected]> wrote:
              >>>
              >>>(I posted this in ejb but didn't really get a solution that works)
              >>>
              >>>I'm able to set the isolation level of a CMT using weblogic-ejb-jar.xml
              >>>without
              >>>any problems. Below is a snipet which shows how that:
              >>>
              >>><transaction-isolation> <isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
              >>><method> <description><![CDATA[Transaction isolation for StateHandlerMessage]]></description>
              >>><ejb-name>StateHandlerMessage</ejb-name> <method-name>*</method-name>
              >>></method>
              >>></transaction-isolation>
              >>>
              >>>That works perfectly for a CMT bean, however it does not seem to work
              >>>for a BMT.
              >>>I'm using weblogic81 in development mode with an oracle jdriver and
              >>it
              >>>seems my
              >>>BMT bean is getting an isolation level of TRANSACTION_SERIALIZABLE.
              >>
              >>>
              >>>Is this a bug? If not how do I set the isolation level for a BMT bean?
              >>> (I don't
              >>>think I can using Connection.setIsolationLevel since I don't have a
              >>connection
              >>>within my Session and Message Beans)
              >>>
              >>>thanks!
              >>>
              >>>lance
              >>>
              >>
              >
              

  • Message-driven bean CMT can not be supported

    Hi,
    I�m trying to use IBM MQSeries 5.3 with S1AS7. The AS and MQ run under W2K SP3. At first I had no problem with deploying and running samples. I used C:\Sun\AppServer7\samples\ejb\mdb\simple\
    I was able to put a test message into MQSeries queue and I saw it was processed by the MDB
    Then I decided to change <transaction-type> from �Bean� to �Container� and I added <assembly-descriptor> where I set <trans-attribute> as �Required�.
    Here is my new ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <!-- Copyright 2002 Sun Microsystems, Inc. All rights reserved. -->
    <ejb-jar>
    <display-name>SimpleMessageJAR</display-name>
    <enterprise-beans>
    <message-driven>
    <display-name>SimpleMessageEJB</display-name>
    <ejb-name>SimpleMessageEJB</ejb-name>
    <ejb-class>samples.ejb.mdb.simple.ejb.SimpleMessageBean</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>
              <method>
                   <ejb-name>SimpleMessageEJB</ejb-name>
                   <method-name>onMessage</method-name>
                   <method-params>
                        <method-param>javax.jms.Message</method-param>
                   </method-params>
              </method>
              <trans-attribute>Required</trans-attribute>
         </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    In this case I have the following server.log
    [15/Dec/2002:15:29:00] FINE ( 1700): Requesting Server Session at: 1039955340843
    [15/Dec/2002:15:29:00] FINE ( 1700): Got Server Session at: 1039955340859(1039955340843)
    [15/Dec/2002:15:29:00] INFO ( 1700): CORE3282: stdout: In SimpleMessageBean.SimpleMessageBean()
    [15/Dec/2002:15:29:00] FINEST ( 1700): Thread[MQQueueAgent (MYASQUEUE),5,RMI Runtime]: got session: com.sun.enterprise.jms.SessionWrapperBase@3c9616 from com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0
    [15/Dec/2002:15:29:00] INFO ( 1700): CORE3282: stdout: In SimpleMessageBean.setMessageDrivenContext()
    [15/Dec/2002:15:29:00] INFO ( 1700): CORE3282: stdout: In SimpleMessageBean.ejbCreate()
    [15/Dec/2002:15:29:00] FINEST ( 1700): start(): calling notify... com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0
    [15/Dec/2002:15:29:00] FINEST ( 1700): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0
    [15/Dec/2002:15:29:00] FINEST ( 1700): Thread[Thread-28,5,RMI Runtime]: run(): calling Session.run() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0
    [15/Dec/2002:15:29:00] FINEST ( 1700): Thread[Thread-28,5,RMI Runtime]: message-driven bean container onMessage :
    JMS Message class: jms_text
    JMSType: null
    JMSDeliveryMode: 1
    JMSExpiration: 0
    JMSPriority: 0
    JMSMessageID: ID:414d5120514d5f636c6f7564202020200628fc3d2000020f
    JMSTimestamp: 1039955340820
    JMSCorrelationID:null
    JMSDestination: null
    JMSReplyTo: null
    JMSRedelivered: false
    JMS_IBM_PutDate:20021215
    JMSXAppID:C:\WINNT\system32\mmc.exe
    JMS_IBM_Format:MQSTR
    JMS_IBM_PutApplType:11
    JMS_IBM_MsgType:8
    JMSXUserID:alex
    JMS_IBM_PutTime:12290082
    JMSXDeliveryCount:1
    111111111111111111
    [15/Dec/2002:15:29:00] FINEST ( 1700): beforeMessageDelivery() not called
    [15/Dec/2002:15:29:00] INFO ( 1700): MDB00040: [mdb-simple:SimpleMessageEJB]: Message-driven bean CMT can not be supported.
    [15/Dec/2002:15:29:00] SEVERE ( 1700): MDB0008: Session.run() throws Exception [Message-driven bean CMT can not be supported.]
    [15/Dec/2002:15:29:00] SEVERE ( 1700): MDB0009: Session.run() throws Exception
    java.lang.RuntimeException: Message-driven bean CMT can not be supported.
         at com.sun.enterprise.jms.SessionWrapperBase.run(SessionWrapperBase.java:200)
         at com.iplanet.ias.ejb.containers.IASServerSessionImpl.run(IASServerSessionImpl.java:191)
         at java.lang.Thread.run(Thread.java:536)
    [15/Dec/2002:15:29:00] FINEST ( 1700): Thread[Thread-28,5,RMI Runtime]: in run(): return object com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0 to pool ...
    [15/Dec/2002:15:29:00] FINEST ( 1700): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0
    If I use internal AS JMS I don�t have any trouble. Everything works fine.
    Why it is possible to use MDB CMT with internal AS JMS provider?
    What should I do to create MDB CMT with IBM MQSeries?
    Alexei Gladkov

    Hi Alexei,
    Sun ONE Application Server 7 does not support CMT MDBs with 3rd party JMS providers. (As you note, BMT MDBs work with MQSeries and Sun ONE App Server).
    With the advent of the next J2EE CA spec version (1.5) and J2EE 1.4, a standard means of hooking JMS providers into app servers and MDBs will be made available. Shortly after J2EE 1.4 is released, you'll see this support in Sun ONE App Server.
    From the J2EE 1.4 spec: "The Connector API now supports integration with asynchronous messaging systems, including the ability to plug in JMS providers."
    Thanks,
    Chris

  • C How to Set Isolation Level in the Connection String

    How to Set Isolation Level in the Connection String using the "Microsoft OLE DB Provider for DB2 Version 4.0"?
    We are trying to move from Crystal Reporting that run against a IBM DB2 database on a mainfram to SSRS reporting and we have downloaded the "Microsoft OLE DB Provider for DB2 Version 4.0" and then worked with the DB2 Administrator to create the
    Packages.  We only have access to use the "Read Uncommitted ("MSUR001") package.   We were able to connect and pull data before he removed access to the other packages, but after setting access the Connection keeps trying to use
    the 'Cursor Stability (MSCS001)" package.   How do we change the Default to the "Read Uncommitted ("MSUR001") package???   Since it is keeps defaulting to the the other package
    we can't connect to do it in the T-SQL query, it has to be set at the Connection String level.

    Hi Dannyboy1263,
    According to your description, you want to set the Transaction Isolation Level in Connection String. Right?
    In Reporting Services, the Connection String for OLE DB Connection can only contains Provider, Data Source and Initial Catalog. There's no property for setting Transaction Isolation Level in the Connection String. Based on my knowledge, we can
    only set the Transaction Isolation Level at Query level or set it by using code (C#, VB, Java...) to call the property of Connection. So unfortunately your requirement can't be achieved currently.
    Reference:
    OLE DB Connection Type (SSRS)
    Data Connections, Data Sources, and Connection Strings in Reporting Services
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Exception in setting up message-driven bean container

    hello,
    I'm trying to deploy a single mdb and I'm getting an exception. I've tried closely following the way things are done with the mdb example in the samples AppServer7 directory. Am I missing something in one of my deployment descriptior files?
    Thanks,
    Robert
    [17/Apr/2003:12:18:24] SEVERE ( 1832): MDB00030: [mdb2-simpleEjb:MessageProcessorBean]: Exception in setting up message-driven bean container: [[C4060]: Login failed.]
    [17/Apr/2003:12:18:24] FINE ( 1832): MDB00018: [mdb2-simpleEjb:MessageProcessorBean]: Closing message-driven bean container connection
    [17/Apr/2003:12:18:24] SEVERE ( 1832): MDB00017: [MessageProcessorBean]: Exception in creating message-driven bean container: [javax.jms.JMSSecurityException: [C4060]: Login failed.]
    [17/Apr/2003:12:18:24] SEVERE ( 1832): javax.jms.JMSSecurityException
    javax.jms.JMSSecurityException: [C4060]: Login failed.
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.authenticate(ProtocolHandler.java:682)
         at com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:615)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.hello(ConnectionImpl.java:238)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1512)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:403)
         at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:234)

    Hi,
    You have not created the jms destination queue object
    jms/Warehouse
    Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
    Create jms destination queue object using
    asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme>  jms/Warehouse
    Then use list-jms-resources <instance_name> to
    find if jms/Warehouse destionation queue object has been created.
    Get back in case of any issues

  • Can you set a project wide time limit?

    I know that you can set a time limit for each question, can you set a time limit for the entire project?

    That variable has really no sense. First of all, you have to create it and it will just be toggled when time is over. I think it is just taken over from the former Timer widget (Timer widget... to stress your learners - Captivate blog) where it had sense, because it didn't have the same functionality of jumping to a slide when time was over. Beware: the timing is not very accurate, it will start with a delay of about 1 second if you put it on the first slide (display for rest of project), and when time is over the message (you cannot escape from it) will display for 2 seconds. Had planned to blog about Timing/Hourglass interactions, but have too many plans that I didn't realize.

  • How can I set it to delete messages off my server after they download?

    How can I set it to delete messages off my server after they download?

    IMAP email is server based. The messages stay on the server and just view them remotely with an email client like Thunderbird. If you want to keep a copy on your computer you need to move a copy of the email message to a folder under Local Folders. If you delete the message off the server, it is going to be gone otherwise.
    The delete from the server option is a POP email server. It does not apply with IMAP email.

Maybe you are looking for

  • How do I make a drop down menu selection show up in another web page?

    What I am trying to accomplish is this.  I have a page with various drop down menu selections that I want to transfer the selection to a secured web page. What happens now is once the selection is made it goes to the secure page but then the user has

  • Safari 2.0 textbox bug?

    I was using Safari 2.0 on MacOS 10.4.2. I loaded a page with a textbox that already contained several lines of text. The text was unreadable because all the characters appear to be piled up on top of one another. This happened on several different pa

  • Lock object vith forgien key

    HI All, I have 4 table that are related via forgin key ,i want to create lock object and my question is if i need to create lock object for each table or just one lock object. Best Regards Joy

  • Gallery Poster template gives fabulous results

    I have been playing around with Pages 2 for the past couple of weeks, for the most part somewhat frustrated with the deceptively simple interface that depends on a lot of "tricks" to getting to various functions--this has sent me to the manual a lot.

  • Process Code for Outbound Idoc

    Hi All, We need to find out the Process Code for an Idoc. Note : We dont have access to WE41, WE20 ,BD51. Could you please suggest any alternatives. Thanks, Sanjeet