ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Silver <ro...@sharedevent.com>
Subject file paths for config files in n-tier architecture
Date Wed, 14 Jan 2009 16:06:38 GMT
Hey all,

I have 4 facets to my application, Web, Test, Services, Data.

Web - the website
Test - the token test project... ;)
Services - interface between web and underlying persistence layer (and additional services)
Data - my data model, POCO's etc.

Assume the scenario where there is a "List All Customer's" button on my page.

Admin User clicks it and web calls CustomerService.ListAllCustomers().  This in turn calls
the iBatis structure sort of like...

ArrayList al = (ArrayList)Mapper.Instance().QueryForList("SelectAll", null);

The SqlMap.config and CustomerMapping.xml files are in my Services project.

When I run this, I get the error:

Unable to load file via resource "SqlMap.config" as resource. Cause : Could not find file

It seems to want to load the config from the calling project (web), not the project in which
the actual code resides(services).  When I look at the NPetStore example, the config files
are in the web also.

My question is, is there any way to configure it to look for files in the services project
instead?  I don't want to have any reference to IBatis in my Web if at all possible.


View raw message