You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Renato Romano <r....@set-network.com> on 2003/06/06 09:53:00 UTC

Tomcat and JNDI - Basic Question

In the tomcat documentation it is said that to configure a new JNDI
resource you shoul put a Resource entry in the Context portion of my
app, and a following ResourceParams, indicating the java class name of
the factory (the class that must implement ObjectFactory). This seems
quite correct: in order to build an object, I need a Factory!! But I
noticed it works fine even if the ResourceParams is not present ?? The
conclusion is: I'm surely missing something !! How can Tomcat know how
to build my object if I don't give the name of the factory class ???


	<Context path="/dg3s" docBase="dg3s" reloadable="true">
		<Resource name="myJndiName" type="com.blabla.MyType"/>
		<!-- The following is not useful ?!!!!
		<ResourceParams name="myJndiName">
			<parameter>
				<name>factory</name>
				<value>com.blabla.MyTypeFactory</value>
			</parameter>
		</ResourceParams>
		-->
	</Context>

Any Help Appreciated!!
Renato

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat and JNDI - Basic Question

Posted by Yoav Shapira <yo...@yahoo.com>.
Howdy,
It might be that the fallback behavior is to use a public no-args constructor,
ala JavaBeans.

Yoav Shapira

--- Renato Romano <r....@set-network.com> wrote:
> In the tomcat documentation it is said that to configure a new JNDI
> resource you should put a Resource entry in the Context portion of my
> app, and a following ResourceParams, indicating the java class name of
> the factory (the class that must implement ObjectFactory). This seems
> quite correct: in order to build an object, I need a Factory!! But I
> noticed it works fine even if the ResourceParams is not present ?? The
> conclusion is: I'm surely missing something !! How can Tomcat know how
> to build my object if I don't give the name of the factory class ???
> 
> 
> 	<Context path="/dg3s" docBase="dg3s" reloadable="true">
> 		<Resource name="myJndiName" type="com.blabla.MyType"/>
> 		<!-- The following is not useful ?!!!!
> 		<ResourceParams name="myJndiName">
> 			<parameter>
> 				<name>factory</name>
> 				<value>com.blabla.MyTypeFactory</value>
> 			</parameter>
> 		</ResourceParams>
> 		-->
> 	</Context>
> 
> Any Help Appreciated!!
> Renato
> 
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
> 
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


=====
Yoav Shapira
yoavs@computer.org

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Tomcat and JNDI - Basic Question

Posted by Renato Romano <r....@set-network.com>.
In the tomcat documentation it is said that to configure a new JNDI
resource you should put a Resource entry in the Context portion of my
app, and a following ResourceParams, indicating the java class name of
the factory (the class that must implement ObjectFactory). This seems
quite correct: in order to build an object, I need a Factory!! But I
noticed it works fine even if the ResourceParams is not present ?? The
conclusion is: I'm surely missing something !! How can Tomcat know how
to build my object if I don't give the name of the factory class ???


	<Context path="/dg3s" docBase="dg3s" reloadable="true">
		<Resource name="myJndiName" type="com.blabla.MyType"/>
		<!-- The following is not useful ?!!!!
		<ResourceParams name="myJndiName">
			<parameter>
				<name>factory</name>
				<value>com.blabla.MyTypeFactory</value>
			</parameter>
		</ResourceParams>
		-->
	</Context>

Any Help Appreciated!!
Renato

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org