The code is below.  I'll change the logs to debug and see if it reveals
anything.


import javax.jms.*;
import javax.naming.*;

public class SimpleQueueReceiver
{

        /**
         * Main method.
         * 
         * @param args
         *            the queue used by the example
         */
        public static void main(String[] args)
        {
                String queueName = null;
                Context jndiContext = null;
                QueueConnectionFactory queueConnectionFactory = null;
                QueueConnection queueConnection = null;
                QueueSession queueSession = null;
                Queue queue = null;
                QueueReceiver queueReceiver = null;
                TextMessage message = null;

                /*
                 * Read queue name from command line and display it.
                 */
                if (args.length != 1)
                {
                        System.out.println("Usage: java "
                                        + "SimpleQueueReceiver
<queue-name>");
                        System.exit(1);
                }
                queueName = new String(args[0]);
                System.out.println("Queue name is " + queueName);

                try
                {
                        jndiContext = new InitialContext();
                }
                catch (NamingException e)
                {
                        System.out.println("Could not create JNDI API "
+ "context: "
                                        + e.toString());
                        System.exit(1);
                }

                try
                {
                        queueConnectionFactory =
(QueueConnectionFactory) jndiContext
        
.lookup("java:comp/env/jms/PlayerConnectionFactory");
                        queue = (Queue) jndiContext.lookup(queueName);
                }
                catch (NamingException e)
                {
                        System.out.println("JNDI API lookup failed: " +
e.toString());
                        System.exit(1);
                }


                try
                {
                        queueConnection =
queueConnectionFactory.createQueueConnection();
                        queueSession =
queueConnection.createQueueSession(false,
                                        Session.AUTO_ACKNOWLEDGE);
                        queueReceiver =
queueSession.createReceiver(queue);
                        queueConnection.start();
                        while (true)
                        {
                                Message m = queueReceiver.receive(1);
                                if (m != null)
                                {
                                        if (m instanceof TextMessage)
                                        {
                                                message = (TextMessage)
m;
        
System.out.println("Reading message: "
                                                                +
message.getText());
                                        }
                                        else
                                        {
                                                break;
                                        }
                                }
                        }
                }
                catch (JMSException e)
                {
                        System.out.println("Exception occurred: " +
e.toString());
                }
                finally
                {
                        if (queueConnection != null)
                        {
                                try
                                {
                                        queueConnection.close();
                                }
                                catch (JMSException e)
                                {
                                }
                        }
                }
        }
}
-----Original Message-----
From: Asankha C. Perera [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 11, 2008 12:22 PM
To: [email protected]
Subject: Re: Switching transports - JMS to http using AQ

I suspect the java:comp/.. stuff creates issues .. Do not name your 
proxy service as "java:comp/env/jms/OutQueue" etc.. but something like 
"JMSProxy".. I will have to ask you to paste the full sample JMS 
standalone client code that you tried (which shows the connection 
factory name etc)..

also in your log4j.properties file, set 
"log4j.category.org.apache.synapse.transport=INFO" to 
"log4j.category.org.apache.synapse.transport=DEBUG" and see if there is 
any additional information..

asankha

[EMAIL PROTECTED] wrote:
> Here's the contents:
>
> --> Wrapper Started as Console
> Launching a JVM...
> Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
>   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
>
> 2008-02-11 11:31:23,937 [-] [WrapperSimpleAppMain]  INFO ServerManager
> Using the Axis2 Repository C:\SYNAPS~1.1\repository
> 2008-02-11 11:31:25,359 [-] [WrapperSimpleAppMain]  INFO
> SynapseInitializationModule Initializing Synapse at : Mon Feb 11
> 11:31:25 EST 2008
> 2008-02-11 11:31:25,359 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO SynapseInitializationModule Loading mediator extensions...
> 2008-02-11 11:31:25,359 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO SynapseInitializationModule Initializing the Synapse
configuration
> ...
> 2008-02-11 11:31:25,379 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO XMLConfigurationBuilder Generating the Synapse configuration
model
> by parsing the XML configuration
> 2008-02-11 11:31:25,580 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO SynapseConfigurationBuilder Loaded Synapse configuration from :
> C:\SYNAPS~1.1\bin\..\repository\conf\sample\synapse_sample_250.xml
> 2008-02-11 11:31:25,590 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO SynapseInitializationModule Deploying the Synapse service..
> 2008-02-11 11:31:25,610 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO SynapseInitializationModule Initializing Sandesha 2...
> 2008-02-11 11:31:25,620 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO SynapseInitializationModule Synapse server name : ACN3T27851
> 2008-02-11 11:31:25,620 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO SynapseInitializationModule Deploying Proxy services...
> 2008-02-11 11:31:25,620 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ProxyService Building Axis service for Proxy service :
> java:comp/env/jms/OutQueue
> 2008-02-11 11:31:26,000 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ProxyService Adding service java:comp/env/jms/OutQueue to the
Axis2
> configuration
> 2008-02-11 11:31:26,000 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ProxyService Successfully created the Axis2 service for Proxy
> service : java:comp/env/jms/OutQueue
> 2008-02-11 11:31:26,000 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO SynapseInitializationModule Deployed Proxy service :
> java:comp/env/jms/OutQueue
> 2008-02-11 11:31:26,000 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ProxyService Building Axis service for Proxy service :
> StockQuoteProxy
> 2008-02-11 11:31:26,070 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ProxyService Adding service StockQuoteProxy to the Axis2
> configuration
> 2008-02-11 11:31:26,070 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ProxyService Successfully created the Axis2 service for Proxy
> service : StockQuoteProxy
> 2008-02-11 11:31:26,070 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO SynapseInitializationModule Deployed Proxy service :
> StockQuoteProxy
> 2008-02-11 11:31:26,070 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO SynapseInitializationModule Synapse initialized successfully...!
> 2008-02-11 11:31:26,150 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO HttpCoreNIOSender HTTPS Sender starting
> 2008-02-11 11:31:26,150 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO HttpCoreNIOSender HTTP Sender starting
> 2008-02-11 11:31:26,301 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> WARN ServerManager Port 8080 already in use. Trying alternate
> 2008-02-11 11:31:26,361 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO HttpCoreNIOListener HTTPS Listener starting on port : 8443
> 2008-02-11 11:31:26,361 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ServerManager Starting transport https on port 8443
> 2008-02-11 11:31:26,531 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO HttpCoreNIOListener HTTP Listener starting on port : 8008
> 2008-02-11 11:31:26,531 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ServerManager Starting transport http on port 8008
> 2008-02-11 11:31:26,571 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ServerManager Starting transport vfs
> 2008-02-11 11:31:26,571 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ServerManager Starting transport mailto
> 2008-02-11 11:31:26,591 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO JMSListener JMS Transport Receiver/Listener initialized...
> 2008-02-11 11:31:28,424 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO JMSConnectionFactory Connected to the JMS connection factory :
> java:comp/env/jms/PlayerConnectionFactory
> 2008-02-11 11:31:30,647 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO JMSConnectionFactory Connection factory : default initialized...
> 2008-02-11 11:31:30,647 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO JMSListener Starting to listen on destination :
> java:comp/env/jms/OutQueue of type queue for service
> java:comp/env/jms/OutQueue
> 2008-02-11 11:31:30,777 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO JMSConnectionFactory Mapped JNDI name :
java:comp/env/jms/OutQueue
> and JMS Destination name : OUT_QUEUE against service :
> java:comp/env/jms/OutQueue
> 2008-02-11 11:31:31,068 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ServerManager Starting transport jms
> 2008-02-11 11:31:31,068 [172.17.5.187-ACN3T27851]
[WrapperSimpleAppMain]
> INFO ServerManager Ready for processing
> 2008-02-11 11:32:19,107 [172.17.5.187-ACN3T27851] [I/O dispatcher 7]
> INFO PipeImpl Using simulated buffered Pipes for event-driven to
stream
> IO bridging
> 2008-02-11 11:32:19,347 [172.17.5.187-ACN3T27851] [HttpServerWorker-1]
> INFO TimeoutHandler This engine will expire all callbacks after :
86400
> seconds, irrespective of the timeout action, after the specified or
> optional timeout
>
> -----Original Message-----
> From: Asankha C. Perera [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 11, 2008 11:49 AM
> To: [email protected]
> Subject: Re: Switching transports - JMS to http using AQ
>
> Greg
>   
>> I have attached the log as well.
>>   
>>     
> I don't see the log :(
>
> asankha
>   
>> -----Original Message-----
>> From: Asankha C. Perera [mailto:[EMAIL PROTECTED] 
>> Sent: Saturday, February 09, 2008 5:58 AM
>> To: Blais, Gregg J.
>> Subject: Re: Switching transports - JMS to http using AQ
>>
>> Gregg
>>   
>>     
>>> I tried using a standard JMS client with AQ and it drops messages
>>> successfully and pulls messages off the queue fine using standard
JMS
>>> code.  Do you have any other suggestions on how to debug the issue
>>>     
>>>       
>> with
>>   
>>     
>>> Synapse?
>>>   
>>>     
>>>       
>> Ok.. well this is good news and I think we should be able to get
>>     
> Synapse
>   
>> working with AQ then..
>>
>> Can you post the JNDI properties you used to access AQ with the
sample
>>     
>
>   
>> client on the dev or user list and any logs from your side? You can
>>     
> hide
>   
>> any server names etc from the logs if its private
>>
>> Another option would be for one of the developers to test against AQ,

>> but lets put it off for now as it seems like you could get this to
>>     
> work 
>   
>> with a bit of work.
>>
>> asankha
>>
>>
>>
>> This message is for the designated recipient only and may contain
>>     
> privileged, proprietary, or otherwise private information.  If you
have
> received it in error, please notify the sender immediately and delete
> the original.  Any other use of the email by you is prohibited.
>   
>>   
>>     
>
>
> This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the original.  Any other use of the email by you is prohibited.
>
>   


This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.

Reply via email to