comments inline
On Jul 29, 2005, at 7:05 PM, Sami Dalouche wrote:
Hi,
I'm currently trying to
1) Create some JMS Topics
2) Expose a ConnectionFactory + the Topics through JNDI
->
I'm using the following RA
<connector
xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
version="1.5"
configId="weather/jms/TopicsConfiguration"
parentId="org/apache/geronimo/System">
<resourceadapter>
<!-- how to connect to the JMS Server -->
<resourceadapter-instance>
<resourceadapter-name>My JMS Resources</resourceadapter-name>
<config-property-setting
name="ServerUrl">tcp://localhost:61616</config-property-setting>
<config-property-setting
name="UserName">system</config-property-setting>
<config-property-setting
name="Password">manager</config-property-setting>
<workmanager-name>DefaultWorkManager</workmanager-name>
</resourceadapter-instance>
<!-- defines a ConnectionFactory -->
<outbound-resourceadapter>
<connection-definition>
<connectionfactory-interface>javax.jms.ConnectionFactory</
connectionfactory-interface>
<connectiondefinition-instance>
<name>ConnectionFactory</name>
<implemented-interface>javax.jms.QueueConnectionFactory</implemented-
interface>
<implemented-interface>javax.jms.TopicConnectionFactory</implemented-
interface>
<connectionmanager>
<xa-transaction>
<transaction-caching />
</xa-transaction>
<single-pool>
<max-size>10</max-size>
<min-size>0</min-size>
<blocking-timeout-milliseconds>
5000
</blocking-timeout-milliseconds>
<idle-timeout-minutes>
0
</idle-timeout-minutes>
<match-one/>
</single-pool>
</connectionmanager>
<global-jndi-name>
jms/ConnectionFactory
</global-jndi-name>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
<!-- defines a Topic -->
<adminobject>
<adminobject-interface>
javax.jms.Topic
</adminobject-interface>
<adminobject-class>
org.codehaus.activemq.message.ActiveMQTopic
</adminobject-class>
<adminobject-instance>
<message-destination-name>jms/weatherTopic</message-destination-name>
<config-property-setting
name="PhysicalName">jms/weatherTopic</config-property-setting>
</adminobject-instance>
</adminobject>
<adminobject>
<adminobject-interface>
javax.jms.Topic
</adminobject-interface>
<adminobject-class>org.codehaus.activemq.message.ActiveMQTopic</
adminobject-class>
<adminobject-instance>
<message-destination-name>jms/weatherRequestsTopic</message-
destination-name>
<config-property-setting
name="PhysicalName">jms/weatherRequestsTopic</config-property-setting>
</adminobject-instance>
</adminobject>
</connector>
and deploy it using :
D:\geronimo>java -jar bin\deployer.jar deploy
d:\projects\weather\src\resources\
geronimo-activemq.xml
repository\activemq\rars\activemq-ra-3.1-SNAPSHOT.rar
Username: system
Password: manager
What is the output from this command?
Nothing appears in the Geronimo logs.
If you have geronimo running when you run the command above, you should
see something in geronimo.log. If you don't, you should see something
in deployer.log.
I tried to brows Geronimo's JMX with MC4J,
and the only thing I could find was a DefaultActiveMQConnectionFactory
My factory + topics don't seem to appear through JMX.
You might try the debug console. I haven't tried MC4J myself.
I also wrote a client :
I'm using Spring to get a reference to the Factory and get
javax.naming.NameNotFoundException: /jms/weatherRequestsTopic not found
at org.openejb.client.JNDIContext.lookup(JNDIContext.java:257)
at javax.naming.InitialContext.lookup(Unknown Source)
at
org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:
123)
so, it looks like my topic is not exposed through JNDI ? Or even not
created ?
I'm using the latest geronimo snapshot, and use the openejb 2.0
snapshot for my
client library (only this jar). Do I need something else ?
Is this a standalone non-j2ee client? If so you will have to use
instructions from activemq to use activemq. In particular, the openejb
jndi implementation only exposes ejbs, not any other resources. If you
have a j2ee app client, and you wish to use jms, you need to deploy a
copy of the activemq adapter on the client. You can then use the j2ee
java:comp/env context to find your stuff.
Have you looked at the developerworks article?
http://www-128.ibm.com/developerworks/opensource/library/os-ag-jmsbeans/
I believe it has examples of both j2ee and non j2ee clients.
thanks
david jencks
Thank you very much for your help,
Sami Dalouche
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
|