[ 
http://issues.apache.org/jira/browse/IBATIS-322?page=comments#action_12420314 ] 

Jeff Butler commented on IBATIS-322:
------------------------------------

iBATIS is not totally consistent in the way it creates objects.  However, in 
many cases it uses methods in the Resources class.  You can change the 
classloader by calling Resources.setDefaultClassloader() before you do any 
other iBATIS work.  This may solve the problem.

In release 2.2.0, you can also provide a custom factory that iBATIS will use to 
create any result objects.  See IBATIS-50 for more information about that.

I'd be interested to know if calling Resources.setDefaultClassloader() solves 
the issue.

> Classloader problems in some environments.
> ------------------------------------------
>
>          Key: IBATIS-322
>          URL: http://issues.apache.org/jira/browse/IBATIS-322
>      Project: iBatis for Java
>         Type: Improvement

>   Components: SQL Maps, DAO
>  Environment: netbeans platform
>     Reporter: Andrey

>
> iBatis uses Class.forName to find classes. 
> In netbeans platform here is problem when iBatis used as module, because 
> netbeans restricts loading classes, not declared as dependency for calling 
> module. This lead to circular dependencies, because calling module contains 
> dao implementation classes and ibatis should depend on them to be able to 
> load them and in main module should depend on ibatis to be able to use ibatis 
> classes.
> Netbeans allow to load with slightly different way: 
> ClassLoader l = Thread.currentThread().getContextClassLoader();
> Class c = l.loadClass("some.module.Class");
> Is it possible to allow developer to specify classloader wrapper via 
> sqlmap.xml, daomap.xml etc.

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

Reply via email to