Re: Build a plugin jar with mative libs on geronimo

2012-01-24 Thread easyl
Geronimo 2.2.1

--
View this message in context: 
http://apache-geronimo.328035.n3.nabble.com/Build-a-plugin-jar-with-native-libs-on-geronimo-tp3681767p3683998.html
Sent from the Users mailing list archive at Nabble.com.


Build a plugin jar with mative libs on geronimo

2012-01-23 Thread easyl
Hi,

I need to develop a Java library which uses JNI with OS dependent native
libraries, and such Java library will be used by some deployed EAR
application on geronimo.

I have tried to directly wrap my EAR application with native libs together
and it did work, however it will lead to a duplicated loaded native library
error if I redeploy the EAR application. Therefore, I decide to develop such
Java native libs as a independent JAR plugin on geronimo. Namely, I will
'install' my Java native lib from geronimo http console Repository Viewer -
Add Archive to Repository and add the 'dependency' in each EAR's deployment
descriptor.

   environment
dependencies
dependency
   
/dependency
   /dependencies
/environment

Is there any example that I can learn from?

My plugin structure looks like the following

mypluin-1.0/
   src/
  + **.java
   3rd-lib/
  + **.jar
   native-lib/
  + **.so **.dll
   META-INF/
  + MANIFEST.MF

Can this plugin jar contain other 3rd party jar files?
Will native lib still work when they are stored in a jar?
Should I take care of MANIFEST?
   



--
View this message in context: 
http://apache-geronimo.328035.n3.nabble.com/Build-a-plugin-jar-with-mative-libs-on-geronimo-tp3681767p3681767.html
Sent from the Users mailing list archive at Nabble.com.


looking for some suggestion for setting AMQ across multiple JVMs

2010-04-30 Thread easyl

Hallo,

At the moment I run multiple applications (EAR with MDB) in a single
Geronimo.

I am trying to run applications on different Geronimo (i.e. on different
JVM) within one physical machine.

server \--- Geronimo1 \--- appA
   \  \--- appB
\
 \--- Geronimo2 --- appC

appA, appB and appC send/receive JMS to/from each other.

 
Can someone give me some suggestion? 

do I need one or more than one broker? should I set a broker for each
Geronimo?
what kind of transport should I use? is simple VM possible?
is there any example of setting up such AMQ?


-- 
View this message in context: 
http://apache-geronimo.328035.n3.nabble.com/looking-for-some-suggestion-for-setting-AMQ-across-multiple-JVMs-tp767393p767393.html
Sent from the Users mailing list archive at Nabble.com.


Using vm:// transport for ActiveMQ5.3 (Geronimo 2.2)

2010-04-22 Thread easyl

I try to add a vm protocal in activemq.xml

transportConnectors
transportConnector name=openwire
uri=tcp://${ServerHostname}:${${ActiveMQPort} + ${PortOffset}} /
transportConnector name=openwireVM
uri=vm://${ServerHostname} /
/transportConnectors

and make a jms resource in deployment

conn:config-property-setting
name=ServerUrlvm://localhost?jms.copyMessageOnSend=falseamp;jms.watchTopicAdvisories=false/conn:config-property-setting


while starting up application, I got such warning...

Module 77/78 My/app.ear/1.0/ear 
   
2010-04-22 11:13:12,352 WARN  [BrokerRegistry] Broker localhost not started
so using DefaultActiveMQBroker instead
2010-04-22 11:13:12,444 WARN  [BrokerRegistry] Broker localhost not started
so using DefaultActiveMQBroker instead
 started in  1.670s

Startup completed in 29.762s seconds
java.lang.IllegalArgumentException: port out of range:-1
at java.net.InetSocketAddress.init(InetSocketAddress.java:118)
at
org.apache.geronimo.activemq.management.ActiveMQTransportConnector.getListenAddress(ActiveMQTransportConnector.java:135)
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
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at
org.apache.geronimo.gbean.runtime.GBeanAttribute.getValue(GBeanAttribute.java:364)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.getAttribute(GBeanInstance.java:677)
at
org.apache.geronimo.kernel.basic.BasicKernel.getAttribute(BasicKernel.java:176)
at
org.apache.geronimo.system.main.StartupMonitorUtil.wrapUp(StartupMonitorUtil.java:108)
at
org.apache.geronimo.system.main.LongStartupMonitor.startupFinished(LongStartupMonitor.java:160)
at
org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:194)
at
org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
at
org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
at
org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)

-- 
View this message in context: 
http://apache-geronimo.328035.n3.nabble.com/Using-vm-transport-for-ActiveMQ5-3-Geronimo-2-2-tp742434p742434.html
Sent from the Users mailing list archive at Nabble.com.


Re: Using vm:// transport for ActiveMQ5.3 (Geronimo 2.2)

2010-04-22 Thread easyl

thanks, it works!
-- 
View this message in context: 
http://apache-geronimo.328035.n3.nabble.com/Using-vm-transport-for-ActiveMQ5-3-Geronimo-2-2-tp742434p742979.html
Sent from the Users mailing list archive at Nabble.com.


finding workaround to solve memory leak problem when creating large numbers of TemporaryQueues (Log4J related)

2010-04-21 Thread easyl

I am using embedded AMQ 4.1.2 (in geronimo 2.1.4)
and find there is a memory problem similar to this:
https://issues.apache.org/activemq/browse/AMQ-1681

I run a system (64bit, 3G mem) after 8 hours, about 100 temp queue was
created for send/reply.
I can find 400~500 MB (and counting) for Log4j instance from memory dump
(jmap).

Is there any workaround so that I don't need to upgrade AMQ, compile, patch
AMQ, and etc.
Can I possible remove those log4j instance for temporary queue at runtime?
-- 
View this message in context: 
http://n3.nabble.com/finding-workaround-to-solve-memory-leak-problem-when-creating-large-numbers-of-TemporaryQueues-Log4J-tp739508p739508.html
Sent from the Users mailing list archive at Nabble.com.


Re: finding workaround to solve memory leak problem when creating large numbers of TemporaryQueues (Log4J related)

2010-04-21 Thread easyl

thanks! 
ok I am really thinking about change to geronimo 2.2.:P
-- 
View this message in context: 
http://n3.nabble.com/finding-workaround-to-solve-memory-leak-problem-when-creating-large-numbers-of-TemporaryQueues-Log4J-tp739508p741079.html
Sent from the Users mailing list archive at Nabble.com.


Re: How to configure ActiveMQ (persistence, flow control etc.)

2010-04-13 Thread easyl

https://issues.apache.org/jira/browse/GERONIMO-3148

Can I use xbean in GA2.1?


kevan wrote:
 
 
 To configure the brokerUri attribute, edit your config.xml file, locate
 the activemq-broker module and add an override of the ActiveMQ GBean.
 Something like:
 
 module name=org.apache.geronimo.configs/activemq-broker/2.1.4/car
 gbean name=ActiveMQ
 attribute
 name=brokerUriyour-activemq-xml-file-path/attribute
 /gbean
 ...
 /module
 
 --kevan
 
-- 
View this message in context: 
http://n3.nabble.com/How-to-configure-ActiveMQ-persistence-flow-control-etc-tp703178p716235.html
Sent from the Users mailing list archive at Nabble.com.


Re: How to configure ActiveMQ (persistence, flow control etc.)

2010-04-08 Thread easyl

Bad...

I try to add this setup in config.xml
module name=org.apache.geronimo.configs/activemq-broker/2.1.4/car 
gbean name=ActiveMQ 
attribute
name=brokerUrixbean:file:/path/to/activemq.xml/attribute 
/gbean 
... 
/module 


By startup, the geronimo throws the Exception 
java.lang.Exception: java.io.IOException: Could load xbean
factory:java.lang.NoClassDefFoundException

I believe it should be could not load


-- 
View this message in context: 
http://n3.nabble.com/How-to-configure-ActiveMQ-persistence-flow-control-etc-tp703178p705366.html
Sent from the Users mailing list archive at Nabble.com.


Re: How to configure ActiveMQ (persistence, flow control etc.)

2010-04-08 Thread easyl

btw, may I ask a general question for setting up EAR Application for JMS?

For example, I have two EAR Application.
Each EAR have a Queue and MDB.
The two EAR Application would send Message to the other.

What I have done is...
1) I leave var/config.xml untouched
2) I declare JMS resource in each EAR geronimo-application.xml (GA2.1)

In EAR a


 conn:resourceadapter
 conn:resourceadapter-instance
 conn:resourceadapter-nameresource_a/conn:resourceadapter-name
 conn:config-property-setting
 name=ServerUrltcp://localhost:61616/conn:config-property-setting
 ...
   /conn:resourceadapter-instance
   conn:outbound-resourceadapter
 conn:connection-definition
  
 conn:connectionfactory-interfacejavax.jms.ConnectionFactory/conn:connectionfactory-interface
   conn:connectiondefinition-instance
 conn:namejms/CF/conn:name
 
   /conn:connectiondefinition-instance
 /conn:connection-definition
   /conn:outbound-resourceadapter
 /conn:resourceadapter
 conn:adminobject
   conn:adminobject-interfacejavax.jms.Queue/conn:adminobject-interface
  
 conn:adminobject-classorg.apache.activemq.command.ActiveMQQueue/conn:adminobject-class
   conn:adminobject-instance

 conn:message-destination-namejms/queue_a/conn:message-destination-name
 conn:config-property-setting
 name=PhysicalNamejms/queue_a/conn:config-property-setting
   /conn:adminobject-instance
   conn:adminobject-instance

 conn:message-destination-namejms/queue_b/conn:message-destination-name
 conn:config-property-setting
 name=PhysicalNamejms/queue_b/conn:config-property-setting
   /conn:adminobject-instance
 /conn:adminobject
 

In EAR b


 conn:resourceadapter
 conn:resourceadapter-instance
 conn:resourceadapter-nameresource_b/conn:resourceadapter-name
 conn:config-property-setting
 name=ServerUrltcp://localhost:61616/conn:config-property-setting
 ...
   /conn:resourceadapter-instance
   conn:outbound-resourceadapter
 conn:connection-definition
  
 conn:connectionfactory-interfacejavax.jms.ConnectionFactory/conn:connectionfactory-interface
   conn:connectiondefinition-instance
 conn:namejms/CF/conn:name
 
   /conn:connectiondefinition-instance
 /conn:connection-definition
   /conn:outbound-resourceadapter
 /conn:resourceadapter
 conn:adminobject
   conn:adminobject-interfacejavax.jms.Queue/conn:adminobject-interface
  
 conn:adminobject-classorg.apache.activemq.command.ActiveMQQueue/conn:adminobject-class
   conn:adminobject-instance

 conn:message-destination-namejms/queue_b/conn:message-destination-name
 conn:config-property-setting
 name=PhysicalNamejms/queue_a/conn:config-property-setting
   /conn:adminobject-instance
   conn:adminobject-instance

 conn:message-destination-namejms/queue_a/conn:message-destination-name
 conn:config-property-setting
 name=PhysicalNamejms/queue_b/conn:config-property-setting
   /conn:adminobject-instance
 /conn:adminobject
 

where should I declare broker? in conf.xml? or in each EAR?
should I declare different resourceadapter in each EAR plan?

thanks


-- 
View this message in context: 
http://n3.nabble.com/How-to-configure-ActiveMQ-persistence-flow-control-etc-tp703178p705528.html
Sent from the Users mailing list archive at Nabble.com.


How to configure ActiveMQ (persistence, flow control etc.)

2010-04-07 Thread easyl

ActiveMQ 4 embedded in Geronimo2.1.

There are many configuration possibilities in AMQ, but many of them should
be set in a XML file.
for example,
http://activemq.apache.org/persistence.html

How can I configure embedded AMQ? or is there any limitation in Geronimo to
configure AMQ?

I know only one method, i.e. ServerUrl in deployment plan

conn:resourceadapter
   conn:resourceadapter-instance
   conn:config-property-setting
 name=ServerUrltcp://localhost:61616?jms.copyMessageOnSend=falseamp;jms.watchTopicAdvisories=falseamp;socket.tcpNoDelay=trueamp;wireFormat.tcpNoDelayEnabled=true/conn:config-property-setting
   ...
   
 

or here? how?
GERONIMO/var/config/config.xml

I cannot find any file to configure under
GERONIMO/var/activemq


does this article still valid for GERONIMO 2.1?
http://www.ibm.com/developerworks/java/library/os-ag-jmsbeans/

-- 
View this message in context: 
http://n3.nabble.com/How-to-configure-ActiveMQ-persistence-flow-control-etc-tp703178p703178.html
Sent from the Users mailing list archive at Nabble.com.


Re: How to configure ActiveMQ (persistence, flow control etc.)

2010-04-07 Thread easyl

that helps me really really a lot!!! thanks!!!

but, Why can't I find such information on Geronimo doc?
-- 
View this message in context: 
http://n3.nabble.com/How-to-configure-ActiveMQ-persistence-flow-control-etc-tp703178p704000.html
Sent from the Users mailing list archive at Nabble.com.


Timer or Scheduler service in Geronimo(JEE)

2010-03-29 Thread easyl

hallo,

How can I build a Timer (or Scheduler) executing some task recurrently and
running in Geronimo(2.1.3)? is there any doc or example?

thanks :-)
-- 
View this message in context: 
http://n3.nabble.com/Timer-or-Scheduler-service-in-Geronimo-JEE-tp683174p683174.html
Sent from the Users mailing list archive at Nabble.com.


Re: sudden NullPointerException from ActiveMQSessionExecutor.wakeup

2010-03-29 Thread easyl

hallo kevan,

what do you mean close() exactly?
I just use following send/reply pattern.

however the consumer (receiver) may do a long running tasks.
(consumers are slower than producer.)


 
 connection = factory.createQueueConnection();
 connection.start();
 
 session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
 sender = session.createSender(requestQueue);
 
 replyQueue = session.createTemporaryQueue();
 
 jmsRequestMessage = session.createTextMessage();
 
 sender.send(jmsRequestMessage, DeliveryMode.NON_PERSISTENT,
 Message.DEFAULT_PRIORITY, timeToLive);
 
 receiver = session.createReceiver(replyQueue);
 jmsReplyMessage = receiver.receive();
 
 connection.close();
 
-- 
View this message in context: 
http://n3.nabble.com/sudden-NullPointerException-from-ActiveMQSessionExecutor-wakeup-tp676485p683291.html
Sent from the Users mailing list archive at Nabble.com.


Re: sudden NullPointerException from ActiveMQSessionExecutor.wakeup

2010-03-29 Thread easyl


kevan wrote:
 
 It sounded like you can also avoid using asyncDispatch=false. If you have
 slow consumers, this might be a problem for you...
 
yes, I set asyncDispatch=false with vm:// protocol, and the NPE happens less
possible,,,but still happens.
Now I change to use tcp:// protocol and run test, till now the problem did
not happen yet.
Is that only VMTransport problem?


kevan wrote:
 
 Would you be able to build a patched version of ActiveMQ? Would also like
 to know if that fixes your problem...
 
I would like to, but actually I am using IBM WASCE (based on Geronimo) and
modifying server side code is almost not allowed (not technically). I would
only try to find a workaround.

btw. i created a ticket here
https://issues.apache.org/activemq/browse/AMQ-2679

really thanks for your help :)
-- 
View this message in context: 
http://n3.nabble.com/sudden-NullPointerException-from-ActiveMQSessionExecutor-wakeup-tp676485p683549.html
Sent from the Users mailing list archive at Nabble.com.


Re: sudden NullPointerException from ActiveMQSessionExecutor.wakeup

2010-03-27 Thread easyl

however with setting jms.asyncDispatch=false I did not get the NPE yet
http://activemq.apache.org/consumer-dispatch-async.html

-- 
View this message in context: 
http://n3.nabble.com/sudden-NullPointerException-from-ActiveMQSessionExecutor-wakeup-tp676485p680662.html
Sent from the Users mailing list archive at Nabble.com.


sudden NullPointerException from ActiveMQSessionExecutor.wakeup

2010-03-26 Thread easyl

AMQ 4.1.2 embedded in Geronimo 2.1.3

setup in deployment plan with 
config-property-setting name=ServerUrl
vm://localhost?async=trueamp;jms.asyncDispatch=falseamp;jms.copyMessageOnSend=falseamp;jms.watchTopicAdvisories=false
/config-property-setting

there are 6 different Queues listened by MDBs which may send messages to
each other (almost with sync send/reply).

When the message traffic get huge, I would got such NPE

Exception in thread VMTransport java.lang.NullPointerException
at
org.apache.activemq.ActiveMQSessionExecutor.wakeup(ActiveMQSessionExecutor.java:76)
at
org.apache.activemq.ActiveMQSessionExecutor.execute(ActiveMQSessionExecutor.java:61)
at 
org.apache.activemq.ActiveMQSession.dispatch(ActiveMQSession.java:1344)
at
org.apache.activemq.ActiveMQConnection.onCommand(ActiveMQConnection.java:1485)
at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:95)
at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65)
at
org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:201)
at
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:120)
at
org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
at
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:47)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:619)


then some messages will be stalled in queue (checked with jconsole).

what does the NPE mean? 
how can I avoid the problem?

-- 
View this message in context: 
http://n3.nabble.com/sudden-NullPointerException-from-ActiveMQSessionExecutor-wakeup-tp676485p676485.html
Sent from the Users mailing list archive at Nabble.com.


Re: ActiveMQ questions

2009-11-27 Thread easyl

thanks,

But I cannot find activemq.xml
under Geronimo_HOME/var/activemq/conf

I would still give it a try..

btw, should the activemq.xml look like this
http://activemq.apache.org/configuring-brokers.html



RunHua Chi wrote:
 
 Go to Geronimo_HOME/var/activemq/conf directory and update activemq.xml
 file according to your needs. You can have the same experiences as you can
 do for a standalone ActiveMQ server.
 If you need to update ActiveMQ default port in Geronimo, you may update
 the
 value of ActiveMQPort in /var/config/config-substitutions.properties file.
 
 Hope this helps.
 
 Jeff C
 
 
 
 On Tue, Nov 24, 2009 at 11:09 PM, easyl easy@gmail.com wrote:
 

 I use geronimo 2.1.2.
 It seems that the only way to configurate embedded AMQ is through
 ServerUrl.

 For example:
 config-property-setting

 name=ServerUrltcp://localhost:61616?jms.copyMessageOnSend=falseamp;jms.watchTopicAdvisories=falseamp;socket.tcpNoDelay=trueamp;wireFormat.tcpNoDelayEnabled=true/config-property-setting


 Now I want to completely disable advisory message.
 See: http://activemq.apache.org/advisory-message.html
 The configuration is through XML config data.
  broker advisorySupport=false...

 How can I do that in geronimo?
 I try to follow the instructions from
 http://activemq.apache.org/resource-adapter-properties.html

 To add this in deploy plan...
 config-property-setting
 name=BrokerXmlConfigxbean:config.xml/config-property-setting

 But geronimo can not handle xbean schema.
 ...did not start because Failed to startup an embedded broker:
 xbean:config.xml, due to: java.io.IOException: Could load xbean
 factory:java.lang.NoClassDefFoundError:
 org/springframework/beans/BeansException





 --
 View this message in context:
 http://old.nabble.com/ActiveMQ-questions-tp6326283s134p26497537.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


 
 

-- 
View this message in context: 
http://old.nabble.com/ActiveMQ-questions-tp6326283s134p26540192.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: ActiveMQ questions

2009-11-24 Thread easyl

I use geronimo 2.1.2.
It seems that the only way to configurate embedded AMQ is through
ServerUrl.

For example:
config-property-setting
name=ServerUrltcp://localhost:61616?jms.copyMessageOnSend=falseamp;jms.watchTopicAdvisories=falseamp;socket.tcpNoDelay=trueamp;wireFormat.tcpNoDelayEnabled=true/config-property-setting


Now I want to completely disable advisory message. 
See: http://activemq.apache.org/advisory-message.html
The configuration is through XML config data.
  broker advisorySupport=false...

How can I do that in geronimo? 
I try to follow the instructions from
http://activemq.apache.org/resource-adapter-properties.html

To add this in deploy plan...
config-property-setting
name=BrokerXmlConfigxbean:config.xml/config-property-setting

But geronimo can not handle xbean schema.
...did not start because Failed to startup an embedded broker:
xbean:config.xml, due to: java.io.IOException: Could load xbean
factory:java.lang.NoClassDefFoundError:
org/springframework/beans/BeansException





-- 
View this message in context: 
http://old.nabble.com/ActiveMQ-questions-tp6326283s134p26497537.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



[Geronimo 2.1] add a Queue JNDI ref in ejb-jar.xml? sending JMS from an EJB/MDB

2009-10-23 Thread easyl

The same post on stackoverflow but with better code layout
http://stackoverflow.com/questions/1612960/geronimo-2-1-add-a-queue-jndi-ref-in-ejb-jar-xml-sending-jms-msg-in-a-ejb-mdb



hi,

I have an EAR application which contains an MDB and a WAR.

In this EAR application I would send a message into an another Queue from
other EAR application. Say jms/anotherQueue

If the message sending happens in web context, it works. I have such setup
in web.xml

message-destination-ref

message-destination-ref-namejms/anotherQueue/message-destination-ref-name
 message-destination-typejavax.jms.Queue/message-destination-type
 message-destination-usageProduces/message-destination-usage
 message-destination-linkjms/anotherQueue/message-destination-link
/message-destination-ref

But if the message sending occurs in EJB (MDB here) context, I will get a
JNDI name lookup failure.

javax.naming.NameNotFoundException: anotherQueue

my ejb-jar.xml

?xml version=1.0 encoding=UTF-8?
ejb-jar version=3.0 xmlns=http://java.sun.com/xml/ns/javaee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd;

 enterprise-beans

  message-driven
   ejb-namejms/myMDB/ejb-name
   ejb-classcom.my.MDBImplement/ejb-class
   messaging-typejavax.jms.MessageListener/messaging-type
   transaction-typeContainer/transaction-type
   activation-config
activation-config-property

activation-config-property-namedestination/activation-config-property-name

activation-config-property-valuejms/myQueue/activation-config-property-value
/activation-config-property
activation-config-property

activation-config-property-namedestinationType/activation-config-property-name

activation-config-property-valuejavax.jms.Queue/activation-config-property-value
/activation-config-property
   /activation-config
   resource-ref
res-ref-namejms/myCF/res-ref-name
res-typejavax.jms.QueueConnectionFactory/res-type
res-authContainer/res-auth
res-sharing-scopeShareable/res-sharing-scope
   /resource-ref
  /message-driven
 /enterprise-beans

 assembly-descriptor
  container-transaction
   method
ejb-namejms/myMDB/ejb-name
method-nameonMessage/method-name
method-params
 method-paramjavax.jms.Message/method-param
/method-params
   /method
   trans-attributeNotSupported/trans-attribute
  /container-transaction
 /assembly-descriptor


/ejb-jar

the openejb.jar is

?xml version=1.0 encoding=UTF-8 standalone=no?
ejb:openejb-jar
 xmlns:app=http://geronimo.apache.org/xml/ns/j2ee/application-2.0;

xmlns:client=http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0;
 xmlns:conn=http://geronimo.apache.org/xml/ns/j2ee/connector-1.2;
 xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.2;
xmlns:ejb=http://openejb.apache.org/xml/ns/openejb-jar-2.2;
 xmlns:name=http://geronimo.apache.org/xml/ns/naming-1.2;
xmlns:pers=http://java.sun.com/xml/ns/persistence;
 xmlns:pkgen=http://openejb.apache.org/xml/ns/pkgen-2.1;
xmlns:sec=http://geronimo.apache.org/xml/ns/security-2.0;
 xmlns:web=http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1;
 dep:environment
  dep:moduleId
   dep:groupIdmyGroup/dep:groupId
   dep:artifactIdimyMDB/dep:artifactId
   dep:version1.0/dep:version
   dep:typeejb/dep:type
  /dep:moduleId
  dep:dependencies
   dep:dependency
dep:groupIdorg.apache.geronimo.configs/dep:groupId
dep:artifactIdactivemq-broker/dep:artifactId
dep:typecar/dep:type
   /dep:dependency
  /dep:dependencies
 /dep:environment
 ejb:enterprise-beans
  ejb:message-driven
   ejb:ejb-namejms/myMDB/ejb:ejb-name
   ejb:resource-adapter
ejb:resource-linkmyJmsResource/ejb:resource-link
   /ejb:resource-adapter
  /ejb:message-driven
 /ejb:enterprise-beans
/ejb:openejb-jar

I define myJmsResource in geronimo-application.xml

?xml version=1.0 encoding=UTF-8 standalone=no?
app:application
 xmlns:app=http://geronimo.apache.org/xml/ns/j2ee/application-2.0;

xmlns:client=http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0;
 xmlns:conn=http://geronimo.apache.org/xml/ns/j2ee/connector-1.2;
 xmlns:dep=http://geronimo.apache.org/xml/ns/deployment-1.2;
xmlns:ejb=http://openejb.apache.org/xml/ns/openejb-jar-2.2;
 xmlns:nam=http://geronimo.apache.org/xml/ns/naming-1.2;
xmlns:pers=http://java.sun.com/xml/ns/persistence;
 xmlns:pkgen=http://openejb.apache.org/xml/ns/pkgen-2.1;
xmlns:sec=http://geronimo.apache.org/xml/ns/security-2.0;
 xmlns:web=http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1;
 dep:environment
  dep:moduleId
   dep:groupIdmyGroup/dep:groupId
   dep:artifactIdmyEAR/dep:artifactId
   dep:version1.0/dep:version
   dep:typeear/dep:type
  /dep:moduleId
 /dep:environment
 app:module
  app:connectorgeronimo-activemq-ra-2.1.4.rar/app:connector
  conn:connector
   dep:environment
dep:moduleId
 dep:groupIdmyGroup/dep:groupId
 dep:artifactIdmyJmsResource/dep:artifactId
 dep:version1.0/dep:version
 

Re: [Geronimo 2.1] add a Queue JNDI ref in ejb-jar.xml? sending JMS from an EJB/MDB

2009-10-23 Thread easyl

OK, I found a quick fix

in ejb-jar.xml

enterprise-beans

message-driven
ejb-namejms/myMDB/ejb-name
.  
!--  referred queue --
resource-env-ref
   
resource-env-ref-namejms/anotherQueue/resource-env-ref-name
   
resource-env-ref-typejavax.jms.Queue/resource-env-ref-type
/resource-env-ref

/message-driven
/enterprise-beans

I must admit, I still don't understand how to write a correct deployment
plan. I just goggle, copy, paste.and mix up those deployment plans.

-- 
View this message in context: 
http://www.nabble.com/-Geronimo-2.1--add-a-Queue-JNDI-ref-in-ejb-jar.xml--sending-JMS-from-an-EJB-MDB-tp26025166s134p26026848.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.