Extending the factory class is a solution. But it is less user friendly 
for the web application developper. I mean he has to interest himself to 
the OpenJms API source code. And with OpenJms it is possible, because it 
is opensource, but in the case of a proprietary API code... it is a bit 
more tricky (decompilation of code). Then if the application developper 
wants to change from tomcat to an another web application server, he has 
to modify his code.

In my opinion, invoking a resource is tomcat work.
A possible solution would be to add the name attribute in the obj object 
during the call to factory.getObjectInstance(obj, name, 
nameCtx, environment) in org.apache.naming.factory.ResourceFactory.

But we break the convention which is jms names has to begin with "jms/" in 
the context (I'm sorry, it's a convention and not a standard... just like 
ejb names has to begin with "ejb/" etc...)

Cheers'

-- 

Fabien Carrion

()  Campagne du ruban ASCII -- Contre les mails en html
/\  contre les pieces-jointes Microsoft



Remy Maucherat <[EMAIL PROTECTED]> 
26/04/2006 04:53 p.m.
Por favor, responda a
"Tomcat Developers List" <dev@tomcat.apache.org>


Para
Tomcat Developers List <dev@tomcat.apache.org>
cc

Asunto
Re: Resource declaration.






[EMAIL PROTECTED] wrote:
> Hi the list,
> 
> Well I complete a the Jndi-JMS-howto on my website, with the declaration 

> of some resources for the openjms server. And I had a problem.
> 
> To declare a Queue on a OpenJms server, I have to do something like this 
:
> 
> <Resource name="jms/myQueue" auth="Container"
>                        type="org.exolab.jms.client.JmsQueue"
>                       description="my Queue"
>  factory="org.exolab.jms.client.JmsDestinationFactory"
>                       name="queue1" persistent="true" />
> 
> And it doesn't work, obviously :) The problem is the name attribute. It 
is 
> used by tomcat as the JNDI name in the tomcat Context, and by OpenJms
> as the Queue name on the server.

The workaround is IMO to extend the object factory, and use a queueName 
setter, or something. Be creative ;)

Rémy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-----------------------------------------
La información transmitida mediante el presente correo es para
la(s) persona(s) cuya dirección aparece al calce, la información
contenida es estrictamente confidencial y para lectura exclusiva de
la (s) persona (s) mencionada(s) por lo que esta prohida la
reproducción, distribución o copia del presente. Si usted ha
recibido este correo por error, favor de contactar con el remitente
y eliminarlo de todas las charolas de su correo. The information
transmitted by this e-mail is intended only for the person or
entity to which it is addressed and may contain confidential and/or
privileged material. If the reader of this message is not the
intended recipient, you are hereby notified that you have received
this message by error and that any review, dissemination,
distribution or copying of this message including any attachments
is strictly prohibited. If you received this by error, please
contact the sender and delete the information from any computer.

Reply via email to