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 Richard Lin <ri...@elfly.com> on 2006/02/23 04:56:19 UTC
Adding sqlmap at runtime
Is there anyway to add/load a sqlmap XML file at runtime instead of
including in the sqlmap-config file?
I'm working on a framework that needs to discover and load sqlmap
files dynamically from jars with classloader.
Re: Adding sqlmap at runtime
Posted by Richard Lin <ri...@elfly.com>.
I've made a quick fix for this and created a issue ticket for it. it's
a non-instrusive wrapper around the existing SqlMapClient.
here's the issue ticket:
http://issues.apache.org/jira/browse/IBATIS-270
On 4/17/06, Marcelo Martins <ma...@gmail.com> wrote:
> I need this too. Its only thing that miss in ibatis for me.
>
> On 2/23/06, Richard Lin <ri...@elfly.com> wrote:
> > Is there anyway to add/load a sqlmap XML file at runtime instead of
> > including in the sqlmap-config file?
> >
> > I'm working on a framework that needs to discover and load sqlmap
> > files dynamically from jars with classloader.
> >
> >
>
>
Re: Adding sqlmap at runtime
Posted by Marcelo Martins <ma...@gmail.com>.
I need this too. Its only thing that miss in ibatis for me.
On 2/23/06, Richard Lin <ri...@elfly.com> wrote:
>
> Is there anyway to add/load a sqlmap XML file at runtime instead of
> including in the sqlmap-config file?
>
> I'm working on a framework that needs to discover and load sqlmap
> files dynamically from jars with classloader.
>
>
Re: Adding sqlmap at runtime
Posted by Richard Lin <ri...@elfly.com>.
that doesn't allow me to add individual sqlmap mapping files at
runtime. Instead, it's creating a sqlmapclient instance. that's not
what I need. I need to make statements available to existing
SqlMapClient dynamically at runtime.
On Feb 22, 2006, at 11:27 PM, Ben Munat wrote:
> Richard Lin wrote:
> > Is there anyway to add/load a sqlmap XML file at runtime instead of
> > including in the sqlmap-config file?
> >
> > I'm working on a framework that needs to discover and load
> sqlmap files
> > dynamically from jars with classloader.
> >
>
> From the javadoc for SqlMapClientBuilder:
>
> <quote>
> Builds SqlMapClient instances from a supplied resource (e.g. XML
> configuration file)
>
> The SqlMapClientBuilder class is responsible for parsing
> configuration documents and building the SqlMapClient instance. Its
> current implementation works with XML configuration files (e.g. sql-
> map-config.xml).
>
> Example:
>
> Reader reader = Resources.getResourceAsReader("properties/sql-map-
> config.xml");
> SqlMapClient client = SqlMapClientBuilder.buildSqlMapClient (reader);
>
> </quote>
>
> I think that should do ya.
>
> b
>
> PS: hey guys, why isn't the javadoc available anywhere on the
> ibatis site?
>
>
Re: Adding sqlmap at runtime
Posted by Ben Munat <be...@munat.com>.
Richard Lin wrote:
> Is there anyway to add/load a sqlmap XML file at runtime instead of
> including in the sqlmap-config file?
>
> I'm working on a framework that needs to discover and load sqlmap files
> dynamically from jars with classloader.
>
From the javadoc for SqlMapClientBuilder:
<quote>
Builds SqlMapClient instances from a supplied resource (e.g. XML configuration file)
The SqlMapClientBuilder class is responsible for parsing configuration documents and
building the SqlMapClient instance. Its current implementation works with XML
configuration files (e.g. sql-map-config.xml).
Example:
Reader reader = Resources.getResourceAsReader("properties/sql-map-config.xml");
SqlMapClient client = SqlMapClientBuilder.buildSqlMapClient (reader);
</quote>
I think that should do ya.
b
PS: hey guys, why isn't the javadoc available anywhere on the ibatis site?