ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wulf, Andrew" <AHW...@firstcommand.com>
Subject Ibatis property file issue
Date Wed, 27 Apr 2005 17:44:35 GMT
We develop our apps in two environments, Eclipse/IntelliJ for business
logic and BEA Weblogic Workshop for the portal UI. The problem is in
creating a single iBatis property file that will work in both

If I use the classpath for the property file and use

  <sqlMap resource="maps/Office_View.xml"/>

It works in E/I but since Workshop doesn't move non-class files around
in its "deployment" procedure to Weblogic server the files don't make it
into the classpath (which you basically have no control over).

If I do the URL method and do

<sqlMap url="file:./maps/Active_Agent_Office_View.xml"/>

This doesn't work in E/I unless the url is relative to the working
directory and only works in workshop if you stick everything relative to
the domain root directory.

The basic problem is that iBatis uses

    URL url = new URL(urlString);

Which in the case of a relative url doesn't work unless its relative to
the current working directory, NOT the ibatis property file.

I would like to see a change to sqlMap xml definition to indicate that
the url reference is relative to the iBatis property file. This was if I
can load the main property file iBatis can easily load the sqlmap files
from the same directory.

In the meantime, any ideas? I can move stuff around with ANT for working
in Workshop but it's irritating.

- Andrew

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message