Multiple JMS Listeners

Is it possible to detect if you are currently the active listener on a queue? I am developing an application which allows people to post and listen to a chosen queue and I was wondering if it is possible to detect if you are the active listener or if somebody else has taken over listening?

Keith, did u check the JMS API? Have you tried getMessageListener(). "returns the message listener associated with this session" Check the API before you come over to my desk in future!

Similar Messages

  • Can you run multiple APEX listeners for different instances on the same server

    Please confirm that we can run multiple APEX listeners for different instances on the same server?  Is it an xml setup configuration or do we need to do more??
    Thank You,
    Tony Miller
    SmartDog Services
    Austin, TX

    Yes.. Just exactly what I was looking for...
    Thanks Jari!!
    Thank You,
    Tony Miller
    SmartDog Services
    Austin, TX

  • Using Multiple Event Listeners

    Hi,
    I have a movielcip (A) class in which I have used a Tween class effect on a child movieclip (B) scrollRect. The (B) Movieclip in turn has several movieclips whose have tween class effect being executed on thier child movieclips.
    the tweens are all unique to each movieclip
    and the event listeners are taken off once completed.
    This works all well and good in FLASH IDE...
    My problem arises when I try to view this in a browser on a Windows XP
    it doesnt work in
    Opera Version 9.63
    Firefox 2.0
    and Google Chrome 2.0
    The only browser it works fluently in is
    Internet Explorer 7.0.5
    What is happening in most cases it that the animation appears to "stick" but i think what may be happening is the listening or removal of the event listeners. The animations are left incompleted.
    Is there any rule of thumb when using multiple event listeners?
    here is a snippet of some of my code
    on click event from movieclip (A)
    private function scrollToSlidePrev(e:MouseEvent) {
                   if (((slideIndex - 1) >= 0)) {
                        nextButton.mouseEnabled = nextButton.enabled = previousButton.enabled = previousButton.mouseEnabled = false;
                        var position:Number = 0-SLIDEAREA.width;
                        var slide1:TileListSlide = slides[slideIndex] as TileListSlide;
                        var slide2:TileListSlide = slides[--slideIndex] as TileListSlide;
                        scrollSlide(position,slide1,slide2);
    tween animation in movieclip (A) on (B)
    private function scrollSlide(pos:int,slide1:TileListSlide,slide2:TileListSlide) {
                   slide1.resizeSlideTo(0.6); // execute tween on child movie clips in B
                   slide2.resizeSlideTo(1); // same as above;
                   var rect:Rectangle = sliderMc.scrollRect;
                   var tween1:Tween = new Tween(rect,"x",Regular.easeOut,rect.x,rect.x + pos,3,true);
                   tween1.addEventListener(TweenEvent.MOTION_CHANGE,setSliderScroll,false,4);
                   tween1.addEventListener(TweenEvent.MOTION_FINISH,toggleButtonEnabled,false,3);
    tween animation in movieclip (B) children
    public function resizeSlideTo(sc) {
                   var m:Matrix = tileList.transform.matrix as Matrix;
                   var p:Point = new Point (m.a, 0);
                   var tween2:Tween = new Tween(p,"x",Regular.easeOut,p.x,sc,3,true);
                   if (numericStepper != null) {
                        if (sc != 1) {
                             numericStepper.visible = false;
                             tween2.removeEventListener(TweenEvent.MOTION_FINISH,showStepper);
                        if (sc === 1) {
                             tween2.addEventListener(TweenEvent.MOTION_FINISH,showStepper,false,2);
                   tween2.addEventListener(TweenEvent.MOTION_CHANGE,setScaleOnScroll,false,3);
    here is the link
    http://visual_admin.web.aplus.net/ticker/ticker_widget.html
    the effect disables and re-enables the buttons when its done.... then the listeners are removed.
    each one with the exception cretes its own unique tween (obviously this is a custom class built as each clip)
    i really don't know what to make of it guys         

    apparantly making the tween a property of the class rather than a random variable in a function worked.....go figure

  • WebLogic 12.1.2 erases subdeployment on Distributed Queue when targeted to multiple JMS Servers

    Update: verified in a 12.1.1.0 (JDK6) cluster - bug does not occur there.
    Hi,
      I have been migrating an 10.3.5.0 server to WebLogic 12.1.2.0 and have been unable to keep the subdeployment dropdown populated in the subdeployment tab of a uniform distributed queue when the subdeployment targets more than 1 JMS Server.
      If I uncheck one of the servers - I work fine - however I would like to target all JMS Servers in the cluster - this used to work fine in 10.3.5.0
      Following
    http://docs.oracle.com/cd/E24329_01/apirefs.1211/e24401/taskhelp/jms_modules/distributed_queues/CreateUniformDistributedQueues.html
      I am able to create a new queue no problem against the multiple-server subdeployment - but when I navigate to the subdeployment dropdown - the target is erased with "None".
    If I save the subdeployment after setting it during the queue create - it is erased
    <sub-deployment-name>MW-JMS-SubDeployment</sub-deployment-name>
    Before:
    <weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
      <uniform-distributed-queue name="HousekeeperControlQueue">
        <sub-deployment-name>MW-JMS-SubDeployment</sub-deployment-name>
        <jndi-name>jms/HousekeeperControlQueue</jndi-name>
      </uniform-distributed-queue>
    </weblogic-jms>
    After:
    <weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
      <uniform-distributed-queue name="HousekeeperControlQueue">
        <jndi-name>jms/HousekeeperControlQueue</jndi-name>
      </uniform-distributed-queue>
    </weblogic-jms>
    Workaround:
    - upon server startup the config is valid - just dont re-save the jms module or the subdeployment target will be erases
    - also when creating a new subdeployment you will be able to select it from a jms distributed queue in the advanced targeting section even if it contains expected multiple JMS servers
    - you will not however be able to edit the JMS queue once created - if there is any change to targeting - recreating the queue is required
      thank you
      /michael

    Update: verified in a 12.1.1.0 (JDK6) cluster - bug does not occur there.
    Hi,
      I have been migrating an 10.3.5.0 server to WebLogic 12.1.2.0 and have been unable to keep the subdeployment dropdown populated in the subdeployment tab of a uniform distributed queue when the subdeployment targets more than 1 JMS Server.
      If I uncheck one of the servers - I work fine - however I would like to target all JMS Servers in the cluster - this used to work fine in 10.3.5.0
      Following
    http://docs.oracle.com/cd/E24329_01/apirefs.1211/e24401/taskhelp/jms_modules/distributed_queues/CreateUniformDistributedQueues.html
      I am able to create a new queue no problem against the multiple-server subdeployment - but when I navigate to the subdeployment dropdown - the target is erased with "None".
    If I save the subdeployment after setting it during the queue create - it is erased
    <sub-deployment-name>MW-JMS-SubDeployment</sub-deployment-name>
    Before:
    <weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
      <uniform-distributed-queue name="HousekeeperControlQueue">
        <sub-deployment-name>MW-JMS-SubDeployment</sub-deployment-name>
        <jndi-name>jms/HousekeeperControlQueue</jndi-name>
      </uniform-distributed-queue>
    </weblogic-jms>
    After:
    <weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
      <uniform-distributed-queue name="HousekeeperControlQueue">
        <jndi-name>jms/HousekeeperControlQueue</jndi-name>
      </uniform-distributed-queue>
    </weblogic-jms>
    Workaround:
    - upon server startup the config is valid - just dont re-save the jms module or the subdeployment target will be erases
    - also when creating a new subdeployment you will be able to select it from a jms distributed queue in the advanced targeting section even if it contains expected multiple JMS servers
    - you will not however be able to edit the JMS queue once created - if there is any change to targeting - recreating the queue is required
      thank you
      /michael

  • How do you span a jta usertransaction across multiple jms servers?

    I have an ejb that connects to multiple jms servers (non-clustered) and
              retrieves messages. Those messages are concatenated together and placed on
              another jms queue. Is it possible to do all of this inside of one
              transaction? I am having trouble pulling this off.
              

    Sure, you can do this. Assuming you're using WLS JMS, you have to make sure that for all the JMS servers you're talking to, you use a connection factory with the "XA Connection Factory Enabled" flag set. You also need to make sure that you use JTA to start a transaction before retrieving the first message, and commit it after you're done with the final send.

  • SAP IDOC to multiple JMS

    Hi,
    I'm eric. I'm new with XI and I have a requirement that will trigger an IDOC from SAP then XI should output multiple JMS messages depending on the number of items that the IDOC contains. For example. for IDOC  WMMBID02, it has header segment  E1MBXYH and item segment E1MBXYI. If IDOC sent from SAP has 5 items or 5 E1MBXYI segments, there should be 5 JMS messages sent to the 3rd party system. There will be one message sent per item. The messages can be sent in no particular order as long as there are separate JMS messages per item.
    Please advise the step by step procedure to be done for the Design and Configuration. Hope someone can help me.
    Thanks,
    Eric

    Hi,
          You can do multimapping for your requirement.
    Please refer the below blog for more info.
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Though the blog is for Idoc to file, it will work for Idoc to JMS also. Since you have only one target message type, make th eoccurrence of the target message as 0...unbounded. In the mapping, generate the number of target messages based on the item segment, as per your requirement. Your operation mapping occurrence for target should also be 0.. unbounded.
    For ID part, there is no change. Configure like simple Idoc to jms scenario.
    Regards

  • IBM MQ 6.0 to multiple JMS targets in weblogic 10.3.3

    Hi,
    We have a requirement wherein we need to manually load balance the traffic between two sites for now. We have a source as IBM MQ 6.0. Can we connect a single MQ source to multiple JMS target destinations in weblogic 10.3.3?
    We are not getting any error while configuring in this way however we noticed that messages are not getting forwarded by any of the two destinations.
    Thanks in advance.
    Edited by: 892481 on Oct 25, 2011 10:54 AM

    I assume that you are using the messaging bridge. You should be able to have 2 bridges with the same source destination and different target destinations.
    It is likely that there is a configuration or environment issue here since either of the bridge works.
    The following blogs may be helpful to you; they talk about using messaging bridge and foreign jms server configuration to integrate with foreign JMS providers.
    http://tim.blackamber.org.uk/?p=614
    http://ibswings.blogspot.com/2008/02/integrating-mq-broker-6-with-bea.html
    If the problem persists, you can turn on the messaging bridge debugging to see what is going on.
    -Dweblogic.debug.DebugMessagingBridgeStartup=true
    -Dweblogic.debug.DebugMessagingBridgeRuntime=true
    -Dweblogic.debug.DebugMessagingBridgeVerbose=true
    Cheers,
    Dongbo

  • Connecting to multiple JMS queues

    Hi,
    I need to connect to multiple JMS queues that all have different username/passwords however I'm struggling to find where to add these details.
    In the past we have used the args -Dtibco.default.user=xyz -Dtibco.default.password=1234 on the Server Start tab when connecting to a single queue.
    Clearly this won't work for multiple queues.
    I have tried adding the details on the bridge source but it doesn't seem to make any difference. Any ideas?
    Thanks
    Willy

    Hi Willy,
    This is definitely the week for interop questions.
    There are two opportunities that I know of to pass username and password on a bridge source destination. There are the "username" and "password" attributes, which I assume would work in most cases. Not sure. There are also the JNDI properties, presumably via the standard strings "java.naming.security.principal" and "java.naming.security.credentials".
    It would be interesting to see the full stack trace that your getting.
    Tom
    PS. It's been my experience that many applications don't need to use a bridge for retreiving foreign vendor messages as they can simply receive from foreign vendors directly. For example, via a combination of MDBs and the Foreign JMS facility. For more information see [ Integrating Remote JMS Providers | http://download.oracle.com/docs/cd/E12839_01/web.1111/e13727/interop.htm#JMSPG553 ].

  • Load balancing JMS listeners against AQ

    10g Database, simple AQ defined (point to point)
    10g App server (10.1.2) JMS Listener.
    Two load balanced App servers, with the JMS listener deployed onto each server, each listening to single AQ queue.
    Problem. It appears that each listener is picking up a message when placed on the AQ. I would have assumed that the first once it would "block" the second one from dequeing the message.
    Is there a specific configuration/set-up we need to cause each of these listeners to "honer" the other one, and for the messages to be handled on by one of the listeners at a time?
    _mike                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Mike,
    If your question has to do with Oracle Application Server, then there is the Oracle Application Server - General forum.
    If your question has to do with AQ, then there is the Advanced Queueing forum.
    In any case, I don't think it has to do with JDBC, does it?
    Good Luck,
    Avi.

  • Multiple SQLNET Listeners for One Oracle Home

    Is it possible to have multiple SQL NET listeners for one oracle home? I do not want have 2 oracle homes in order to accomplish this. Thanks in advance.

    This will allow me to have different security settings for each sqlnet listener? I would like one to require encryption for one specific IP address, and the other not to worry about it.

  • Multiple jms clients ..

              Hi,
              I have a JMS queue (non persistent) in WLS 7.0 and I am interested connecting
              multiple consumers to it. The consumers are stand alone java apps siting on a
              different machine.
              Has anybody experienced any problems with such a configuration ?. I am asking
              because I have been told that multiple consumers can cause queue locks etc ?
              Thanks
              Nick
              

              Nick wrote:
              > Hi,
              >
              > I have a JMS queue (non persistent) in WLS 7.0 and I am interested connecting
              > multiple consumers to it. The consumers are stand alone java apps siting on a
              > different machine.
              >
              > Has anybody experienced any problems with such a configuration ?.
              This is normal. In fact most applications have multiple consumers
              on a destination. (For example,
              each MDB instance in an MDB pool is a consumer.)
              > I am asking
              > because I have been told that multiple consumers can cause queue locks etc ?
              I have not heard of a problem here - the consumers do
              not "know" about each-other directly and do not
              effect each-others transactions - they just share the
              same queue. Some JMS vendors may allow some consumers
              to be "starved" of messages at the expense of other
              consumers, but WL JMS specifically avoids this with
              a round-robin fairness algorithm.
              For extensive design and performance tuning information, see the
              JMS Performance Guide white-paper here:
              http://dev2dev.bea.com/technologies/jms/index.jsp
              >
              > Thanks
              >
              > Nick
              >
              

  • Multiple HTTP Listeners

    Hi!
    In Oracle 9i db release notes:
    "2.9 Starting Multiple Oracle HTTP Server Listeners on the Same Windows NT Computer"
    It works fine, i've got one problem:
    When i start an apache server from command line,
    it brings up a Command Prompt window, and it's
    on there, while the server is running.
    Is it possible to start apache from command line,
    without a window?
    Of course, i need this feature, because i have to
    run 2 instances of it.
    (I've got XP pro)
    Thanks:
    -dc-

    Hi,
    how to configure single HTTP server to listen on multiple ports? We have Oracle 10gAS installed RHEL 3.0 AS and changed the default port number from 7777 to 80 using the ias admin console and its working fine. But we want the 7777 port also to be active and listening so that whenever a request comes to either 80 or 7777, it should be handled by the single HTTP server which comes by default with the Oracle 10g AS.
    Any kind of help would be of great help for us.
    Thanks,
    Balakrishna.

  • Multiple Event Listeners

    Is it possible to have event listeners apply to multiple objects, instead of creating multiple functions?
    I'm just wondering if there is an easier way than making a new function for the same event listeners for each object I want to apply it to.  Here's my code thus far, just to clarify what I'm talking about:
    import gs.*;
    var mc_homeX:Number = mc_home.x;
    var mc_productsX:Number = mc_products.x;
    var mc_msdsX:Number = mc_msds.x;
    var mc_environmentX:Number = mc_environment.x;
    mc_home.addEventListener(MouseEvent.MOUSE_OVER, onOver, false, 0, true);
    mc_home.addEventListener(MouseEvent.MOUSE_OUT, onOut, false, 0, true);
    function onOver(e:MouseEvent):void
         TweenLite.to(e.target, .2, {x:mc_homeX-10});
    function onOut(e:MouseEvent):void
         TweenLite.to(e.target, .2, {x:mc_homeX});
    I've only starting adding the listeners to mc_home, but I'd like to apply them to all.  Any help would be appreciated.  Thanks.

    import gs.*;
    var mc_homeX:Number = mc_home.x;
    var mc_productsX:Number = mc_products.x;
    var mc_msdsX:Number = mc_msds.x;
    var mc_environmentX:Number = mc_environment.x;
    var mcA:Array=[mc_homeX,mc_productsX,etc];
    for(var i:uint=0;i<mcA.length;i++){
    mcA[i].addEventListener(MouseEvent.MOUSE_OVER, onOver, false, 0, true);
    mcA[i].addEventListener(MouseEvent.MOUSE_OUT, onOut, false, 0, true);
    function onOver(e:MouseEvent):void
         TweenLite.to(e.target, .2, {x:mc_homeX-10});
    function onOut(e:MouseEvent):void
         TweenLite.to(e.target, .2, {x:mc_homeX});
    I've only starting adding the listeners to mc_home, but I'd like to apply them to all.  Any help would be appreciated.  Thanks.

  • Multiple JMS Senders

              I want to build a sample application, in which i want to have 50 Queue Senders and
              50 Queue receivers. Therefore, I want a pool of 50 senders so that anybody can just
              pick a sender from the pool and post the message. It is important to have a pool,
              when the application is just real time like stock trading application where stock
              quotes will have to be published every now and then.
              Does there exist any in-built facility in Weblogic JMS Server, that allows to create
              such a pool or it has to be implemented in the application?
              Regards
              Jay
              

    Hi Jay,
              Yes, the queue is synchronized, it must be to serve multiple
              senders and consumers after all. This synchronization can pretty much
              be ignored, as the synchronize is short - it makes up only a fraction
              of the total message path.
              There is often a win to multiple senders as there is other overhead beyond
              the synchronize, especially if they invoke long running O/S
              calls - (such as network calls and/or persist-to-store calls). The senders can
              run in parallel. On the other hand, if the sender is non-persistent, you may find
              that
              no more than 1 or 2 senders running full-bore in a tight loop
              are needed to grab all bandwidth and firehose the system with messages.
              The pool example only creates a sender when no sender is available,
              and so ends up creating only as many as are needed to run in parallel.
              Tom
              Jay Rege wrote:
              > Hi Tom,
              >
              > Thanks a lot for your reply. I have one more question on the JMS fundamentals.
              >
              > We are creating a pool of JMS Senders for same Queue. So what happens when multiple
              > senders are trying to write to the same Queue? Is the queue synchronized? If it is
              > synchronized, then even though we are using multiple senders, but only one sender
              > can access the Queue at any point in time. So multiplexing the JMS Senders doesn't
              > really help here.
              >
              > Regards
              > Jay
              >
              > Tom Barnes <[email protected]> wrote:
              > >
              > >No built in pools, except for receivers (MDBs). Attached is a basic sample
              > >sender pool implementation (completely untested).
              > >
              > >Jay Rege wrote:
              > >
              > >> I want to build a sample application, in which i want to have 50 Queue
              > >Senders and
              > >> 50 Queue receivers. Therefore, I want a pool of 50 senders so that anybody
              > >can just
              > >> pick a sender from the pool and post the message. It is important to have
              > >a pool,
              > >> when the application is just real time like stock trading application
              > >where stock
              > >> quotes will have to be published every now and then.
              > >>
              > >> Does there exist any in-built facility in Weblogic JMS Server, that allows
              > >to create
              > >> such a pool or it has to be implemented in the application?
              > >>
              > >> Regards
              > >> Jay
              > >
              > >
              > >import javax.jms.*;
              > >import javax.naming.Context;
              > >import javax.naming.InitialContext;
              > >import javax.naming.NamingException;
              > >import java.util.HashMap;
              > >import java.util.Iterator;
              > >import java.util.LinkedList;
              > >import weblogic.jms.extensions.WLSession;
              > >
              > >
              > >/**
              > > * A pool of JMS queue producers. Producers are created
              > > * on an as needed basis and are cached based on queue
              > > * JNDI name. Each producer gets its own jms session
              > > * and jms connection. Producers are removed when the pool
              > > * is closed, or when the JMS provider calls their exception listener.
              > > */
              > >
              > >public final class SenderPool {
              > >
              > > private class SenderPoolElt implements ExceptionListener {
              > > String queueName; // JNDI name of queue
              > > InitialContext ctx;
              > > QueueConnectionFactory qcf;
              > > QueueConnection qc;
              > > QueueSession qsession;
              > > QueueSender qsender;
              > > Queue queue;
              > > TextMessage textMessage;
              > >
              > > // called by messaging system on connection or session failure
              > > public void onException(JMSException e) {
              > > e.printStackTrace();
              > > remove(this);
              > > close();
              > > }
              > >
              > > void close() {
              > > if (ctx != null) try { ctx.close(); } catch (Exception ignore) {};
              > > if (qc != null) try { qc.close();  } catch (Exception ignore) {};
              > > }
              > > }
              > >
              > > // a hash map of linked lists of producers that use the same queue
              > > private HashMap pLists = new HashMap();
              > >
              > > private boolean closed;
              > >
              > > public SenderPool() {
              > > }
              > >
              > > // get a sender from the pool or create one
              > > private SenderPoolElt get(String queueName)
              > > throws JMSException, NamingException {
              > > synchronized(pLists) {
              > > LinkedList producers = (LinkedList)pLists.get(queueName);
              > > if (producers != null && producers.size() > 0) {
              > > return (SenderPoolElt)producers.removeFirst();
              > > }
              > > }
              > > SenderPoolElt spe = new SenderPoolElt();
              > > try {
              > > spe.ctx = new InitialContext();
              > > spe.qcf = (QueueConnectionFactory)
              > > spe.ctx.lookup("javax.jms.QueueConnectionFactory");
              > > spe.qc = spe.qcf.createQueueConnection();
              > > spe.qsession = spe.qc.createQueueSession(false, 0);
              > > spe.queueName = queueName;
              > > spe.queue = (Queue)spe.ctx.lookup(queueName);
              > > spe.qsender = spe.qsession.createSender(spe.queue);
              > > spe.textMessage = spe.qsession.createTextMessage();
              > > ((WLSession)spe.qsession).setExceptionListener(spe);
              > > spe.qc.setExceptionListener(spe);
              > > } catch ( JMSException je ) {
              > > spe.close();
              > > throw je;
              > > } catch ( NamingException ne ) {
              > > spe.close();
              > > throw ne;
              > > }
              > > return spe;
              > > }
              > >
              > > // called by spe when it gets an exception
              > > private void remove(SenderPoolElt spe) {
              > > synchronized(pLists) {
              > > LinkedList producers = (LinkedList)pLists.get(spe.queueName);
              > > if (producers != null) producers.remove(spe);
              > > }
              > > }
              > >
              > > /**
              > > * Send a text message using a producer in the pool
              > > * that is associated with the given queue.
              > > */
              > > public String send(String queueJNDIName, String text, boolean persistent)
              > > throws JMSException, NamingException {
              > > synchronized(pLists) {
              > > if (closed) throw new JMSException("Producer pool closed");
              > > }
              > >
              > > SenderPoolElt spe;
              > >
              > > try {
              > > spe = get(queueJNDIName);
              > > } catch (Exception e) {
              > > // just for the heck of it, try one more time
              > > spe = get(queueJNDIName);
              > > }
              > >
              > > spe.textMessage.clearBody();
              > > spe.textMessage.setText(text);
              > > spe.qsender.setDeliveryMode((persistent)?DeliveryMode.PERSISTENT
              > > :DeliveryMode.NON_PERSISTENT);
              > >
              > > try {
              > > spe.qsender.send(spe.textMessage);
              > > } catch (JMSException e) {
              > > spe.close();
              > > throw e;
              > > }
              > >
              > > String messageId = spe.textMessage.getJMSMessageID();
              > > spe.textMessage.clearBody();
              > >
              > > boolean isClosed = false;
              > >
              > > synchronized(pLists) {
              > > if (closed) {
              > > // may have closed during send, must clean up spe, but don't
              > > // want to close it under lock
              > > isClosed = true;
              > > } else {
              > > // put sender in pool now that we are done
              > > LinkedList producers = (LinkedList)pLists.get(spe.queueName);
              > > if (producers == null) {
              > > producers = new LinkedList();
              > > pLists.put(spe.queueName, producers);
              > > }
              > > producers.add(spe);
              > > }
              > > }
              > >
              > > if (isClosed) spe.close();
              > >
              > > return messageId;
              > > }
              > >
              > > /**
              > > * Close all producers in the pool.
              > > */
              > > public void close() {
              > > // don't want to call spe.close under a lock, so we use a state flag
              > > synchronized(pLists) {
              > > if (closed) return;
              > > closed = true;
              > > }
              > > for (Iterator iter = pLists.values().iterator(); iter.hasNext();) {
              > > LinkedList producers = (LinkedList)iter.next();
              > > do {
              > > if (producers.size() == 0) break;
              > > ((SenderPoolElt)producers.removeFirst()).close();
              > > } while (true);
              > > }
              > > pLists.clear(); // save the garbage collector some thinking
              > > pLists = null;
              > > }
              > >
              > >}
              > >
              > >
              

  • Multiple Apex Listeners on one server trouble with apex-config.xml

    I'm using 0C4J to deploy apex on a windows server. I want to be able to have multiple instances of OC4J running pointing to different databases. I've read through documentation and forum posts and this looks simple enough.
    I've got one instance running at E:\OC4J and working fine. I've to added a second OC4J instance at E:\OC4J2. I've rebuilt and redeployed the apex.war file after editing web.xml to specify a new location for apex-config.xml. I'm trying to specify the config directory as E:\OC4J2\config but can't seem to get the syntax right, because it keeps picking up the default file the first OC4J instance is using.
    <context-param>
    <param-name>config.dir</param-name>
    <param-value>E:\oc4j2\config</param-value>
    </context-param>
    I've tried multiple versions of the path E:\oc4j2\config, E:/oc4j2/config, /oc4j2/config, \oc4j2\config but none seem to work.
    Could anybody confirm the proper syntax for specifying the path to apex-config.xml in web.xml on a windows server?
    Thanks in advance

    Got it working
    Had the syntax right.
    <context-param>
    <param-name>config.dir</param-name>
    <param-value>E:\oc4j2\config</param-value>
    </context-param>
    Issue seems to be if there is an apex-config.xml file at C:\Users\username\AppData\Local\Temp\apex it picks up on it first.
    Once I had both web.xml files specified to different directories for the config file and I deleted the one at C:\Users\username\AppData\Local\Temp\apex things worked as expected.
    Thanks

Maybe you are looking for

  • Can't open my recent library after upgrading to iTunes 10.4

    I did a bunch of requested software updates and apparently the new version of iTunes won't recognize my library on an external drive. It upgrade the one on my hard drive but wont let me access the one on the external drive where my monster library ex

  • Max no. of line items reached in FI

    Hi Everyone, My client does billing through a batch job and the program used SDBILL which is assigned to TCode VF04 in Table TSTC. There are invoices where the line items is fixed at 999.Could somone please tell me how to automatically split invoices

  • *** Import FAILED *** NI-VISA: error code 0x80004001

    Hello! What this error mean? I got it when I tried to import .nce file in MAX.

  • Problems with Adjustment Brush - LR 2.3, Macintosh

    I've had numerous discussions with folks at Adobe's Tech Support and they have no idea what is going on with my problem in LR 2.3 on a Mac (10.5.6, 2 X 3 GHz dual Intel, 5 GB ram, startup drive has catalog, images stored on internal drive) so I thoug

  • Pdf to exel: number as text problem

    after converting a pdf file to exel (2010) i am unable to add, subtract, multiply etc. i get message #Value! It seems numbers are enetred as text. I tried number format, clean, trim etc. Nothing works. Please advise