On 06/12/2009 17:10, ahmed kasim wrote:
Hi

thanks a lot for your response and valuable inputs.

I want to avoid looking of that classes during server startup, my requirement 
is, specified classes/properties should lookup only when my war file deployed.

If the app is not deployed before start up, then it gets deployed at the end of start up.

Any classes (and the classes they are dependant on) defined in web.xml as Servlets, for example, will also be loaded.


Why do you have such a requirement?


p




  many thanks,
Kasim





________________________________
From: Jorge Medina<cerebrotecnolog...@gmail.com>
To: Tomcat Users List<users@tomcat.apache.org>
Sent: Sat, December 5, 2009 8:03:30 PM
Subject: Re: tomcat server start up without looking dependency jars

hi Ahmed,
     JAR files are not "loaded" by Tomcat. A jar file is just a container of
classes, the classes are loaded by the JVM when the code makes reference to
them.
     If you specify a<Resource>  on your context.xml, then Tomcat will look
for those classes (the driverClassName), but that does not mean that a
connection to the database is established at that point in time. It only
means that the driver has been loaded.
     Your application is responsible to ask for a connection whenever it
wishes.


On Sat, Dec 5, 2009 at 7:17 AM, ahmed kasim<callka...@yahoo.com>  wrote:

Hi,

I have few jars which need to get loaded only when the war file is getting
loaded or when the request comes, to be more clear I have some jar which is
having connection to DB, if I specify in my context.xml file it is getting
loaded when the server getting started up initially, so I want to avoid this
and make it when my war file gets loaded the db connection should get
loaded.

<Resource name="jdbc/DB2DS" auth="Container" type="javax.sql.DataSource"
driverClassName="com.ibm.db2.jcc.DB2Driver"
url="jdbc:db2://localhost:50000/SPARK" username="db2admin"
password="d...@dmin" maxActive="20" maxIdle="10" maxWait="-1"/>

I have three jar file specified for Resource , if i place jar file it is
getting loaded and server starts up looking for connection with db.

How can I avoid server starting time look up and make it available only
when I deploy the war file.

  many thanks,
Kasim









---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to