You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by James Carman <ja...@carmanconsulting.com> on 2006/06/09 15:40:19 UTC

RE: Tapernate HOWTO ->RE: Tapestry+Spring+Hibernate

Have you checked out
www.carmanconsulting.com/tapernate


> Of course as soon as I sent that I found a different SVN location in the
> archives:
> http://www.carmanconsulting.com/svn/public/tapernate-example/trunk/
>
> I would still like to know if there is a HOWTO for this.  If not I will
> create one when/if I can get it up and running.
>
> Aaron Bartell
> http://mowyourlawn.com/blog
>
>
> -----Original Message-----
> From: albartell [mailto:albartell@gmail.com]
> Sent: Friday, June 09, 2006 7:37 AM
> To: Tapestry users
> Subject: Tapernate HOWTO ->RE: Tapestry+Spring+Hibernate
>
> Looks very promising James!
>
> I am trying to implement it and have been all over the place trying to
> find
> an example.  I got to this from the page you specified:
> http://www.carmanconsulting.com/mvn/com/carmanconsulting/tapernate-example/0
> .1/ but the tapernate-example-1.0.jar file only has *.class files.
>
> I then went and installed Subclipse so I could get the source from SVN
> hoping for an example or readme.txt, but nothing.
>
> I have my hivemind contribution setup complete (I believe, see below), but
> I
> don't see where I can get a Hibernate Session from?
>
>
> Hivemodule.xml
> ...
> 	<contribution configuration-id="hivemind.hibernate3.Configuration">
> 	  <configuration-file>hibernate.cfg.xml</configuration-file>
> 	  <mapping-file>com/rxs/dao/Lead.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Affiliate.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Reqext.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Leadtag.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Translog.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Leadtagtype.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Sysctl.hbm.xml</mapping-file>
> 	  <property name="hibernate.dialect"
> value="org.hibernate.dialect.MySQLDialect"/>
> 	  <class>com.rxs.dao.Affiliate</class>
> 	  <class>com.rxs.dao.Lead</class>
> 	  <class>com.rxs.dao.Leadtag</class>
> 	  <class>com.rxs.dao.Leadtagtype</class>
> 	  <class>com.rxs.dao.Reqext</class>
> 	  <class>com.rxs.dao.Translog</class>
> 	  <class>com.rxs.dao.Sysctl</class>
> 	</contribution>
>
> Thanks,
> Aaron Bartell
> http://mowyourlawn.com/blog
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


James Carman, President
Carman Consulting, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Tapernate HOWTO ->RE: Tapestry+Spring+Hibernate

Posted by James Carman <ja...@carmanconsulting.com>.
I agree that the documentation is a bit terse, but for those who are
familiar with HiveMind, it has been quite enough to get them rolling.  I
really don't understand your architecture that you're describing.  What I
would do is mimic what I've done in the example application with respect
to how DAOs are to be written/configured.  If you register them as
HiveMind services, then everything will just happen for you "magically."
:-)  I hate to say it like that, but it really is just that easy.

>>Have you checked out www.carmanconsulting.com/tapernate
>
> Yes, I have reviewed that page thoroughly.  I don't believe that is enough
> information to allow one to implement tapernate, but that may be my lack
> of
> hivemind/spring knowledge creeping in ( a lot of assumptions being made on
> that page).  I think a 2000 word "Tapernate - How it is put together"
> would
> do wonders for this side project. Something to the affect of "...here are
> the things you need to put into your hivemodule.xml file and why. And this
> is why you don't need your hibernate.cfg.xml file anymore. Here is the
> class
> you need to extend in your DAO's so you can gain access to the injected
> Hibernate session."
>
> Right now I would have to know hivemind and spring fairly intimately to
> get
> up and running.
>
> Note that you should also, IMO, have a direct link to the
> tapernate-examples
> residing in SVN off of that page.  I only found it by doing a search on
> the
> archives which is the long way home.
>
>
> And finally a question for you:
> Based on my original email where I had the two db access approaches (i.e.
> DBConn.sess() which is similar to getSession(), and the Hibernate "magic"
> way where I had zero session or HQL code), is there a way for Tapernate to
> intercept the Hibernate "magic" way based on the mapping files and being
> able to put 2+2 together to get an end connection to the DB?
>
> Or maybe a better way to state it is to say does Tapernate have the
> ability
> to intercept a call to method Leadtags.getLeadtags() and utilize the
> existing hibernate mappings to determine how to retrieve a list from the
> Leadtags table?  That is what I have right now, though I don't know quite
> how the interception works because none of my DAO POJO's have ANY
> hibernate
> code (e.g. no extends, imports, implements of hibernate jar classes) in
> them
> by default and somehow it knows which table to go to when certain methods
> are called.
>
> Thanks for the help provided,
> Aaron Bartell
>
>
> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com]
> Sent: Friday, June 09, 2006 8:40 AM
> To: Tapestry users
> Subject: RE: Tapernate HOWTO ->RE: Tapestry+Spring+Hibernate
>
> Have you checked out
> www.carmanconsulting.com/tapernate
>
>
>> Of course as soon as I sent that I found a different SVN location in
>> the
>> archives:
>> http://www.carmanconsulting.com/svn/public/tapernate-example/trunk/
>>
>> I would still like to know if there is a HOWTO for this.  If not I
>> will create one when/if I can get it up and running.
>>
>> Aaron Bartell
>> http://mowyourlawn.com/blog
>>
>>
>> -----Original Message-----
>> From: albartell [mailto:albartell@gmail.com]
>> Sent: Friday, June 09, 2006 7:37 AM
>> To: Tapestry users
>> Subject: Tapernate HOWTO ->RE: Tapestry+Spring+Hibernate
>>
>> Looks very promising James!
>>
>> I am trying to implement it and have been all over the place trying to
>> find an example.  I got to this from the page you specified:
>> http://www.carmanconsulting.com/mvn/com/carmanconsulting/tapernate-exa
>> mple/0 .1/ but the tapernate-example-1.0.jar file only has *.class
>> files.
>>
>> I then went and installed Subclipse so I could get the source from SVN
>> hoping for an example or readme.txt, but nothing.
>>
>> I have my hivemind contribution setup complete (I believe, see below),
>> but I don't see where I can get a Hibernate Session from?
>>
>>
>> Hivemodule.xml
>> ...
>> 	<contribution configuration-id="hivemind.hibernate3.Configuration">
>> 	  <configuration-file>hibernate.cfg.xml</configuration-file>
>> 	  <mapping-file>com/rxs/dao/Lead.hbm.xml</mapping-file>
>> 	  <mapping-file>com/rxs/dao/Affiliate.hbm.xml</mapping-file>
>> 	  <mapping-file>com/rxs/dao/Reqext.hbm.xml</mapping-file>
>> 	  <mapping-file>com/rxs/dao/Leadtag.hbm.xml</mapping-file>
>> 	  <mapping-file>com/rxs/dao/Translog.hbm.xml</mapping-file>
>> 	  <mapping-file>com/rxs/dao/Leadtagtype.hbm.xml</mapping-file>
>> 	  <mapping-file>com/rxs/dao/Sysctl.hbm.xml</mapping-file>
>> 	  <property name="hibernate.dialect"
>> value="org.hibernate.dialect.MySQLDialect"/>
>> 	  <class>com.rxs.dao.Affiliate</class>
>> 	  <class>com.rxs.dao.Lead</class>
>> 	  <class>com.rxs.dao.Leadtag</class>
>> 	  <class>com.rxs.dao.Leadtagtype</class>
>> 	  <class>com.rxs.dao.Reqext</class>
>> 	  <class>com.rxs.dao.Translog</class>
>> 	  <class>com.rxs.dao.Sysctl</class>
>> 	</contribution>
>>
>> Thanks,
>> Aaron Bartell
>> http://mowyourlawn.com/blog
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
> James Carman, President
> Carman Consulting, Inc.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


James Carman, President
Carman Consulting, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Tapernate HOWTO ->RE: Tapestry+Spring+Hibernate

Posted by albartell <al...@gmail.com>.
>Have you checked out www.carmanconsulting.com/tapernate

Yes, I have reviewed that page thoroughly.  I don't believe that is enough
information to allow one to implement tapernate, but that may be my lack of
hivemind/spring knowledge creeping in ( a lot of assumptions being made on
that page).  I think a 2000 word "Tapernate - How it is put together" would
do wonders for this side project. Something to the affect of "...here are
the things you need to put into your hivemodule.xml file and why. And this
is why you don't need your hibernate.cfg.xml file anymore. Here is the class
you need to extend in your DAO's so you can gain access to the injected
Hibernate session."  

Right now I would have to know hivemind and spring fairly intimately to get
up and running.

Note that you should also, IMO, have a direct link to the tapernate-examples
residing in SVN off of that page.  I only found it by doing a search on the
archives which is the long way home.


And finally a question for you: 
Based on my original email where I had the two db access approaches (i.e.
DBConn.sess() which is similar to getSession(), and the Hibernate "magic"
way where I had zero session or HQL code), is there a way for Tapernate to
intercept the Hibernate "magic" way based on the mapping files and being
able to put 2+2 together to get an end connection to the DB?  

Or maybe a better way to state it is to say does Tapernate have the ability
to intercept a call to method Leadtags.getLeadtags() and utilize the
existing hibernate mappings to determine how to retrieve a list from the
Leadtags table?  That is what I have right now, though I don't know quite
how the interception works because none of my DAO POJO's have ANY hibernate
code (e.g. no extends, imports, implements of hibernate jar classes) in them
by default and somehow it knows which table to go to when certain methods
are called.

Thanks for the help provided,
Aaron Bartell


-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: Friday, June 09, 2006 8:40 AM
To: Tapestry users
Subject: RE: Tapernate HOWTO ->RE: Tapestry+Spring+Hibernate

Have you checked out
www.carmanconsulting.com/tapernate


> Of course as soon as I sent that I found a different SVN location in 
> the
> archives:
> http://www.carmanconsulting.com/svn/public/tapernate-example/trunk/
>
> I would still like to know if there is a HOWTO for this.  If not I 
> will create one when/if I can get it up and running.
>
> Aaron Bartell
> http://mowyourlawn.com/blog
>
>
> -----Original Message-----
> From: albartell [mailto:albartell@gmail.com]
> Sent: Friday, June 09, 2006 7:37 AM
> To: Tapestry users
> Subject: Tapernate HOWTO ->RE: Tapestry+Spring+Hibernate
>
> Looks very promising James!
>
> I am trying to implement it and have been all over the place trying to 
> find an example.  I got to this from the page you specified:
> http://www.carmanconsulting.com/mvn/com/carmanconsulting/tapernate-exa
> mple/0 .1/ but the tapernate-example-1.0.jar file only has *.class 
> files.
>
> I then went and installed Subclipse so I could get the source from SVN 
> hoping for an example or readme.txt, but nothing.
>
> I have my hivemind contribution setup complete (I believe, see below), 
> but I don't see where I can get a Hibernate Session from?
>
>
> Hivemodule.xml
> ...
> 	<contribution configuration-id="hivemind.hibernate3.Configuration">
> 	  <configuration-file>hibernate.cfg.xml</configuration-file>
> 	  <mapping-file>com/rxs/dao/Lead.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Affiliate.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Reqext.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Leadtag.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Translog.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Leadtagtype.hbm.xml</mapping-file>
> 	  <mapping-file>com/rxs/dao/Sysctl.hbm.xml</mapping-file>
> 	  <property name="hibernate.dialect"
> value="org.hibernate.dialect.MySQLDialect"/>
> 	  <class>com.rxs.dao.Affiliate</class>
> 	  <class>com.rxs.dao.Lead</class>
> 	  <class>com.rxs.dao.Leadtag</class>
> 	  <class>com.rxs.dao.Leadtagtype</class>
> 	  <class>com.rxs.dao.Reqext</class>
> 	  <class>com.rxs.dao.Translog</class>
> 	  <class>com.rxs.dao.Sysctl</class>
> 	</contribution>
>
> Thanks,
> Aaron Bartell
> http://mowyourlawn.com/blog
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


James Carman, President
Carman Consulting, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org