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.