Delivery of message in jms to multiple clients

**Now,I am using queues in jms which are already configurred in server.
But,for n users it will be difficult to maintain n queues in server.So,
***Should i go towards creating and using Temporary Queues(I am trying to code for Temporary queues continuously but not at some final result,so plz tell how sender will tell receiver about his queue and how receiver will reply in sender's particular queue.
***How much it will be feasible if single queue is used by all clients(both senders and receivers).
Thanx in advance

***Topic also need to be preconfigurred in my application server,so my applications will be limited by number of topics.
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html
You'll see there methods for creating permanent and temporary topics. After creating a topic you'll need to bind it to your JNDI tree so that it can be retrieved again.
***Problem of receiving should not come b/c message will be sent by sender with the name of receiver attached to it,so that when all receivers will get it,the receiver whose name will be mentioned in message will take out the message.
You are still thinking "point to point" but you should be thinking "publish and subscribe". When a client joins a conversation/chatroom they should "subscribe" to a topic dynically created for that coversation/chatroom. For the duration of the subscription any message "published" to the topic will be routed to all subscribers automatically. There is no need to add the receivers name to the message.
On a separate note (and I've tried to reword a couple of times to sound less harsh, but don't think I've managed it so apologies for the slightly aggressive tone) you've asked a lot of questions on this forum in recent weeks, but when people answer your questions you fail to look into them properly. You also have a slightly high expectation of the level of response - we're not here to solve your problems, we're here to help you solve them yourself. You've also asked for email addresses / ICQ numbers - this may be more convenient for you but means that the forum loses the benefit of subsequent conversations. Not to mention the last thing I (and my clients) want while I'm trying to solve a difficult problem of my own is messenger flashing up every five minutes.
The best thing you can do is read the JMS specification cover to cover
http://java.sun.com/products/jms/docs.html - it's well written and not particularly big as specifications go. If you have any futher questions make sure you google / search this forum before you post.
Steve

Similar Messages

  • Multiple clients to JMS queue

    Hi,
    I have created a JMSQueue in Visual administrator and  able to send /receive messages thru JMS send/recr adapter but need clarification on the below requirement.
    1) How Can I connect JMSQueue in Visual administrator from external systems without using JMS adapter i.e from another WAS JMS queue/other JMS server which is installed on different machine.
    2)How can i connect JMS queue from different clients? Is it possible to post the message into one queue from different clients.
    Thanks in advance.
    Regards,
    Srinivas

    Hi Amol,
    Thank you very much for your reply.
    I need clarification on JMS topics.as per SAP note 856346 (Q.2.1),JMS adapter doen't support JMS topics.
    1)Is it possible to send the same message to multiple receivers by using JMS adapter? (JMS supports point-to-point)
    2)How do we post the message to one queue from different clients? what are the possible ways to achieve the same?
    3)My requirement is: There is a java program , webserver and 100MB size file at source.each time the java program readys say 10MB of data from source file and send it to queue thru webserver and JMS sender adapter reads it from queue and send it to target by using receiver adapter till 100MB data is transfered.Could you please give some idea to achieve this.
    Thanks again for your reply.
    Regards,
    Srinivas

  • How to run JMS in multiple machines?

    hello all,
    i am new to jms, so please let me know how to run jms in multiple machines.
    i mean, iin one machine publisher and the queue/topic are running, in other machine listener/clent. so client and the publisher must be running in an application servers. so it means only two app servers can send and receive messages?
    then what is the advantage of JMS?
    I think the sender will be sending messages and the listener can get them at later time, is my understanding is correct?
    Please let me know how it works in multiple machines? and how shold i start now?
    please give me the details....
    thanks in advance.
    charan

    Hi Charan!
    If I understand your questions right, yes, you can use JMS on several physical machines. They connect using JNDI.
    However, you cannot communicate asynchronously through JMS alone. The benefit of JMS is that you have a common interface to use when talking to a messaging provider, like WS MQ, Sonic MQ, etc. Most vendors support JMS, and those who do are called JMS providers. They are required to implement either the Queue functionality or Topic functionality (or both). When using a JMS provider, you really see the benefit of JMS. How else would you secure that your system is loosly coupled? Also, by using JMS and Message Driven Beans you get the benefits of container managed transactions, object pooling, etc.
    If you do not have a JMS provider, you still have the benefit of a loosly coupled system by using JMS to integrate your applications, but in a large system, you should consider a tool for asynchronous messaging(again WS MQ, Sonic MQ, etc).
    I would recomend you start by reading the JMS section of the J2EE tutorial provided by sun.
    -K-

  • Multicasting using TCP/IP for Multiple clients

    Hello
     i have been watching in Find example Vi's in labview  there is are UDP multicasting receiver and sender Vi's Is there
    any available for TCP/IP for multiple clients. or any other way to broadcast the messages from server to many clients 
    Regards

    madd wrote:
     i have been watching in Find example Vi's in labview  there is are UDP multicasting receiver and sender Vi's Is there
    any available for TCP/IP for multiple clients. or any other way to broadcast the messages from server to many clients 
    OK, you are possibly confusing things. UDP is part of TCP/IP. Could it be you are trying to multicast using TCP?
    This is not possible. TCP is a connection based protocol, meaning any connection is established between exactly two partners, starting out with the three-way handshake, the data transmission and acknowledgments, and the connection tear down. This ensures complete delivery verification of all communications at the expense of the protocol overhead. (similar to a classic phone connection between two people: First you verify the right person picks up, then you talk, then say goodbye)
    UDP is a connectionless protocol, meaning any packets are simply placed on the wire and the protocol itself does not ensure any verification of delivery (similar to e.g. a radio broadcast). Any two-way communication needs to be done by the program, e.g. the receiver could send another UDP packet back to notify the sender that a packet was received.
    Broadcast and multicast packets must be connectionless. There is no way around it. You can use UDP for broadcasts and TCP for for data at the same time in the same program, but you cannot combine the two into a single connection. They don't mix.
    Maybe I misunderstood. If I did, please clarify what you had in mind. More details!
    LabVIEW Champion . Do more with less code and in less time .

  • Accessing the same stateful session bean from multiple clients in a clustered environment

    I am trying to access the same stateful session bean from multiple
              clients. I also want this bean to have failover support so we want to
              deploy it in a cluster. The following description is how we have tried
              to solve this problem, but it does not seem to be working. Any
              insight would be greatly appreciated!
              I have set up a cluster of three servers. I deployed a stateful
              session bean with in memory replication across the cluster. A client
              obtains a reference to an instance of one of these beans to handle a
              request. Subsequent requests will have to use the same bean and could
              come from various clients. So after using the bean the first client
              stores the handle to the bean (actually the replica aware stub) to be
              used by other clients to be able to obtain the bean. When another
              client retrieves the handle gets the replica aware stub and makes a
              call to the bean the request seems to unpredictably go to any of the
              three servers rather than the primary server hosting that bean. If the
              call goes to the primary server everything seems to work fine the
              session data is available and it gets backed up on the secondary
              server. If it happens to go to the secondary server a bean that has
              the correct session data services the request but gives the error
              <Failed to update the secondary copy of a stateful session bean from
              home:ejb20-statefulSession-TraderHome>. Then any subsequent requests
              to the primary server will not reflect changes made on the secondary
              and vice versa. If the request happens to go to the third server that
              is not hosting an instance of that bean then the client receives an
              error that the bean was not available. From my understanding I thought
              the replica aware stub would know which server is the primary host for
              that bean and send the request there.
              Thanks in advance,
              Justin
              

              If 'allow-concurrent-call' does exactly what you need, then you don't have a problem,
              do you?
              Except of course if you switch ejb containers. Oh well.
              Mike
              "FBenvadi" <[email protected]> wrote:
              >I've got the same problem.
              >I understand from you that concurrent access to a stateful session bean
              >is
              >not allowed but there is a
              >token is weblogic-ejb-jar.xml that is called 'allow-concurrent-call'
              >that
              >does exactly what I need.
              >What you mean 'you'll get a surprise when you go to production' ?
              >I need to understand becouse I can still change the design.
              >Thanks Francesco
              >[email protected]
              >
              >"Mike Reiche" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Get the fix immediately from BEA and test it. It would be a shame to
              >wait
              >until
              >> December only to get a fix - that doesn't work.
              >>
              >> As for stateful session bean use - just remember that concurrent access
              >to
              >a stateful
              >> session bean is not allowed. Things will work fine until you go to
              >production
              >> and encounter some real load - then you will get a surprise.
              >>
              >> Mike
              >>
              >> [email protected] (Justin Meyer) wrote:
              >> >I just heard back from WebLogic Tech Support and they have confirmed
              >> >that this is a bug. Here is their reply:
              >> >
              >> >There is some problem in failover of stateful session beans when its
              >> >run from a java client.However, it is fixed now.
              >> >
              >> >The fix will be in SP2 which will be out by december.
              >> >
              >> >
              >> >Mike,
              >> >Thanks for your reply. I do infact believe we are correctly using
              >a
              >> >stateful session bean however it may have been misleading from my
              >> >description of the problem. We are not accessing the bean
              >> >concurrently from 2 different clients. The second client will only
              >> >come into play if the first client fails. In this case we want to
              >be
              >> >able to reacquire the handle to our stateful session bean and call
              >it
              >> >from the secondary client.
              >> >
              >> >
              >> >Justin
              >> >
              >> >"Mike Reiche" <[email protected]> wrote in message
              >news:<[email protected]>...
              >> >> You should be using an entity bean, not a stateful session bean
              >for
              >> >this application.
              >> >>
              >> >> A stateful session bean is intended to be keep state (stateful)
              >for
              >> >the duration
              >> >> of a client's session (session).
              >> >>
              >> >> It is not meant to be shared by different clients - in fact, if
              >you
              >> >attempt to
              >> >> access the same stateful session bean concurrently - it will throw
              >> >an exception.
              >> >>
              >> >> We did your little trick (storing/retrieving handle) with a stateful
              >> >session bean
              >> >> on WLS 5.1 - and it did work properly - not as you describe. Our
              >sfsb's
              >> >were not
              >> >> replicated as yours are.
              >> >>
              >> >> Mike
              >> >>
              >> >> [email protected] (Justin Meyer) wrote:
              >> >> >I am trying to access the same stateful session bean from multiple
              >> >> >clients. I also want this bean to have failover support so we want
              >> >to
              >> >> >deploy it in a cluster. The following description is how we have
              >tried
              >> >> >to solve this problem, but it does not seem to be working. Any
              >> >> >insight would be greatly appreciated!
              >> >> >
              >> >> >I have set up a cluster of three servers. I deployed a stateful
              >> >> >session bean with in memory replication across the cluster. A client
              >> >> >obtains a reference to an instance of one of these beans to handle
              >> >a
              >> >> >request. Subsequent requests will have to use the same bean and
              >could
              >> >> >come from various clients. So after using the bean the first client
              >> >> >stores the handle to the bean (actually the replica aware stub)
              >to
              >> >be
              >> >> >used by other clients to be able to obtain the bean. When another
              >> >> >client retrieves the handle gets the replica aware stub and makes
              >> >a
              >> >> >call to the bean the request seems to unpredictably go to any of
              >the
              >> >> >three servers rather than the primary server hosting that bean.
              >If
              >> >the
              >> >> >call goes to the primary server everything seems to work fine the
              >> >> >session data is available and it gets backed up on the secondary
              >> >> >server. If it happens to go to the secondary server a bean that
              >has
              >> >> >the correct session data services the request but gives the error
              >> >> ><Failed to update the secondary copy of a stateful session bean
              >from
              >> >> >home:ejb20-statefulSession-TraderHome>. Then any subsequent requests
              >> >> >to the primary server will not reflect changes made on the secondary
              >> >> >and vice versa. If the request happens to go to the third server
              >that
              >> >> >is not hosting an instance of that bean then the client receives
              >an
              >> >> >error that the bean was not available. From my understanding I
              >thought
              >> >> >the replica aware stub would know which server is the primary host
              >> >for
              >> >> >that bean and send the request there.
              >> >> >
              >> >> >Thanks in advance,
              >> >> >Justin
              >>
              >
              >
              

  • Problem to send a message with JMS

    Hi
    I'm doing some tests with the api JMS to know how works. I have got some problems. I have been looking for some information but i don't find so much. I have got too doubts.
    I am usinng Netbeans 5.5 with Sun Java System Application Server Platform Edition 9.0_01 (build b14).
    I am trying to do it with ejb. Because in the future the application can have got so many connection in the same time.
    The server shows me the next errors.
    Starting Sun Java System Application Server Platform Edition 9.0_01 (build b14) ...
    CORE5098: AS Socket Service Initialization has been completed.
    CORE5076: Using [Java HotSpot(TM) Client VM, Version 1.6.0_03] from [Sun Microsystems Inc.]
    SEC1002: Security Manager is OFF.
    ADM0001:MBeanServer initialized successfully
    SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
    sgmt.service_initialized
    DPL5400:Exception occurred : error in opening zip file.
    ADM1079: Initialization of AMX MBeans successful
    ADM1504: Here is the JMXServiceURL for the Standard JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://t1:8686/jmxrmi].  This is where the remote administrative clients should connect using the standard JMX connectors
    ADM1506: Status of Standard JMX Connector: Active = [true]
    JTS5014: Recoverable JTS instance, serverId = [3700]
    About to load the system app: MEjbApp
    LDR5010: All ejb(s) of [MEjbApp] loaded successfully!
    About to load the system app: __ejb_container_timer_app
    EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]
    LDR5010: All ejb(s) of [__ejb_container_timer_app] loaded successfully!
    NAM0008 : Invalid Destination: jndi/Topic for java:comp/env/jms/Topic
    EJB5090: Exception in creating EJB container [javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]]
    appId=Chat-ejb moduleName=Chat-ejb ejbName=publicarBean
    LDR5004: UnExpected error occured while creating ejb container
    javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:485)
            at com.sun.ejb.containers.BaseContainer.setupEnvironment(BaseContainer.java:2628)
            at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:629)
            at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:163)
            at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:515)
            at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:490)
            at com.sun.enterprise.server.EJBModuleLoader.load(EJBModuleLoader.java:158)
            at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:206)
            at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:198)
            at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:326)
            at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:112)
            at com.sun.enterprise.server.PEMain.run(PEMain.java:326)
            at com.sun.enterprise.server.PEMain.main(PEMain.java:260)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
    Caused by: javax.naming.NameNotFoundException
            at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:255)
            at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:178)
            at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
            at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:98)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:309)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:469)
            ... 17 more
    CORE5021: Application NOT loaded: [Chat-ejb]
    WEB0302: Starting Sun-Java-System/Application-Server.
    WEB0100: Loading web module [__default-admingui] in virtual server [__asadmin] at [/]
    WEB0100: Loading web module [adminapp] in virtual server [__asadmin] at [/web1]
    WEB0100: Loading web module [admingui] in virtual server [__asadmin] at [/asadmin]
    WEB0100: Loading web module [amserver] in virtual server [server] at [/amserver]
    Initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context ''
    Completed initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context ''
    Initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context '/asadmin'
    Completed initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context '/asadmin'
    WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8080
    WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8181
    WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 4848
    About to load the system app: __JWSappclients
    WEB0100: Loading web module [__JWSappclients:sys.war] in virtual server [server] at [/__JWSappclients]
    Using MQ RA for Broker lifecycle control
    JMS Service Connection URL is :mq://t1:7676/
    MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting...
    EB-start:brokerProps={imq.instancename=imqbroker, imq.jmx.rmiregistry.port=8686, BrokerArgs=-port 7676 -name imqbroker -imqhome D:\Sun\AppServer\imq\bin\.. -varhome D:/sun/AppServer/domains/domain1\imq -useRmiRegistry -rmiRegistryPort 8686, imq.jmx.rmiregistry.use=true, imq.portmapper.port=7676}
    [07/nov/2007:18:35:03 CET]
    ================================================================================
    Sun Java(tm) System Message Queue 4.0
    Sun Microsystems, Inc.
    Version:  4.0  (Build 27-a)
    Compile:  Thu 03/02/2006
    Copyright (c) 2006 Sun Microsystems, Inc.  All rights reserved.
    SUN PROPRIETARY/CONFIDENTIAL.  Use is subject to license terms.
    This product includes code licensed from RSA Data Security.
    ================================================================================
    Java Runtime: 1.6.0_03 Sun Microsystems Inc. D:\sun\Java\jdk1.6.0_03\jre
    [07/nov/2007:18:35:03 CET]    IMQ_HOME=D:\sun\AppServer\imq
    [07/nov/2007:18:35:03 CET] IMQ_VARHOME=D:\sun\AppServer\domains\domain1\imq
    [07/nov/2007:18:35:03 CET] Windows XP 5.1 x86 t1 (1 cpu) pepepc
    [07/nov/2007:18:35:03 CET] Java Heap Size: max=506816k, current=46944k
    [07/nov/2007:18:35:03 CET] Arguments: -port 7676 -name imqbroker -imqhome D:\Sun\AppServer\imq\bin\.. -varhome D:/sun/AppServer/domains/domain1\imq -useRmiRegistry -rmiRegistryPort 8686
    [07/nov/2007:18:35:04 CET] [B1060]: Loading persistent data...
    [07/nov/2007:18:35:04 CET] Using built-in file-based persistent store: D:\sun\AppServer\domains\domain1\imq\instances\imqbroker\
    [07/nov/2007:18:35:04 CET] [B1189]: Cluster Service feature is not available
    [07/nov/2007:18:35:04 CET] [B1039]: Broker "imqbroker@t1:7676" ready.
    MQJMSRA_EB1101: run:EMBEDDED broker started with code =0
    MQJMSRA_RA1101: SJSMQ JMS ResourceAdaapter configuration=
            raUID                               =null
            brokerType                          =EMBEDDED
            brokerInstanceName                  =imqbroker
            brokerBindAddress                   =null
            brokerPort                          =7676
            brokerHomeDir                       =D:\Sun\AppServer\imq\bin\..
            brokerVarDir                        =D:/sun/AppServer/domains/domain1\imq
            brokerJavaDir                       =D:/sun/Java/jdk1.6.0_03
            brokerArgs                          =null
            brokerStartTimeout                  =60000
            adminUsername                       =admin
            adminPassFile                       =E:\tempWin\asmq21980.tmp
            useJNDIRmiServiceURL                =true
            rmiRegistryPort                     =8686
            startRmiRegistry                    =false
            useSSLJMXConnector                  =true
            brokerEnableHA                      =false
            clusterId                           =null
            brokerId                            =null
            jmxServiceURL                       =null
            dbType                              =null
            dbProps                             ={}
            dsProps                             ={}
            ConnectionURL                       =
            UserName                            =guest
            ReconnectEnabled                    =true
            ReconnectInterval                   =5000
            ReconnectAttempts                   =3
            AddressListBehavior                 =RANDOM
            AddressListIterations               =3
            InAppClientContainer                =false
            InClusteredContainer                =false
            GroupName                           =null
    MQJMSRA_RA1101: start:SJSMQ JMSRA Connection Factory Config={imqOverrideJMSPriority=false, imqConsumerFlowLimit=1000, imqOverrideJMSExpiration=false, imqAddressListIterations=3, imqLoadMaxToServerSession=true, imqConnectionType=TCP, imqPingInterval=30, imqSetJMSXUserID=false, imqConfiguredClientID=, imqSSLProviderClassname=com.sun.net.ssl.internal.ssl.Provider, imqJMSDeliveryMode=PERSISTENT, imqConnectionFlowLimit=1000, imqConnectionURL=http://localhost/imq/tunnel, imqBrokerServiceName=, imqJMSPriority=4, imqBrokerHostName=localhost, imqJMSExpiration=0, imqAckOnProduce=, imqEnableSharedClientID=false, imqAckTimeout=0, imqAckOnAcknowledge=, imqConsumerFlowThreshold=50, imqDefaultPassword=guest, imqQueueBrowserMaxMessagesPerRetrieve=1000, imqDefaultUsername=guest, imqReconnectEnabled=false, imqConnectionFlowCount=100, imqAddressListBehavior=PRIORITY, imqReconnectAttempts=3, imqSetJMSXAppID=false, imqConnectionHandler=com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler, imqSetJMSXRcvTimestamp=false, imqBrokerServicePort=0, imqDisableSetClientID=false, imqSetJMSXConsumerTXID=false, imqOverrideJMSDeliveryMode=false, imqBrokerHostPort=7676, imqQueueBrowserRetrieveTimeout=60000, imqSetJMSXProducerTXID=false, imqSSLIsHostTrusted=false, imqConnectionFlowLimitEnabled=false, imqReconnectInterval=5000, imqAddressList=localhost:7676, imqOverrideJMSHeadersToTemporaryDestinations=false}
    MQJMSRA_RA1101: SJSMQ JMSRA Started
    endpoint.determine.destinationtype
    NAM0008 : Invalid Destination: jndi/Topic for java:comp/env/jms/Topic
    EJB5090: Exception in creating EJB container [javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]]
    appId=Chat moduleName=Chat-ejb_jar ejbName=publicarBean
    LDR5004: UnExpected error occured while creating ejb container
    javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:485)
            at com.sun.ejb.containers.BaseContainer.setupEnvironment(BaseContainer.java:2628)
            at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:629)
            at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:163)
            at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:515)
            at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:490)
            at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:184)
            at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:113)
            at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:206)
            at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:204)
            at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:326)
            at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:112)
            at com.sun.enterprise.server.PEMain.run(PEMain.java:326)
            at com.sun.enterprise.server.PEMain.main(PEMain.java:260)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
    Caused by: javax.naming.NameNotFoundException
            at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:255)
            at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:178)
            at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
            at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:98)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:309)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:469)
            ... 18 more
    Registering ad hoc servlet: WebPathPath: context root = "/Chat", path = "/Chat-app-client'
    Java Web Start services started for application com.sun.enterprise.appclient.jws.ApplicationContentOrigin@aabc2d registration name=Chat
        [email protected]56b4 registration name=Chat, context root=/Chat/Chat-app-client, module name=
    , parent=Chat
    CORE5021: Application NOT loaded: [Chat]
    SMGT0007: Self Management Rules service is enabled
    Application server startup complete.
    JBISE6013: JavaEEServiceEngine : Java EE Service Engine started successfully.
    CORE5024: EJB module [Chat-ejb] unloaded successfully!
    DeployedItemRef postDeregistration failed. Load Balancer Monitoring MBeans might be lying around if this application is being load balanced
    BPEL service engine started
    ADM1064:The upload file at [E:\tempWin\s1astempdomain1server-162970426\Chat-ejb.jar] exists and will be overwritten.
    ADM1006:Uploading the file to:[E:\tempWin\s1astempdomain1server-162970426\Chat-ejb.jar]
    deployed with moduleid = Chat-ejb
    ADM1041:Sent the event to instance:[ModuleDeployEvent -- enable ejb/Chat-ejb]
    endpoint.determine.destinationtype
    NAM0008 : Invalid Destination: jndi/Topic for java:comp/env/jms/Topic
    EJB5090: Exception in creating EJB container [javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]]
    appId=Chat-ejb moduleName=D__sun_AppServer_domains_domain1_applications_j2ee-modules_Chat-ejb ejbName=publicarBean
    LDR5004: UnExpected error occured while creating ejb container
    javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:485)
            at com.sun.ejb.containers.BaseContainer.setupEnvironment(BaseContainer.java:2628)
            at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:629)
            at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:163)
            at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:515)
            at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:490)
            at com.sun.enterprise.server.EJBModuleLoader.load(EJBModuleLoader.java:158)
            at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:219)
            at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:174)
            at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:406)
            at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleEnabled(StandAloneEJBModulesManager.java:500)
            at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:960)
            at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:941)
            at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:448)
            at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)
            at com.sun.enterprise.admin.server.core.AdminNotificationHelper.sendNotification(AdminNotificationHelper.java:128)
            at com.sun.enterprise.admin.server.core.ConfigInterceptor.postInvoke(ConfigInterceptor.java:109)
            at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:97)
            at $Proxy1.invoke(Unknown Source)
            at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
            at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:56)
            at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:142)
            at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:109)
            at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:180)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: javax.naming.NameNotFoundException
            at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:255)
            at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:178)
            at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
            at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:98)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:309)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:469)
            ... 54 more
    CORE5020: Error while loading ejb module
    {code}
    I know it is very large. I think the error it is in this line.
    {code}
    NAM0008 : Invalid Destination: jndi/Topic for java:comp/env/jms/Topic
    EJB5090: Exception in creating EJB container [javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]]
    {code}
    also I am going to put the code.
    file PublicarBean.java
    {code}
    package org.pepes;
    import com.sun.tools.ws.processor.model.java.JavaArrayType;
    import javax.annotation.Resource;
    import javax.ejb.SessionContext;
    import javax.ejb.Stateless;
    import javax.jms.ConnectionFactory;
    import javax.jms.QueueConnectionFactory;
    import javax.jms.Topic;
    import javax.naming.NamingException;
    * @author pepes
    @Stateless(mappedName="ejb/publicar")
    public class publicarBean implements org.pepes.publicarRemote {
        /** Creates a new instance of publicarBean */
        @Resource(name="jms/QueueConnectionFactory")
        private QueueConnectionFactory connectionFactory;
        @Resource(name="jms/Topic", mappedName="jndi/Topic")
        private Topic topic;
        private javax.naming.InitialContext ctx;
        public publicarBean() {
        public void creaMensaje() throws javax.naming.NamingException , javax.jms.JMSException {
            try {       
                javax.naming.InitialContext ctx = new javax.naming.InitialContext();
                this.connectionFactory = (javax.jms.QueueConnectionFactory)ctx.lookup("jms/QueueConnectionFactory");
                this.topic = (javax.jms.Topic)ctx.lookup("jms/Topic");
                javax.jms.Connection connection = this.connectionFactory.createConnection();
                javax.jms.TopicSession ts = (javax.jms.TopicSession)connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
                javax.jms.TopicPublisher tp = ts.createPublisher(this.topic);
                javax.jms.TextMessage msg = ts.createTextMessage();
                for (int i = 0; i<3;i++) {
                    msg.setText("Prueba: " + i);
                    tp.publish(msg);
            catch (javax.jms.JMSException jmex) {
                throw jmex;
    {code}
    the file publicarRemote.java
    {code}
    package org.pepes;
    import javax.ejb.Remote;
    * This is the business interface for publicar enterprise bean.
    @Remote
    public interface publicarRemote {
         public void creaMensaje() throws javax.naming.NamingException , javax.jms.JMSException;
    {code}
    file mensaje.java
    {code}
    package org.pepes;
    import javax.annotation.Resource;
    import javax.ejb.ActivationConfigProperty;
    import javax.ejb.MessageDriven;
    import javax.ejb.MessageDrivenContext;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    * Entity class Mensaje
    * @author pepes
    @MessageDriven(mappedName = "jms/Mensaje", activationConfig =  {
            @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
            @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
    public class Mensaje implements MessageListener {
        /** Creates a new instance of Mensaje */
        @Resource
        private MessageDrivenContext mdc;
        public Mensaje() {
        public void onMessage(Message message) {
            javax.jms.TextMessage msg = null;
            try {
                if (message instanceof javax.jms.TextMessage) {
                    msg = (javax.jms.TextMessage) message;
                    System.out.println(msg.getText());
                } else {
                    System.out.println("Message of wrong type: "
                            + message.getClass().getName());
            } catch (javax.jms.JMSException e) {
                e.printStackTrace();
                mdc.setRollbackOnly();
            } catch (Throwable te) {
                te.printStackTrace();
    {code}
    the file prueba.jsp
    {code}
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
    you must also add the JSTL library to the project. The Add Library... action
    on Libraries node in Projects view can be used to add the JSTL 1.1 library.
    --%>
    <%--
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
        <h1>JSP Page</h1>
        <%--
        This example uses JSTL, uncomment the taglib directive above.
        To test, display the page like this: index.jsp?sayHello=true&name=Murphy
        --%>
        <%--
        <c:if test="${param.sayHello}">
            <!-- Let's welcome the user ${param.name} -->
            Hello ${param.name}!
        </c:if>
        --%>
        <%    
            try {
            javax.naming.InitialContext ctx = new javax.naming.InitialContext();
            org.pepes.publicarRemote publisher = (org.pepes.publicarRemote)ctx.lookup("ejb/publicar");
            if (publisher==null) {
                System.out.println("INFO: Es null");
            else {
                System.out.println("INFO: No es null");
            publisher.creaMensaje();
            } catch (javax.naming.NamingException ex) {
                System.out.println("ERROR naming: " + ex.getMessage());
            catch (javax.jms.JMSException jmex) {
                System.out.println("ERROR jms: " + jmex.getMessage());
            catch (java.lang.NullPointerException nullex) {
                System.out.println("ERROR null: " + nullex.getMessage());
    %>
        </body>
    </html>
    {code}
    I think the problem is because i don't put destination address. if it is so, the true where do I put this address?. if not where is the problem?
    I hope your help.
    Thanks you  in advanced.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Hi,
    Did you create your destinations in your application server? It seems that the destinations such as topics and queues are not created. First you should create them and then start using them.
    For example, in here, it says that jndi/Topic is not valid. To check if the destinations are valid or not; you can do it either through the graphical user interface or the command line console.

  • Saving string  from multiple clients on a server data structue

    I have a server which receives updates from multiple clients ( in this example, football scores which are updated periodically by the clients.)
    When the server receives the scores it needs to store them and at certain time intervals send the complete list of scores to multiple terminals at various locations.
    I am approaching this task in stages...
    stage 1.
    ..create the clients and server ...test the clients can send the data and the server can receive the data and output to screen..
    this is completed
    stage 2...
    a/ on the server side store the received scores in a data structure (ArrayList<String> is what I'm thinking.)
    b/ periodically output all scores to the screen (maybe every 30 seconds) and empty the ArrayList..am looking at the Timer class for this part..
    stage 3
    create the monitors and output scores to monitors periodically..
    ======================================================
    right now I'm at stage 2a ie trying to store the received scores in a data structure.
    i've created a method saveScore in the StoreScore class which is called by the StoreScore run method...
    The saveScore method creates an ArrayList and adds the score to it...
    Question
    does every thread create a new instance of storedScores and therefore the scores are stored in a multitude of data structures?
    I think the answer is yes and if so then this is not the solution...
    What I'm thinking is , as all scores can be outputted to the server screen via System.out.println, is there not a way of saving all these scores in a single data structure?
    The code below is the server code..
    any advice much appreciated....thank you
    /*=============================================================== */
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.concurrent.*;
    class ScoresServer1{
    final static int portNum = 1234; // any number > 1024
    final static int numThreads = 10;
    static ExecutorService pool;
    public static void main(String[] args){
    pool = Executors.newFixedThreadPool(numThreads);
    System.out.println("Server running ...");
    try{  
    ServerSocket servesock = new ServerSocket(portNum);
    // for service requests on port
    while (true){ 
    // wait for a service request on port portNum
    Socket socket = servesock.accept();
    // submit request to pool
    pool.submit(new StoreScore(socket));
    }catch(IOException e){}
    class StoreScore implements Runnable {
    BufferedReader reader;
    Socket sock;
    public StoreScore(Socket clientSOcket) {
    try {
    sock = clientSOcket;
    InputStreamReader isReader = new InputStreamReader(sock.getInputStream());
    reader = new BufferedReader(isReader);
    } catch (Exception ex) { ex.printStackTrace(); }
    public void run() {
    String message;
    try {
    while ((message = reader.readLine()) != null) {
    // System.out.println("latest score: " + message);
    saveScore(message);
    } catch (Exception ex) { ex.printStackTrace(); }
    public void saveScore(String message){
         ArrayList<String> storedScores = new ArrayList<String>();
         storedScores.add(message);
         Iterator<String> t = storedScores.iterator();
              while(t.hasNext()){
                   String s = t.next();
                   System.out.println(s);
    }

    does every thread create a new instance of storedScores and therefore the scores are stored in a multitude of data structures?
    I think the answer is yes and if so then this is not the solution...The answer is yes. However, threads can share data, if they were properly synchronized. You should read the threading tutorial before creating a lot of hard to debug mistakes.
    [http://java.sun.com/docs/books/tutorial/essential/concurrency/]

  • Multiple clients with same account on a single IMAP server

    Hi,
    I am connecting to a IMAP server using same account but from 2 different machines. From one machine a mark a message as SEEN=FALSE. But on the second machine, the flag will still be TRUE.
    Is there any way to co-ordinate between multiple clients so that all the clients are in sync.
    Regards,
    Nitin.

    I was able to resolve the problem using addMessageCountListener and messagesAdded method, as suggested by you.
    I am now facing another problem. Whenever a new message is received, code inside messagesAdded method gets executed. Here I am trying to spawn another thread and do some stuff. But this new thread is not starting at all. It goes into some JavaMail:EventQueue and does nothing. What is the concept of EventQueue here? How can I get this new thread executed?
    Also will there be synchronization problems in messagesAdded method. Say I received a message and I am processing it in the messagesAdded method. In the mean time another message comes up. How will this behave.

  • How can I connect multiple clients to a single client ?

    I am currently developing an instant messaging program.I created a server and connected multiple clients to it by using thread logic.However I do not know how to connect multiple client to a single client.
    What shall I do for that?Does anybody know a good tutorial or sample program?Or shall anybody explain me what I shall do for building the Instant Messaging part of my chat program?
    Thank u in advance.

    You may use UDP multicast socket. But since you are using the UDP protocol you might risk losing the data that you send since UDP does not guarantee the safe transfer of data.
    Alternately, you might create a server that allows multiple client to connect to it whose connection Socket objects are then stored in a Vector <Socket> object. The server then sends back data to the connected client about the other clients connected to it. Now when the client wants to send data (like an IM) to another connected client, it has to send a request to the server specifying the client login name and the server in turn streams that particular client's Address and Port to the requesting client. The requesting client then initiates the connection with the other client and then starts a conversation. One more thing, when the client communicates it needs to send information to the server like the name by which it likes to be referenced. In this scenario the server acts like a central repository for clients to query the existence of other clients in the chat room. Each client here runs a thread that listens to incoming connections and when a connection is established, may be opens a IM window or something.
    The third option is to make the server to relay the information from one client to another. Like say, I'm connected to whoopy server and i want to send "Hello" to jackson, then i send the message (ie, Hello) along with the name of the client to which i wish to send it to (ie, jackson). The server then performs a lookup in its Vector <Socket> object and then initiates a connection with jackson and sends the information. However, this method is pretty costly in that you will be wasting a lot of processing behind the server.
    --Subhankar
    P.s. If you stumble upon any other brilliant ideas let me know.

  • Java Message Queue/ JMS Vendor performance.

    Hi,
    I need some help from you folks. In our system we are dealing with large number (tens of thousands) of operations per second. I'm doing some research in order to determine if we can use JavaTM Message Service (JMS) API in this system. I red that Java Message Queue was voted "Best Java Messaging Tool" by Java Developer's Journal readers and JMQ now marked by iPlanet[tm] E-Commerce Solutions. So I'm looking for numbers. How many clients/operations iPlanet or other JMS vendors can support per second. Unfortunately I didn't find any concrete example of built systems, number of maximum operation supported per second.
    Please response to [email protected] also.
    Thanks in advance,
    Daniel Drazner

    Following configuration: pIII 1GHz, standard vm settings, JBoss 2.4.4, jdk1.3.3 sun
    My project (probably good optimized) has following performance:
    - asynchronous sending message to queue:20 ms
    - synchronous (send/replay) 200 ms
    This are statistics for single thread, but this is some how scalable, so for 20 parallel threads you will have the same performance.
    Topics are much faster, but I need PTP messaging

  • Writing SOAP messages into JMS message

    I have a system that has WSDL "contracts" for messaging, and we want to use a JMS infrastructure to send SOAP messages.
    From all the clients that I have seen generated they all want to talk HTTP, or use their own way of using JMS.
    What I would like to do is generate a client for the WSDL that just generates SOAP messages in a string, which I can then put on a JMS message (with special custom JMS headers setup etc).
    Any ideas ?
    I guess I am trying to do something similar to what JAXB does with normal schemas.

    push

  • GUI receiving log messages from JMS

    Hi,
    I have three classes: GUI, EventListener and JMSListener. What I want to do is to create a login dialog. The user enters his username and password, presses the login button and waits (as this process can take a while). While waiting, he can see log messages sent via JMS.
    I set up a TextListener (in my case a JMSListener) and a subscriber like it is described here: http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/client.html#1027256.
    But the JMSListener never gets any message although the connection is set up correctly (this is just a guess as no exception is thrown). I think that this is a GUI problem. Because if only the JMSListener is running, it does receive messages. Is it possible that the GUI blocks somehow?
    Here is some code... First the class that holds the main method:
    package de.dtnet.client.run;
    import javax.swing.JFrame;
    import javax.swing.SwingUtilities;
    import javax.swing.UIManager;
    import de.dtnet.client.gui.SWDemoGUI;
    import de.dtnet.client.listener.SWDemoEventlistener;
    public class SWDemoClient {
        private static SWDemoGUI swdemo = null;
         * @param args
        public static void main(String[] args) {
            swdemo = new SWDemoGUI();
            SWDemoEventlistener listener = new SWDemoEventlistener(swdemo);
            swdemo.registerEventlistener(listener);
    }The code from the GUI (only the important parts):
    package de.dtnet.client.gui;
    import de.dtnet.client.listener.SWDemoEventlistener;
    public class SWDemoGUI extends JFrame implements Serializable {
        private static final long serialVersionUID = 1L;
         * Default constructor
        public SWDemoGUI() {
            initialize();
         * Creates widget objects and puts everything together
        public void initialize() {
            // GUI with JTextPane for log messages
        public void logOK(String msg) {
            log(OK, msg);
        public void logInfo(String msg) {
            log(INFO, msg);
        public void logWarning(String msg) {
            log(WARNING, msg);
        public void logError(String msg) {
            log(ERROR, msg);
        public void log(String level, String msg) {
            StyledDocument doc = messagesTextPane.getStyledDocument();
            try {
                doc.insertString(doc.getLength(), msg + "\n", doc.getStyle(level));
            } catch (BadLocationException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            messagesTextPane.setCaretPosition(doc.getLength());
        public void registerEventlistener(SWDemoEventlistener listener) {
            loginBtn.addActionListener(listener);
            usernameTxt.addFocusListener(listener);
            passwordField.addFocusListener(listener);
    }The enventlistener:
    package de.dtnet.client.listener;
    // imports
    public class SWDemoEventlistener implements ActionListener, FocusListener {
        private SWDemoGUI gui = null;
        private String logLevel = null;
        private String logMessage = null;
        private TopicConnectionFactory conFactory = null;
        private TopicConnection connection = null;
        private TopicSession topicSession = null;
        private Topic topic = null;
        private TopicSubscriber subscriber = null;
        public SWDemoEventlistener(SWDemoGUI gui) {
            this.gui = gui;
            initJMS();
        private InitialContext getInitialContext() {
            // set the properties for the InitalContext
            Properties env = new Properties( );
            env.put("java.naming.provider.url",
                    "jnp://localhost:1099");
            env.put("java.naming.factory.initial",
                    "org.jnp.interfaces.NamingContextFactory");
            env.put("java.naming.factory.url.pkgs", "org.jnp.interfaces");
            try {
                // initalize and return the InitalContext with
                // the specified properties
                return new InitialContext(env);
            } catch (NamingException ne) {
                System.out.println("NamingException: " + ne);
            return null;
        private void initJMS() {
            try {
                // Obtain a JNDI connection
                InitialContext jndi = getInitialContext();
                Object ref = jndi.lookup("ConnectionFactory");
                // Look up a JMS connection factory
                conFactory = (TopicConnectionFactory) PortableRemoteObject.narrow(
                        ref, TopicConnectionFactory.class);
                // Create a JMS connection
                connection = conFactory.createTopicConnection();
                // Create a JMS session objects
                topicSession = connection.createTopicSession(
                        false, Session.AUTO_ACKNOWLEDGE);
                // Look up a JMS topic
                topic = (Topic) jndi.lookup("topic/testTopic");
            } catch (NamingException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (JMSException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
        public void actionPerformed(ActionEvent e) {
            if (e.getSource() == gui.getLoginButton()) {
                // Do some authentication stuff etc.
                /* Now awaitening messages from JMS */
                subscribe(sessionID);
        public void subscribe(Long sessionID) {
            String selector =  "SessionID='" + sessionID.toString() + "'";
            gui.logInfo("Selector: " + selector);
            try {
                //subscriber = topicSession.createSubscriber(topic, selector, true);
                subscriber = topicSession.createSubscriber(topic);
                JMSListener listener = new JMSListener(gui);
                subscriber.setMessageListener(listener);
                connection.start();
                gui.logOK("Verbindung zu JMS erfolgreich");
            } catch (JMSException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
    }and finally the JMSListener:
    ackage de.dtnet.client.listener;
    public class JMSListener implements MessageListener {
        private SWDemoGUI gui = null;
        private String logLevel = null;
        private String logMessage = null;
        public JMSListener(SWDemoGUI gui) {
            super();
            this.gui = gui;
        public void onMessage(Message incomingMessage) {
            System.out.println("You got message!");
            try {
                MapMessage msg = (MapMessage) incomingMessage;
                logMessage = msg.getString("Message");
                logLevel = msg.getString("Level");
            } catch (JMSException e) {
                e.printStackTrace();
            Runnable logTopicMessage = new Runnable() {
                public void run() {
                    System.out.println("Now updating the GUI");
                    gui.log(logLevel, logMessage);
            SwingUtilities.invokeLater(logTopicMessage);
            System.out.println("Message fully retrieved!");
    }I spent a whole day on this and I'm really becoming desperate as I can't see where the problem is and my time is running out (this is for my diploma thesis)! Does anyone of you? Please!
    Thank you!
    -Danny

    Hello Veronica4468,
    After reviewing your post, I have located an article that can help in this situation. It contains a number of troubleshooting steps and helpful advice concerning Messages and SMS:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • Does Java Proxy guarantee the delivery of message?

    Hi All ,
    I would like to know, if java client proxy guarantees the delivery of messages similar to ABAP client proxies.
    I am asking this question with reference to a situation where the XI system is down and the client proxy messages are invoked to the Integration Server.
    Can anyone share more thoughts on this?
    Thanks
    Narendra

    Narendra,
    Refer to the url http://help.sap.com/saphelp_nw04/helpdata/en/e3/c809c2fde0af4098e1ae126d06866c/frameset.htm
    From the menu on the LHS of this page you can navigate down to Acknowledgements
    An acknowledgement can be set which will enable you to confirm that an asynchronous message has been received
    Hope this helps,
    Mike

  • Multiple Client Logon in JCO

    Dear All,
    We import an RFC as a Model and the names used for the connections are used to create JCO connections in the WEB AS.
    However we have a need where we will know the SAP Client number only on the runtime. This means that the JCO connections can not be pre created in the WEB AS.
    To solve this i tried the following solution:
    I created 2 JCO connections for 2 different client Numbers in WEB AS. After importing the RFC i went to the class file where the connection name is mentioned. I applied a condition by coding to choose one of the JCO Connections which i created programatically. However when i rebuild the project this complete code is overwritten to the connection name specified in the wizard during the RFC model import.
    Can anyone suggest answers for the following ?
    - How can i manipulate the connection name of the JCO in code without being overwritten during rebuild ?
    - Do you know of any other ways other of achieving my objective of connecting to multiple clients and deciding the connection name on the runtime?
    Kind Regards,
    Mukesh

    Hi Mukesh,
       If you already have a JCo connection created based on the LDAP credentials, you can fetch the details like this:
    try {
    IWDJCOClientConnection clientCon =  WDSystemLandscape.getJCOClientConnection("<name of the JCO connection>");
    String clientName      = clientCon.getClientName();
    String lang          = clientCon.getLanguage();
    String passowrd          = clientCon.getPassword();
    String sysID          = clientCon.getSystemIdentifier();
    String user          = clientCon.getUser();
    //etc...
    } catch (WDSystemLandscapeException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    Is this what you are looking for?
    Regards,
    Satyajit.
    Message was edited by: Satyajit Chakraborty

  • System Landscape using multiple clients scenario for BW

    Hi Friends,
    I have a scenario where I want to use multiple BW clients based on single server.
    I have made client copy of the development server and want to transport the objects
    to the target clients.
    I am aware that such a scenario works fine in R/3 and infact i have used it
    .But in BW when i hit RSA1 I  get an error message "you can only use client(010)"-my development client of which copy was made.
    The client copy system is 102.
    Now I read a thread on sdn which said change client entry in RSADMINA table .I changed it ,but I think its cross client table and hence RSA1 is neither workinging in client copy or the parent system.I reverted back entry in client 102 and saw that development client working again fine like before.(also RSADMINA) value changed in 010.
    I have tried to fix it by creating appropriate mappings using SCC4/BD54/SALE/WE20/RZ10
    .Also created mapping WE20 for Partner profile and assigned the logica system.
    Is it possible to have such a system landscape?
    Can anyone give some useful suggestions?

    Hi..thanks to all of you....
    I think this thing boils down to table RSADMINA where you maintain entry for your client.
    The primary key there is 'Customizing ID' and when you specify there "BW" .You can't make another entry for another MANDT with another customizing id.
    Whenever u login to any other client and you change entry of MANDT it is going to be reflected to all the clients and thats what is the issue.So you can't mantain mulitple entries as you can't enter two customizing ids. there.
    Infact there are many reasons in the background as well which the sap note mentions like common number ranges..etc.
    Lastly ..Ofcourse as Siggi said you can have another R/3 or CRM system etc on the same server but no two BW clients.I think SAP should not allow client copy for BW on the same server..it will help some bad efforts
    Thanks for the support everyone.
    Regards,
    Rakesh
    Edited by: Rakesh Kumar on Jun 15, 2009 12:08 PM

Maybe you are looking for