[ 
https://issues.apache.org/jira/browse/IBATIS-270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466320
 ] 

Abdullah Kauchali commented on IBATIS-270:
------------------------------------------

Hi Richard,

>The instance is used to do the parsing of the newly loaded mapped statements. 
> It's state is then discarded because we don't want to keep too many 
> hierarchical 
> levels. However, the statements are added to the existing instance if 
> everything goes fine. 

Understood, that makes sense.   Many thanks for that info.

Also, what I've done is introduced a "simpler" creation syntax for 
(Dynamic)SqlMapClient ie. Instead of 
having to rely on a "SqlMapBuilder", I have introduced another constructor to 
DynamicSqlMapClient
that simply takes the path to the config resource and does the creation of 
SqlMapConfigParserExt, 
Reader etc within the constructor.  For this I have had to introduce a new 
decendant of 
SqlMapConfigParserExt with an overloaded constructor that takes an already 
instantiated copy
of SqlMapClient.  I've tested this and it seems to work.  What I now need to 
test is whether
loadResource will work with an already instantiated SqlMapClientImpl.  I'll 
post back.  But I am 
pretty confident your idea/implementation will work.

>There must be a better way of doing it, but I did not want to dig too far into 
>the 
> sqlmap parser for I don't have a spec of it. I know this way will not fail.

Is there a spec anyway?  How does one get hold of it?

One more question, if you don't mind:

Regarding the unloading of statements (SqlMaps), could you give any advice on 
where to begin!  :)
I don't mind performance penalties for now, is there a global variable to nuke 
(in a synchronised 
way of course) that will unload everything related to a statement?

Kind regards,

A

> Loading SqlMap XML to existing SqlMapClient
> -------------------------------------------
>
>                 Key: IBATIS-270
>                 URL: https://issues.apache.org/jira/browse/IBATIS-270
>             Project: iBatis for Java
>          Issue Type: New Feature
>          Components: SQL Maps
>         Environment: any
>            Reporter: Richard Lin
>            Priority: Minor
>         Attachments: DynamicSqlMapClient.java, 
> DynamicSqlMapExecutorDelegate.java
>
>
> Ability to dynamically load more SqlMap XML files not included in 
> sqlmap-config.xml.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to