ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caio Zanchetti" <caio.zanche...@gmail.com>
Subject Re: Desktop apps with iBatis
Date Thu, 24 May 2007 19:31:54 GMT
Tank you very much for reply. I'm sorry for the long time to this reply.
Chris, can you explain a little bit more about Spring's initialization in a
swing app? How can I do that?
I would like to know how to, how do you see the usage of iBatis without
Spring integration, like in iBatis jPetStore demo app.

Regards,


On 5/22/07, Chris Lamey <clamey@localmatters.com> wrote:
>
> Hello,
>
> We have an API in front of a database schema that uses iBATIS as the DB
> interface.  This API is used by swing, command line, and web
> applications.  It is packaged in a jar file with an external
> configuration file.  The jar file has all the iBATIS sqlmap xml files
> and all of the Spring context files.  The external configuration file is
> a properties file that has just a few things like the JDBC URL, DB user,
> and DB password.  Any application that needs to interface with that
> schema can just pull in the jar file like a third party lib, change a
> few properties, and go.
>
> The Spring context can be initialized externally or by an init() method
> in the API.  The external initialization is mainly used by webapps who
> do so via web.xml.  They do have to know which Spring context files in
> the API jar to reference via the "classpath:" specifier.  The init()
> method is mainly called by the swing and command line main()
> applications, although there's no reason they couldn't do the Spring
> initialization themselves.
>
> All DataSources are expected to be in JNDI.  For web applications, each
> servlet container has its own way of registering JNDI resources.  For
> the swing and standalone apps, the init() method puts DataSources in
> JNDI via Spring's SimpleNamingContextBuilder before initializing Spring.
>
> Cheers,
> Chris
>
> On Tue, 2007-05-22 at 00:02 -0300, Caio Zanchetti wrote:
> > Hello,
> >
> > I'm developing an application that initially will need to have a
> > temporary desktop-based GUI (using Swing, for database tests purpose).
> > But this app will be web-based in a few months.
> > What I would like to know is how can I build this app using the
> > integration between iBatis and Spring somehow that it works for this
> > distinct plataforms (web and desktop)? If it possible, of course.
> >
> >
> > Regards,
> >
> >
> > --
> > Claudiomir G. Zanchetti (Caio)
> > Sun Certified Programmer for the Java 2 Plataform, Standard Edition
> > 5.0
> > "Use com sabedoria a mente e energia para beneficiar ambos, vocĂȘ mesmo
> > e os outros." -Dr. Jigoro Kano
>



-- 
Claudiomir G. Zanchetti (Caio)
Sun Certified Programmer for the Java 2 Plataform, Standard Edition 5.0
"Use com sabedoria a mente e energia para beneficiar ambos, vocĂȘ mesmo e os
outros." -Dr. Jigoro Kano

Mime
View raw message