Send message to WebSphere MQ resource adapter - how?

Hi,
has anybody a working sample how an Weblogic EJB can write to an MQ queue via the WebSphere MQ resource adapter?
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/uj40010_.htm
I took Adrian Cole's sample from
WebSphere MQ resource adapter  and Weblogic - how?
the message driven bean works, but for outbound I couldn't get it to work.
I used
     @Resource(name = "wmq/ConnectionFactory")
     private javax.jms.ConnectionFactory queueConnectionFactory;
     Connection connection = null;
     connection = queueConnectionFactory.createConnection();
     Session sess = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
     MessageProducer messageProducer = sess.createProducer(queue);
     messageProducer.send(msg);
     connection.close();
But then I get
javax.jms.JMSException: [JMSPool:169819]There was an error with a resource pool used to pool JMS sessions: weblogic.common.ResourceException: 0:javax.jms.JMSException: MQJCA1018:Only one session per connection allowed.
Can't I use the Resource Adapter to trigger an MDB and write in the same application to the same Resource Adapter?
Thanks,
Juergen

By using @Resource you activate Session pooling [http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jms/j2ee.htm]. Although you constantly create and close the connection, you end up with one connection and multiple Sessions created out of it when there is sufficient concurrency. In JCA, ManagedConnection represents a single Resource (because it also deals with JDBC). In JMS, a Session is a resource. Session pooling violates the requirement "one resource per managed connection" which is what MQ Resource Adapter is telling [http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/uj40030_.htm].
Some possible solutions:
* Set max-beans-in-free-pool 1 in weblogic-ejb-jar.xml
* disable wls Session pooling by simply looking up using InitialContext.lookup. WLS session pool is redundant because resource adapters usually pool connections [http://download.oracle.com/docs/cd/E12840_01/wls/docs103/resadapter/connect.html]. Define outbound resource adapter use its connection factory.

Similar Messages

  • WebSphere MQ resource adapter  and Weblogic - how?

    Hi,
    has anybody managed to get the WebSphere MQ resource adapter to run with Weblogic 10.3 ?
    (http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzaw.doc/uj40010_.htm)
    I got it deployed, but it never triggers. I only made changes to the ra.xml, do I also need a weblogic-ra.xml?
    Has anybody a sample for the WebSphere MQ resource adapter?
    Thanks very much,
    Juergen

    Here's an example resource adapter configuration you can use
    * weblogic-ra.xml - http://pastie.org/294590
    * note: you have to edit ra.xml manually to change transaction type from Local to XA, etc.
    This configures:
    * the resource adapter (needed for MDBs) to the jndi name wmq/Connector
    * a queue for outbound messages to the jndi name wmq/Queue1
    a connection factory for outbound messages to the jndi name wmq/ConnectionFactory
    Here's an example MDB that uses the above adapter
    * ejb-jar.xml - http://pastie.org/294594
    * weblogic-ejb-jar.xml - http://pastie.org/294597
    * note: useJNDI doesn't seem to work on WLS. Otherwise, you could setup the queue in your weblogic-ra.xml and then reference the jndi name in the ejb-jar.xml. This limitation clutters the ejb-jar.xml with implementation details of websphere, which are tricky to inject (deployment plan, xslt, etc.). That said, this does work.
    * note: If you want consistent control of the amount of consumers you have on a queue, set the ejb-jar.xml activation-config maxPoolDepth == weblogic-ejb-jar.xml max-beans-in-free-pool
    This configures:
    * an mdb instance listening on a specific WMQ destination
    I hope this helps. It is the result of may months of effort between Bea and IBM, and with me in the middle! ;)
    Cheers,
    -Adrian
    Edited by: ferncam1 on Oct 17, 2008 5:31 AM

  • Messages on my MacBook Air won't send messages over iMessage. Anyone know how to fix this?

    In preferences, under accounts, it claims that my Apple iD is hooked up to messages, including my phone number and email address...yet it isn't sending messages they always fail. Does anyone know how to fix this problem? It would be a great help.

    Read this whole message before doing anything.
    Back up all data.
    Quit Messages if it’s running.
    Step 1
    Hold down the option key and select
    Go ▹ Library
    from the Finder menu bar. Move the following items from the Library folder to the Trash (either may not exist):
    Caches/com.apple.Messages
    Caches/com.apple.imfoundation.IMRemoteURLConnectionAgent
    Leave the Library folder open. Log out and log back in. Try Messages again. If it works now, stop here. Close the Library folder.
    Step 2
    If you still have problems, quit Messages again. Go back to the Finder and move the following item from the open Library folder to the Desktop:
    Messages
    Note: you are not moving the Messages application. You’re moving a folder named “Messages.”
    Test. If Messages now works, delete the Messages folder on the Desktop. Otherwise, quit Messages again. Put back the folder you moved, overwriting the newer one that may have been created in its place, and continue.
    Step 3
    In the Preferences subfolder, there may be several files having names that begin with "com.apple.iChat". Move them all to the Desktop. There may also be a file with the name "com.apple.imagent.plist". Move that to the Trash.
    Also in the Preferences folder, there's a subfolder named "ByHost". Open it and do the same thing.
    Log out and log back in. Test again. This time Messages should perform normally, but your settings will be lost. You may be able to put back some of the files you moved to the Desktop in this step. Relaunch and test after each one. Eventually you should find one or more that causes Messages to malfunction. Delete those files and recreate whatever settings they contained.
    If the issue is still not resolved, quit Messages again and put all the items you moved to the Desktop back where they were. You don’t need to replace the items you moved to the Trash. Stop here and post again.
    If you later decide that you don’t like the results of steps 2 and 3, you can undo them completely by quitting Messages and restoring the items you deleted in those steps from your backup.

  • I have a dll file, i want to send messages from this to the device ,how can i do it in labview

    Hi,
    I am a new user of labview.
    I got Vector Card, DUT, DC Power supply and .dll file. Hoe can i connect dll file and hoe to senf the information to the device,
     i want to send/receive a message to that device . and measure temperature , humidity of the device. is any one can help?
    i have a .dll file, i want to send messages from this file to the testing device ,how can i do it in labview?

    Dear Sandy,
    How are your DUT, Vector Card and your PC connected?
    What vector card is this?
    There are a huge amount of Knowledge base articles that you can access from www.ni.com.  Simply go to the website and do a search on dll, etc.
    There are also a lot of example problems shipped with LabVIEW that will be very helpful for you to learn from and to modify to meet your needs.  Go to File»Find Example ....
    There are LabVIEW classes taught locally as well that are very helpful.  If you're interested I can arrange for you to receive an email with info about it.
    Sincerely,
    Sammy Z.  

  • My iPhone 4S will only send messages to people with iMessage? How do I fix it?

    I got my iPhone 4S yesterday, and I tried texting my mom, who has hernimessage turned off, but it wouldn't. It told me it sent, but she never got it. And I can't receive any message that isn't an iMessage. How do I fix it? I tried turning off my iMessage. That didn't work.

    Check Settings>Messages>MMS Messaging to see if it's set to "On". Check with your carrier to see that your account is properly provision. Check to see if your carrier is a supported iPhone carrier. Not all features work or work properly on unsupported carriers.
    Best of luck.

  • My mom was able to call verizon and then was able to stop my phone from working with the network. The phone itself works but it cannot send messages or use the data. How can i "turn it back on"?

    She called some number and stopped it from using the network. How can i make it work again?

    >Posted edited to remove instructions that could lead to a fraudulent act<  But if she's paying the bills, she's going to see that you turned it back on and I'm guessing you're probably going to get into even bigger trouble (especially if you managed to impersonate her or speak on her behalf).  Best bet, talk to your mom about what she wants from you in order to get it turned back on. 
    Good luck!
    Message was edited by: Verizon Moderator

  • I just updated to 5.0.1 now texts wont send messages and my phone is slow, how do I fix this. Annoying as ****!!!

    I updated which I had been avoiding and now my texts wont send, pictures on the text window will not send and my phone is horribly slow. Is there a way to go back to the other operating system?

    Can't go back to other OS. Is this iMessaging or SMS causing the problem?

  • Mmy I message won't let me send messages or recive them .. How do I fix this ? Help!

    Help me please

    Try:
    - Go to Settings>General>Time&Date and make sure it is set to Automatic
    - Go to Settings>wifi>the connected network and change the DNS to Google's 8.8.8.8
    - Settings>General>Reset>Reset Network Settings. You will have to reenter all network passwords.
    - iOS 5: iMessage not working – how to fix - Apple Toolbox

  • HT1976 my i phone will connect to my wifi server but when i turn the wifi off it will not connect to me celluar network so i cant send messages or use my phone poroperly at all. how do i fix it?

    my i phone wont connect to my cellular network but will connect to my wifi. it recently crashed so i restored it via itunes it restored fine and then wouldnt let me use my internet or send messages because i have no 3G how can i fix this?

    No try this go to settings>general>reset>reset all settings "please note you will need to reput your wifi password in and nothing will be erased"
    please let me know if this helps d:-)
    jaydin curl "first level apple care rep"

  • How to Send  message to MQ without using JMS Receiver Adapter

    Hi Frnds,
    Actually i am working one File to JMS scenario,I have to send message to MQ,What are the different ways we can send  message to MQ without using JMS Adapter.
    Regards,
    Raj

    Hi Ramesh,
    Thanks for your replay,could you please eloborate how to integrate that one with XI,and how to use in XI?
    regards,
    raj

  • How to send message to a queue using JMS adapter

    Hi,
    I need to send messages to the default queue(demoQueue) available in the server using a JMS adapter in a BPEL process.
    I tried doing the same by using an invoke activity that invokes the JMS adapter service to send the message to the queue. I deployed this process in the server and gave an input to send it to the queue. The prcoess executed without any errors in the BPEL console.
    I am also using Hermes v1.0 to monitor the queue but it says that it dint receive any messages in the queue to read.
    I am sorry that i have restrictions from the client that i can't post the code here. Please let me know if anyone has got any solution or if you know any other way of doing the same.
    Thank you
    Message was edited by: prince
    the_prince

    You can use the following procedure :
    DBMS_AQ.ENQUEUE (
    queue_name IN VARCHAR2,
    enqueue_options IN enqueue_options_t,
    message_properties IN message_properties_t,
    payload IN "<ADT_1>",
    msgid OUT RAW);

  • How to send images through PI using SOAP adapter

    hi,
    Can anybody tell me how to send images through PI using SOAP adapter.
    Regards ,
    Loveena

    Hi Loveena,
    only as attachments of a SOAP message.
    Regards,
    Udo

  • I need to secure SOAP message sent into SOAP adapter, how to?

    Hi guys,
    My scenario uses SOAP and I need to secure this SOAP message sent into SOAP adapter. As I have read in the documentation, HTTPS is possible only on the SOAP receiver adapter. But my is SENDER.
    COuld you help me please, how to solve it? Or post some link? Or, if you have your own approach, to let me know?
    Thanx, Peter

    Hi,
    you can use SSL with the sender adapter. Please see the extract of the SOAP Adapter FAQ (Note #856597) below:
    <b>Q:</b> Can I use SSL for my sender adapter?
    <b>A:</b> Yes. Normally, the SOAP adapter servlet runs on the engines HTTP port. But you can activate the engine's HTTPS port so that this servlet can receive messages sent to the HTTPS port. See the documentation about the J2EE engine's security configuration.
    I am afraid, I haven't yet tried this myself, so you will need to consult the J2EE documentation.
    Regards,
    HC

  • How to install custom Resource Adapter

    Hi I have writen the java class for the Custome Resource adapter and I loaded the .class file into web-inf classes folder.I followed the installation steps given in the deployement document.In that I am not understanding one step i.e "Install .class file and help file into IDM" How can we do this and How to get the particular resource under Managed Resources tabe of Configure tab./its very urgent for me any kind of help is appriciable.

    Ok, since it is urgent, do it the way Sun/Waveset inserts the adapters.
    1.) Alter your java code to have
    package com.waveset.adapter;
    As your package line.
    2.) Compile the adapter to a class file.
    3.) Grab the idm.jar file from $WSHOME/WEB-INF/lib and copy it to e.g /tmp
    4.) unjar it. jar -vxf idm.jar
    5.) copy the your adapter class file to /tmp/com/waveset/adapter
    6.) jar the archive. jar -cvf idm.jar /tmp/com
    7.) Make a backup of the original idm.jar, and copy the new to the old position replacing the old jar-file. Bounce your app-server.
    8.) Log in as configurator or an administrator with equal capabilities. And add the custom adapter using the previous procedure... although, use the adaper class path
    com.waveset.adapter.YourCustomAdapter
    9.) Go to debug pages and put tracing on the same class file, and tail -f the app-server std out.
    10.) try to configure the adapter. Note any eventual error messages. Post error messages on the forum along with the std out log.
    If your adapter code works, it should work... if not your problems are elsewhere.
    Please not that this set up is not recommended for production environment and if you apply service packs etc this fix will break!

  • Messaging Bridge/Resource adapter problem on Solaris?

              Has anyone successfully used the supplied resource adapter and messaging bridge
              on Solaris? We seem to have problems getting the resource adapter to be bound
              properly. After creating a connector through the admin console (using any of the
              weblogic supplied jms-*-adp.rar files) the element shows up in the JNDI tree but
              has no object information associated with it - which I assume means it is not
              bound. The following error shows up in the weblogic log file:
              ####<Jan 24, 2003 6:28:03 PM CST> <Error> <Connector> <fssun02> <AdminServer>
              <ExecuteThread: '0' for queue: '__weblogic_admin_html_queue'> <kernel identity>
              <> <190004> <ManagedConnectionFactory not found for jndiName eis/jms/WLSConnectionFactoryJNDINoTX.>
              We are using WL 7.0.1.0 and Solaris 2.8 (8). With the same configuration on Win
              2K everything works properly. Classpath's etc all seem to be correct. Any ideas?
              thanks,
              

    I finally got my Messaging Bridge (Tibco to a WLS Cluster) to work. See my post 3 messages before yours - to which no-one responded... :-(
              So here goes with my suggestion based on what I have done.
              1. Create a Distributed Destination for the WLS queue and "auto deploy" it your cluster. (Read the manual on how to do that, it is quite straightforward).
              2. In the Local Bridge Destination, put :
              Connection URL - nothing
              Initial Context Factory - weblogic.jndi.WLInitialContextFactory
              Connection Factory JNDI Name - <your JMS conection factory name>
              Destination JNDI Name - <the JNDI name given to the Distributed Destination>.
              I hope that works.
              Andy

Maybe you are looking for

  • I put ON my macbook pro and right during the loading, all sudden OFF, no more sound nothing, poufff!

    I just does my update for LION, it's so commun that I don't check the date nothing and i need to resart the computer, but since then, nothing. I start it and all it's ok, and sudden in the loading pouffff it's turn OFF. Whatttt!!!!! And i'm not livin

  • Notification oracle

    Hi Experts, Could you please someone advise whether the query change notification is supported by oracle 11g release1? RCM_DB@gcets> RCM_DB@gcets> declare 2 reginfo cq_notification$_reg_info; 3 v_cursor sys_refcursor; 4 regid number; 5 begin 6 reginf

  • Auto-increase of numeric value in autocomplete

    What I'm wondering is can autocomplete use the value entered into the previous field and increase that value by one numeric digit for the new autocomplete?  For example, if the first entry is manually entered as "W1234" can you have autocomplete ente

  • Airwindows plug-ins...installing?

    Hi all I just downloaded one of the free Airwindows plug-ins but don't know what to do with it. It just opens a 'component' file How do I proceed? Thanks. Steve

  • Advanced Photo Album Template Issue

    Hey all. I tried to create a photo album using the Advanced Photo Album Template that comes in Flash CS5. Everything seems to work fine - however, when you click on the thumbnails on the left hand side, the titles do not change to the appropriate thu