ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashmi Dave" <rash...@persistent.co.in>
Subject RE: iBatis and Tomcat
Date Tue, 31 Jan 2006 08:41:53 GMT
Thanks Nathan, Larry and Tony,

 

I moved the config files to within the classes and then used Resources. Its
working now :-)

 

Thanks a million! 

 

(PS: I just want to say that I really think this is a great group. The
attitude of the developers is very helpful. Looking at the emails exchanged
here makes me glad that we chose iBatis. I can be sure that my questions
will be answered :) )

 

Regards

~Rashmi

  _____  

From: Nathan.Maves@Sun.COM [mailto:Nathan.Maves@Sun.COM] 
Sent: Tuesday, January 31, 2006 2:39 AM
To: user-java@ibatis.apache.org
Subject: Re: iBatis and Tomcat

 

Rashmi,

 

Not sure how you are using the Resources class but this has always worked
for us in many many webapps.

 

public class DaoConfig {

    private static Log log = LogFactory.getLog(DaoConfig.class);

    private static final DaoManager daoManager;

    private static final String resource = "scorecard/dao/dao.xml";

    private static Reader reader;

 

    static {

        try {

            reader = Resources.getResourceAsReader(resource);

        } catch (IOException e) {

            log.error(e, e);

        }

 

        daoManager = DaoManagerBuilder.buildDaoManager(reader);

    }

 

    /**

     * Get the instance of the DaoManager object

     * @return DaoManager

     */

    public static DaoManager getDaoManager() {

        return daoManager;

    }

}

 

 

On Jan 30, 2006, at 9:44 AM, Rashmi Dave wrote:





Hi All,

 

My question might not relate completely with an iBATIS problem, however, I
am a little desperate and would really appreciate some help.

 

I have an application which I am deploying as a WAR onto a tomcat 5.5
server. The application contains a daoConfig and an SQLMapConfig. The WAR
file looks like

 

App.war =

-          screens (containing jsp pages)

-oo


Mime
View raw message