users@glassfish.java.net

Re: [Fwd: iiop over http] GF v2 b36 + ActiveMQ 4.1

From: David Harrigan <dharrigan_at_gmail.com>
Date: Tue, 20 Feb 2007 14:48:16 -0800 (PST)

Hi,

I've put that in now.

I removed the reference in GF to the EMBEDDED broker and put in Remote,
creating a new jms host to point to localhost on port 61616 (activemq
default tcp port). I then removed the default-jms-host and assigned the
value to be activemq (the name of my new host with the activemq settings).

Now, when I start up GF, it gives me connection refused....so, I start up
ActiveMQ and this is what I get:

[#|2007-02-20T22:43:55.488+0000|INFO|sun-appserver9.1|javax.enterprise.resource.resourceadapter|_ThreadID=10;_ThreadName=main;|JMS
Service Connection URL is :mq://localhost:61616/|#]

[#|2007-02-20T22:43:55.492+0000|INFO|sun-appserver9.1|javax.resourceadapter.mqjmsra.lifecycle|_ThreadID=10;_ThreadName=main;|MQJMSRA_RA1101:
SJSMQ JMS Resource Adapter starting...
================================================================================
Sun Java(tm) System Message Queue 4.1
Sun Microsystems, Inc.
Version: 4.1 Dev (Build 22-g)
Compile: Fri Jan 19 12:12:49 PST 2007

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.
================================================================================
|#]

[#|2007-02-20T22:44:10.517+0000|WARNING|sun-appserver9.1|javax.jms|_ThreadID=10;_ThreadName=main;_RequestID=043625f5-7bbf-4fb0-9342-5dff8e3fd146;|[I500]:
Caught JVM Exception: java.lang.NumberFormatException: For input string:
"�ActiveMQ�"|#]

[#|2007-02-20T22:44:30.534+0000|WARNING|sun-appserver9.1|javax.jms|_ThreadID=10;_ThreadName=main;_RequestID=043625f5-7bbf-4fb0-9342-5dff8e3fd146;|[I500]:
Caught JVM Exception: java.lang.NumberFormatException: For input string:
"�ActiveMQ�"|#]

[#|2007-02-20T22:44:50.551+0000|WARNING|sun-appserver9.1|javax.jms|_ThreadID=10;_ThreadName=main;_RequestID=043625f5-7bbf-4fb0-9342-5dff8e3fd146;|[I500]:
Caught JVM Exception: java.lang.NumberFormatException: For input string:
"�ActiveMQ�"|#]

[#|2007-02-20T22:45:10.566+0000|WARNING|sun-appserver9.1|javax.jms|_ThreadID=10;_ThreadName=main;_RequestID=043625f5-7bbf-4fb0-9342-5dff8e3fd146;|[I500]:
Caught JVM Exception: java.lang.NumberFormatException: For input string:
"�ActiveMQ�"|#]



The weird symbols are being output on the trace. ActiveMQ is also
complaining:

INFO TransportServerThreadSupport - Listening for connections at:
tcp://piccolino:61616
INFO TransportConnector - Connector openwire Started
INFO TransportServerThreadSupport - Listening for connections at:
ssl://piccolino:61617
INFO TransportConnector - Connector ssl Started
INFO TransportServerThreadSupport - Listening for connections at:
stomp://piccolino:61613
INFO TransportConnector - Connector stomp Started
INFO NetworkConnector - Network Connector default-nc Started
INFO BrokerService - ActiveMQ JMS Message Broker
(localhost, ID:piccolino-35643-1172011326777-1:0) started
DEBUG WireFormatNegotiator - Sending: WireFormatInfo { version=2,
properties={CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false,
TcpNoDelayEnabled=true, MaxInactivityDuration=30000,
TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
DEBUG Transport - Transport failed:
java.io.IOException: Wire format negociation timeout: peer did not send his
wire format.
java.io.IOException: Wire format negociation timeout: peer did not send his
wire format.
        at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:88)
        at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:43)
        at
org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1051)
        at
org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:779)
        at
org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:818)
        at
org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnector.java:148)
        at
org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportServer.java:167)
        at java.lang.Thread.run(Thread.java:619)
DEBUG TransportConnection - Stopping connection: /127.0.0.1:49459
DEBUG TransportConnection - Stopped connection: /127.0.0.1:49459




YOu know, I find it funny that both ActiveMQ and GF mention that they work
together. I've found no instructions on how to configure them to work
together - I'm trying to figure this out myself and not getting very far. I
wish it was just Plug'n'Play....

(http://activemq.apache.org/ for a reference to GF in it's Features - yet
nothing on GF - just JBoss and Geronimo).


-=david=-


Daniel Cavalcanti wrote:
>
> One of many possible points that I see is that you need to start the
> connection so that the mssages get delivered, i.e. connection.start();
> probably before you created the producer.
>
> On 2/20/07, David Harrigan <dharrigan_at_gmail.com> wrote:
>>
>>
>> Hi,
>>
>> I'm trying out the latest (and greatest) GF with ActiveMQ 4.1. I've
>> downloaded the Resource Adapter for ActiveMQ which conforms to the JCA
>> 1.5
>> spec.
>>
>> * Deployed the RA in GF - no problem.
>> * Created a Connector Connection Pool called jms/connectionPool
>> * Created a Connector Resource called jms/connectionFactory configured to
>> use jms/connectionPool
>> * Created Admin Object Resource called jms/testQueue with name of
>> testQueue
>> * Under Physical Destinations in Configuration -> Java Message Service
>> created a testQueue
>>
>> My client (producer) looks like this (stripped of ilrelevant code):
>>
>> @Resource(mappedName="jms/connectionFactory")
>> private static ConnectionFactory connectionFactory;
>>
>> @Resource(mappedName="jms/testQueue")
>> private static Queue queue;
>>
>> private void doIt() throws Exception {
>> final Connection connection = connectionFactory.createConnection
>> ();
>> final Session session = connection.createSession(false,
>> Session.AUTO_ACKNOWLEDGE);
>> final MessageProducer messageProducer =
>> session.createProducer(queue);
>> TextMessage textMessage = session.createTextMessage("Hello World!
>> ");
>> messageProducer.send(textMessage);
>> connection.close();
>> }
>>
>> My consumer (my Message Driven Bean) looks like this:
>>
>> @MessageDriven(mappedName = "jms/testQueue")
>> public class MessageBean {
>>
>> @Resource MessageDrivenContext messageDrivenContext;
>>
>> public void onMessage(final Message message) {
>> final TextMessage textMessage = (TextMessage)message;
>> try {
>> System.out.println("Received this message : " +
>> textMessage.getText());
>> } catch (final JMSException e) {
>> e.printStackTrace();
>> }
>> }
>> }
>>
>> Now, her e comes the interesting part:
>>
>> When I execute my App using this:
>>
>> ./appclient -client
>> /home/david/javastuff/eclipse-3.2.1/workspace/jee5/dist/jmsclient.jar
>>
>> I get output in the server.log
>>
>> BUT and this is a big BUT!!
>>
>> I haven't started ActiveMQ on my system! It's not even running anywhere!
>>
>> I'm at a loss as why this is happening (I've deleted (I think - looks
>> like
>> that in the web console)) any reference to jmsra.
>>
>>
>> Anyone with any idea?
>>
>>
>> -=david=-
>> --
>> View this message in context:
>> http://www.nabble.com/GF-v2-b36-%2B-ActiveMQ-4.1-tf3263484.html#a9071269
>> Sent from the java.net - glassfish users mailing list archive at
>> Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
>

-- 
View this message in context: http://www.nabble.com/GF-v2-b36-%2B-ActiveMQ-4.1-tf3263484.html#a9072105
Sent from the java.net - glassfish users mailing list archive at Nabble.com.