You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Sylvain Pelletier <sy...@gmail.com> on 2005/07/09 13:42:11 UTC

I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml

Hi,
 First I'm new to the sqlmap's world!
 I'm using sqlmap without using the dao manager of ibastis.
I work under myeclipse and when I modify the content of SQL MAP xml files 
(to add a select statement for example), the changes are not do in 
real-time. 
I'm actually restarting tomcat each times I changes SQL MAP xml files and 
it's a quite boring !!
 Thanks
 Sylvain

Re: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml

Posted by Clinton Begin <cl...@gmail.com>.
That's currently the way it works (and it's preferred by most). There's 
already a feature request to support optional runtime reloading.

Clinton

On 7/9/05, Sylvain Pelletier <sy...@gmail.com> wrote:
> 
> Hi,
>  First I'm new to the sqlmap's world!
>  I'm using sqlmap without using the dao manager of ibastis.
> I work under myeclipse and when I modify the content of SQL MAP xml files 
> (to add a select statement for example), the changes are not do in 
> real-time. 
> I'm actually restarting tomcat each times I changes SQL MAP xml files and 
> it's a quite boring !!
>  Thanks
>  Sylvain
>

Re: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml

Posted by Ed Griebel <ed...@gmail.com>.
If you haven't already, try creating a WAR, and then put the xml files
in WEB-INF/classes. Then, you just have to build and deploy the app,
which since there's no code changes it should go quicker than stopping
and starting tomcat.

-ed

On 7/9/05, Sylvain Pelletier <sy...@gmail.com> wrote:
> Hi, 
>   
> First I'm new to the sqlmap's world! 
>   
> I'm using sqlmap without using the dao manager of ibastis. 
> I work under myeclipse and when I modify the content of SQL MAP xml files
> (to add a select statement for example), the changes are not do in
> real-time. 
> I'm actually restarting tomcat each times I changes  SQL MAP xml files and
> it's a quite boring !! 
>   
> Thanks 
>   
> Sylvain 
>

Re: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml

Posted by Sylvain Pelletier <sy...@gmail.com>.
Thanks for all the replies !
In fact, it seems that my problem was trivial.

I read this in the developer guide:

I have setup my SQL MAP XML files like this :
<!-- URL RESOURCES -->
<sqlMap url="file:///c:/config/Customer.xml " />
<sqlMap url="file:///c:/config/Account.xml " />
<sqlMap url="file:///c:/config/Product.xml" />

instead of :
<!-- CLASSPATH RESOURCES -->
<sqlMap resource="com/ibatis/examples/sql/Customer.xml" />
<sqlMap resource="com/ibatis/examples/sql/Account.xml" />
<sqlMap resource="com/ibatis/examples/sql/Product.xml" />

and it's works fine, I can add, remove ... statements to the xml files
without reload tomcat.

Bye


On 7/12/05, Ron Grabowski <ro...@yahoo.com> wrote:
> I remember experiencing a similiar problem with Eclipse and Tomcat. It
> seemed that whenever I deployed, Tomcat wouldn't recognize that files
> had changed and it would never reload the application. I recall being
> frustrated when I made small changes to sqlMap xml files and I had to
> completely shutdown and restart Tomcat. I resolved the issue by
> building my own Ant script to deploy my project. The code below is
> several months old and I am no longer working on the project. I used
> the code with Eclipse 2 then upgraded to Eclipse 3. That may have been
> the MyEclipse version. I remember going through a big IDE upgrade at
> some point. Larry and Brandon helped out answering questions with my
> iBATIS 1.x to 2.x upgrade too!
> 
> This code was used against a Tomcat 5 installation, not 5.5:
> 
> <!--
> references to Java classes that enable ant to
> interact with Tomcat5; Elcipse v3.x thinks the links
> below are errors (yellow underlining) while v2.x
> does not; the project should build and installs as expected
> despite these warnings;
> -->
> <taskdef name="install"
> classname="org.apache.catalina.ant.InstallTask">
> <classpath>
> <path location="${tomcat.home}/server/lib/catalina-ant.jar"/>
> </classpath>
> </taskdef>
> <taskdef name="list" classname="org.apache.catalina.ant.ListTask"/>
> <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
> <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/>
> 
> <target name="removeAndInstall" depends="warfile,remove,install">
> <echo message="Finished calling [removeAndInstall] target." />
> </target>
> 
> <target name="remove">
> <!-- snip -->
> </target>
> 
> <target name="warfile">
> <!-- snip -->
> </target>
> 
> <target name="install" depends="warfile" description="Install
> application to servlet container">
> <install
> url="${manager.url}"
> username="${manager.username}"
> password="${manager.password}"
> path="${app.path}"
> war="file://${build.home}/${app.name}.war"/>
> <delete dir="${build.home}" failonerror="true"/>
> </target>
> 
> --- "Albert L. Sapp" <as...@uiuc.edu> wrote:
> 
> > We do a redeploy all the time from Eclipse to Tomcat.  Occasionally,
> > we
> > have to restart Tomcat as it seems to stop responding to application
> > requests.  We haven't figured this out yet, but this mainly occurs on
> > the
> > Tomcat servers run on our development PCs and not on the primary and
> > backup
> > servers.
> >
> > Al
> >
> > At 03:41 AM 7/12/2005, you wrote:
> > >Can't you just use manager included in Tomcat,
> > >
> > >you can reach it at /manager/html/list and then just reload
> > application ?
> > >I do that:)
> > >
> > >Darek
> > >
> > >----- Original Message -----
> > >From: <ma...@utoronto.ca>Zarar Siddiqi
> > >To: <ma...@ibatis.apache.org>user-java@ibatis.apache.org
> > ;
> > ><ma...@gmail.com>Sylvain Pelletier
> > >Sent: Monday, July 11, 2005 7:20 PM
> > >Subject: Re: I must restart Tomcat when I modify some SQL Map XML
> > files in
> > >SQLMapConfig.xml
> > >
> > >Instead of restarting Tomcat, perhaps you should setup your
> > application so
> > >that you just have to reload/redeploy the context for the startup
> > >listeners to kick in.  Restarting tomcat can be slow while reploying
> > works
> > >like a breeze.  I'm using Intellij and you can run Tomcat within it.
> > I'm
> > >sure Eclipse has the same feature.
> > >
> > >Zarar
> > >----- Original Message -----
> > >From: <ma...@gmail.com>Sylvain Pelletier
> > >To: <ma...@ibatis.apache.org>user-java@ibatis.apache.org
> > >Sent: Saturday, July 09, 2005 7:42 AM
> > >Subject: I must restart Tomcat when I modify some SQL Map XML files
> > in
> > >SQLMapConfig.xml
> > >
> > >Hi,
> > >
> > >First I'm new to the sqlmap's world!
> > >
> > >I'm using sqlmap without using the dao manager of ibastis.
> > >I work under myeclipse and when I modify the content of SQL MAP xml
> > files
> > >(to add a select statement for example), the changes are not do in
> > real-time.
> > >I'm actually restarting tomcat each times I changes  SQL MAP xml
> > files and
> > >it's a quite boring !!
> > >
> > >Thanks
> > >
> > >Sylvain
> > >
> >
> 
>

Re: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml

Posted by Ron Grabowski <ro...@yahoo.com>.
I remember experiencing a similiar problem with Eclipse and Tomcat. It
seemed that whenever I deployed, Tomcat wouldn't recognize that files
had changed and it would never reload the application. I recall being
frustrated when I made small changes to sqlMap xml files and I had to
completely shutdown and restart Tomcat. I resolved the issue by
building my own Ant script to deploy my project. The code below is
several months old and I am no longer working on the project. I used
the code with Eclipse 2 then upgraded to Eclipse 3. That may have been
the MyEclipse version. I remember going through a big IDE upgrade at
some point. Larry and Brandon helped out answering questions with my
iBATIS 1.x to 2.x upgrade too! 

This code was used against a Tomcat 5 installation, not 5.5:

<!--
 references to Java classes that enable ant to 
 interact with Tomcat5; Elcipse v3.x thinks the links
 below are errors (yellow underlining) while v2.x
 does not; the project should build and installs as expected
 despite these warnings;
-->
<taskdef name="install"
classname="org.apache.catalina.ant.InstallTask">
 <classpath>
  <path location="${tomcat.home}/server/lib/catalina-ant.jar"/>
 </classpath>
</taskdef>	
<taskdef name="list" classname="org.apache.catalina.ant.ListTask"/>
<taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
<taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/>

<target name="removeAndInstall" depends="warfile,remove,install">
 <echo message="Finished calling [removeAndInstall] target." />
</target>

<target name="remove">
 <!-- snip -->
</target>

<target name="warfile">
 <!-- snip -->
</target>

<target name="install" depends="warfile" description="Install
application to servlet container">
 <install
  url="${manager.url}"
  username="${manager.username}"
  password="${manager.password}"
  path="${app.path}"
  war="file://${build.home}/${app.name}.war"/>
 <delete dir="${build.home}" failonerror="true"/>
</target>

--- "Albert L. Sapp" <as...@uiuc.edu> wrote:

> We do a redeploy all the time from Eclipse to Tomcat.  Occasionally,
> we 
> have to restart Tomcat as it seems to stop responding to application 
> requests.  We haven't figured this out yet, but this mainly occurs on
> the 
> Tomcat servers run on our development PCs and not on the primary and
> backup 
> servers.
> 
> Al
> 
> At 03:41 AM 7/12/2005, you wrote:
> >Can't you just use manager included in Tomcat,
> >
> >you can reach it at /manager/html/list and then just reload
> application ? 
> >I do that:)
> >
> >Darek
> >
> >----- Original Message -----
> >From: <ma...@utoronto.ca>Zarar Siddiqi
> >To: <ma...@ibatis.apache.org>user-java@ibatis.apache.org
> ; 
> ><ma...@gmail.com>Sylvain Pelletier
> >Sent: Monday, July 11, 2005 7:20 PM
> >Subject: Re: I must restart Tomcat when I modify some SQL Map XML
> files in 
> >SQLMapConfig.xml
> >
> >Instead of restarting Tomcat, perhaps you should setup your
> application so 
> >that you just have to reload/redeploy the context for the startup 
> >listeners to kick in.  Restarting tomcat can be slow while reploying
> works 
> >like a breeze.  I'm using Intellij and you can run Tomcat within it.
> I'm 
> >sure Eclipse has the same feature.
> >
> >Zarar
> >----- Original Message -----
> >From: <ma...@gmail.com>Sylvain Pelletier
> >To: <ma...@ibatis.apache.org>user-java@ibatis.apache.org
> >Sent: Saturday, July 09, 2005 7:42 AM
> >Subject: I must restart Tomcat when I modify some SQL Map XML files
> in 
> >SQLMapConfig.xml
> >
> >Hi,
> >
> >First I'm new to the sqlmap's world!
> >
> >I'm using sqlmap without using the dao manager of ibastis.
> >I work under myeclipse and when I modify the content of SQL MAP xml
> files 
> >(to add a select statement for example), the changes are not do in
> real-time.
> >I'm actually restarting tomcat each times I changes  SQL MAP xml
> files and 
> >it's a quite boring !!
> >
> >Thanks
> >
> >Sylvain
> >
> 


Re: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml

Posted by "Albert L. Sapp" <as...@uiuc.edu>.
We do a redeploy all the time from Eclipse to Tomcat.  Occasionally, we 
have to restart Tomcat as it seems to stop responding to application 
requests.  We haven't figured this out yet, but this mainly occurs on the 
Tomcat servers run on our development PCs and not on the primary and backup 
servers.

Al

At 03:41 AM 7/12/2005, you wrote:
>Can't you just use manager included in Tomcat,
>
>you can reach it at /manager/html/list and then just reload application ? 
>I do that:)
>
>Darek
>
>----- Original Message -----
>From: <ma...@utoronto.ca>Zarar Siddiqi
>To: <ma...@ibatis.apache.org>user-java@ibatis.apache.org ; 
><ma...@gmail.com>Sylvain Pelletier
>Sent: Monday, July 11, 2005 7:20 PM
>Subject: Re: I must restart Tomcat when I modify some SQL Map XML files in 
>SQLMapConfig.xml
>
>Instead of restarting Tomcat, perhaps you should setup your application so 
>that you just have to reload/redeploy the context for the startup 
>listeners to kick in.  Restarting tomcat can be slow while reploying works 
>like a breeze.  I'm using Intellij and you can run Tomcat within it. I'm 
>sure Eclipse has the same feature.
>
>Zarar
>----- Original Message -----
>From: <ma...@gmail.com>Sylvain Pelletier
>To: <ma...@ibatis.apache.org>user-java@ibatis.apache.org
>Sent: Saturday, July 09, 2005 7:42 AM
>Subject: I must restart Tomcat when I modify some SQL Map XML files in 
>SQLMapConfig.xml
>
>Hi,
>
>First I'm new to the sqlmap's world!
>
>I'm using sqlmap without using the dao manager of ibastis.
>I work under myeclipse and when I modify the content of SQL MAP xml files 
>(to add a select statement for example), the changes are not do in real-time.
>I'm actually restarting tomcat each times I changes  SQL MAP xml files and 
>it's a quite boring !!
>
>Thanks
>
>Sylvain
>

Re: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml

Posted by Darek Dober <do...@op.pl>.
Can't you just use manager included in Tomcat,

you can reach it at /manager/html/list and then just reload application ? I do that:)

Darek

  ----- Original Message ----- 
  From: Zarar Siddiqi 
  To: user-java@ibatis.apache.org ; Sylvain Pelletier 
  Sent: Monday, July 11, 2005 7:20 PM
  Subject: Re: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml


  Instead of restarting Tomcat, perhaps you should setup your application so that you just have to reload/redeploy the context for the startup listeners to kick in.  Restarting tomcat can be slow while reploying works like a breeze.  I'm using Intellij and you can run Tomcat within it. I'm sure Eclipse has the same feature.

  Zarar
    ----- Original Message ----- 
    From: Sylvain Pelletier 
    To: user-java@ibatis.apache.org 
    Sent: Saturday, July 09, 2005 7:42 AM
    Subject: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml


    Hi,

    First I'm new to the sqlmap's world!

    I'm using sqlmap without using the dao manager of ibastis.
    I work under myeclipse and when I modify the content of SQL MAP xml files (to add a select statement for example), the changes are not do in real-time. 
    I'm actually restarting tomcat each times I changes  SQL MAP xml files and it's a quite boring !!

    Thanks

    Sylvain

Re: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml

Posted by Zarar Siddiqi <za...@utoronto.ca>.
Instead of restarting Tomcat, perhaps you should setup your application so that you just have to reload/redeploy the context for the startup listeners to kick in.  Restarting tomcat can be slow while reploying works like a breeze.  I'm using Intellij and you can run Tomcat within it. I'm sure Eclipse has the same feature.

Zarar
  ----- Original Message ----- 
  From: Sylvain Pelletier 
  To: user-java@ibatis.apache.org 
  Sent: Saturday, July 09, 2005 7:42 AM
  Subject: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml


  Hi,

  First I'm new to the sqlmap's world!

  I'm using sqlmap without using the dao manager of ibastis.
  I work under myeclipse and when I modify the content of SQL MAP xml files (to add a select statement for example), the changes are not do in real-time. 
  I'm actually restarting tomcat each times I changes  SQL MAP xml files and it's a quite boring !!

  Thanks

  Sylvain