Hi

I was thinking of using just iBATIS for the tutorial, but I reached a point
where I thought 
that was would be required was getting to involved for a Tutorial.

I think that the problems with Maven not overriding properties could be
bypassed for now.
If the appfuse-${dao.framework} dependency in the service pom.xml was given
test scope
and added to the archetype-resources pom.xml, wouldn't that let the user
change the
dao framework by altering the property in their pom.xml.

On adding the Maven SQL plugin.
If we assumed that using annotations in the model is a 'best practice' that
we expect to be followed,
we could still use hbn2ddl to create the tables rather than have to supply
ddl sql. 
Dbunit is used to load the tables, so we do not need sql for that. 
On this basis adding the SQL plugin might be better as a 'How To', or placed
at the end of the tutorial
for those who are still interested. 
Do you think this would be acceptable to iBATIS users ?

Dao frameworks which require listeners/filters etc in web.xml will always be
a problem. It may just
be a case of documenting the changes required clearly and having lots of
notes in the web.xml file.
The tomcat xml files are commented in this way.

I don't know anything about using JPA, but I assume similar considerations
would apply to that as well.

   Nick




Matt Raible-3 wrote:
> 
> Do you want to use Hibernate *and* iBATIS or just one?  The current
> setup for iBATIS isn't as good as we'd like - mainly because Maven
> doesn't seem to allow overriding properties at this point.
> 
> http://jira.codehaus.org/browse/MNG-2757
> 
> Until we figure out a solution, it seems there's only two ways to set
> a DAO Framework with AppFuse/Maven.
> 
> 1. Pass it in from the command-line: mvn jetty:run-war
> -Ddao.framework=jpa-hibernate
> 2. Set it in your MAVEN_OPTS environment variable: export
> MAVEN_OPTS='-Ddao.framework=jpa-hibernate'.
> 
> Both of these seem pretty fragile as it requires end users to do
> something. If they don't set the MAVEN_OPTS variable, they'll end up
> with Hibernate instead of iBATIS or JPA.
> 
> I know it's ugly, but we haven't figured out a better workaround yet.
> 
> In addition to setting this property, you'll need to modify your
> web.xml to remove Hibernate's LazyLoadingFilter since there will be no
> sessionFactory bean available.
> 
> Matt
> 
> 
> On 2/3/07, Nick Tucker <[EMAIL PROTECTED]> wrote:
>>
>>
>>    Hi
>>
>>   Is there an easy way to set up iBATIS support.
>> When I generate an application using the basic archetype,
>> the appfuse-hibernate jar is included, and this holds the
>> applicationContext-dao.xml.
>>
>> I assume that I could set the appfuse-hibernate jar to be a provided
>> dependency
>> in my pom.xml, and then add the appfuse-ibatis jar as a dependency.
>>
>> Is there a better way - using an archetype or something. I would expect
>> people
>> to not normally want to use more than one dao framework in an
>> application.
>>
>>    Nick
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Using-iBATIS-tf3167698s2369.html#a8787392
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> http://raibledesigns.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Using-iBATIS-tf3167698s2369.html#a8797179
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to