Hello Craig,

Thanks for help. I already fixed the problem using 'resource-ref'.

About the use of 'resource-env-ref': I tried to use it because the
description of this tag at servlet 2.3 reference says:
<!--
The resource-env-ref element contains a declaration of a web
application's reference to an administered object associated with a.... -->

Sice I'm using JMS (Java Message System) the word 'administered object' has
a special importance to me. So I tried to put a Queue object at web.xml to
be retrieved using JNDI later in code. Also, the example in servlet 2.3
specification shows exactly what I'm trying to do:

<resource-env-ref>
        <resource-env-ref-name>jms/StockQueue</resource-env-ref-name>
        <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>

By other hand the 'resource-ref' specification says:
<!-- .... It consists of an
optional description, the resource manager connection factory
reference name, ... -->

In this case the words 'connection factory' have special importance to use
with JMS.

So, I thought about using the resource-env-ref with Queue and resource-ref
with ConnectionFactory. But, didn't work. Thus, I tried to use your solution
and works fine. It make sence because both Queue and ConnectionFactory are
administerd objects in terms of JMS. The lookup using JNDI works fine for
both, but I have not tried to use the objects in code yet. I think that
there will be no problems (I hope).

Marcelo

-----Mensagem original-----
De: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Enviada em: terca-feira, 11 de fevereiro de 2003 19:19
Para: Struts Users Mailing List
Assunto: Re: RES: [OT] Resin 2.1.6 doesn't like resource-env-ref




On Tue, 11 Feb 2003, Marcelo Aita Riss wrote:
> Date: Tue, 11 Feb 2003 19:19:08 -0300
> From: Marcelo Aita Riss <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RES: [OT] Resin 2.1.6 doesn't like resource-env-ref
>
> Hi Sri,
>
> I'm having the same trouble here. Seems to me that it's a resin problem. I
> have tried to search some help to fix this problem at www.caucho.com, but
> have found nothing until now. You are right about web-app_2_3.dtd, but I
> have a web-app_2_2.dtd copy that do not have any reference to a
> 'resource-env-ref'. I think that resin 2.1.6 use 2_2 to validate web.xml.
> The servlet 2.3 specification file (a pdf file) shows both versions (2.2
and
> 2.3). If you look at version 2.2 there is no reference to
'resource-env-ref'
> too. I have no solution to fix this yet. If you find a solution, let me to
> know.
>

The <resource-env-ref> element was indeed added in Servlet 2.3, so any 2.2
container isn't going to recognize it.

You don't say what kind of a resource you are trying to create a reference
for, but can't you use a <resource-ref> instead?  That is available in
2.2 as well as 2.3.


> I hope it helps,
>
> Marcelo

Craig

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





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

Reply via email to