You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Bulling <sp...@phoenix.hadiko.de> on 2006/02/18 00:48:40 UTC

[OT] Re: Best practice - Integration Hibernate/Tapestry

Hi again,

I'm in despair because I just can't understand the whole Hibernate/EJB/domain-model/etc.
stuff even after reading documentation, tutorials and example code for days, now :(
(perhaps I've just read the wrong documents, I don't know...)

So *please*, even if it's not directly related to Tapestry, but as other OT messages
have been posted and answered already on this list and I don't know
whom to ask instead or which documents/books to read.

If someone has a few minutes:
Could someone please explain to me (even a short explanation would help)

- What's the difference between CMP and Hibernate and in which situation which
one can/should be used? What are the pro's and con's of both approaches?

- How can Hibernate be used in a Tapestry vlib-style application (where CMP was used
so far)? (the mentioned epluribus example seems to be reorganized completely and I don't
know if it's possible/reasonable at all to recode everything). Therefore which
Classes would need to be replaced/changed?

- Is it possible/reasonable to use EJB's _and_ Hibernate and if yes how can they
be used together?

Thanks a lot for any answer!
  Andreas

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nick Faiz <ni...@q9software.com>.
Andreas,

Here's some of my config. for a Tapestry + Hivemind + Hibernate 
combination. As I said previously, it is all standard and based on the 
quick start guide on the HiveUtils site.

 <!-- Hibernate configuration via HiveUtils -->
  <implementation service-id="hivetranse.hibernate3.SessionFactoryBuilder">
    <invoke-factory model="primitive">
      <construct 
class="net.sourceforge.hivetranse.transaction.hibernate3.SessionFactoryBuilderImpl">
        <log/>
      </construct>
    </invoke-factory>
  </implementation>


<!-- My hivemodule.xml ends up in WEB-INF/classes/META-INF/ and my 
hibernate.cfg.xml file is in WEB-INF/classes, so I tell the 
SessionFactoryBuilder service below to look up a level in the directory 
structure for the Hibernate config. -->

  <service-point id="session" interface="org.hibernate.Session">
    <invoke-factory service-id="hivetranse.hibernate3.SessionFactory" 
model="singleton">
      <config file="../hibernate.cfg.xml" />
    </invoke-factory>
  </service-point>

  <contribution configuration-id="hivetranse.core.TransactionDefaults">
    <defaults>
      <exception name="java.lang.Throwable" rollback="true"/>
      <method pattern="*" demarcation="Never"/>
    </defaults>
  </contribution>

  <contribution configuration-id="hivemind.ApplicationDefaults">
    <default symbol="hivetranse.hibernate3.DeferSessionClose" value="true"/>
  </contribution>

The above relies on Hibernate 3.1.2. Apparently it only requires 3.1.1 
to work but the important thing to note is that 3.x wont.

Here's also an example service, which is injected with the session:

 <service-point id="fooManager" interface="com.q9software.FooManager">
    <invoke-factory>
      <construct class="com.q9software.DefaultFooManager">
        <set-object property="session" value="service:portal.session"/>
      </construct>
    </invoke-factory>
    <interceptor service-id="hivetranse.core.TransactionInterceptor">
      <method pattern="*" demarcation="Required"/>
      <exception name="java.lang.RuntimeException" rollback="true"/>
      <exception name="java.lang.Exception" rollback="false"/>
    </interceptor>
  </service-point>


My DefaultFooManager has a getter and setter for the session object:


  public Session getSession() {
    return session;
  }

  public void setSession(Session session) {
    this.session = session;
  }

Make sure that you do not have hivetranse.hibernate.jar on your 
classpath. You must use hivetranse.hibernate3.jar .

All the best,
Nick


Andreas Bulling wrote:
> On 22. Feb 2006 - 12:01:06, James Carman wrote:
> | No problem.  I've actually enjoyed HiveMind-izing my stuff.  Since I am a
> | committer on the HiveMind project, I really should "eat my own dog food."
> | :-)
>
> Well, I would like to be able to say that from my experience...
> Hivetranse/Hibernate still don't work for me :(
> I'm thinking about switching back to Spring where I was at least
> able to see something happen in my database...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>   


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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 22. Feb 2006 - 12:01:06, James Carman wrote:
| No problem.  I've actually enjoyed HiveMind-izing my stuff.  Since I am a
| committer on the HiveMind project, I really should "eat my own dog food."
| :-)

Well, I would like to be able to say that from my experience...
Hivetranse/Hibernate still don't work for me :(
I'm thinking about switching back to Spring where I was at least
able to see something happen in my database...

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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
No problem.  I've actually enjoyed HiveMind-izing my stuff.  Since I am a
committer on the HiveMind project, I really should "eat my own dog food."
:-)

-----Original Message-----
From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
Andreas Bulling
Sent: Wednesday, February 22, 2006 11:55 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

I didn't want to press you. I just thought that perhaps the plan
to publish some code got lost in this big thread ;) No offence!

On 22. Feb 2006 - 11:33:56, James Carman wrote:
| I'm working on it.  Sorry for the delay.  I'm HiveMind-izing everything
and
| getting rid of Spring!

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



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
I didn't want to press you. I just thought that perhaps the plan
to publish some code got lost in this big thread ;) No offence!

On 22. Feb 2006 - 11:33:56, James Carman wrote:
| I'm working on it.  Sorry for the delay.  I'm HiveMind-izing everything and
| getting rid of Spring!

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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
I'm working on it.  Sorry for the delay.  I'm HiveMind-izing everything and
getting rid of Spring!


-----Original Message-----
From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
Andreas Bulling
Sent: Wednesday, February 22, 2006 11:32 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Hi James,

have you gone further in the meanwhile and could you make
some code available? That would be great!

Thanks,
  Andreas

On 20. Feb 2006 - 06:57:13, James Carman wrote:
| Yes I will.  

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



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Hi James,

have you gone further in the meanwhile and could you make
some code available? That would be great!

Thanks,
  Andreas

On 20. Feb 2006 - 06:57:13, James Carman wrote:
| Yes I will.  

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Jason Dyer <jd...@bluetarp.com>.
I'm sure I was having the same problem, and (looking through my source 
history) the only change I can see is that the <defaults> wrapping was 
missing from the TransactionDefaults config and that at one point I had 
demarcation="Never" which caused other problems (I think.)

Anyhow, I've trimed the irrelevant bits out, but it's still pretty long--hope 
it helps.

<module id="bt.havoc" version="1.0.0">

  <!-- Change property to enable "Open Session in View" pattern -->
  <contribution configuration-id="hivemind.ApplicationDefaults">
    <default symbol="hivetranse.hibernate3.DeferSessionClose" value="true"/>
  </contribution>

  <!-- Default transaction management settings -->
  <contribution configuration-id="hivetranse.core.TransactionDefaults">
    <defaults>
      <exception	name="java.lang.Throwable" rollback="true"/>
      <method		pattern="*" demarcation="Required"/>
    </defaults>
  </contribution>

  <!-- Hibernate Session -->
  <service-point id="Session" interface="org.hibernate.Session">
    <invoke-factory	service-id="hivetranse.hibernate3.SessionFactory" 
model="singleton">
      <config	file="hibernate.cfg.xml">
      </config>
    </invoke-factory>
  </service-point>

  <!-- Build Hibernate SessionFactory as early as possible -->
  <contribution configuration-id="hivemind.EagerLoad">
    <load service-id="Session"/>
  </contribution>

  <implementation service-id="Session">
    <interceptor service-id="hivemind.LoggingInterceptor"/>
  </implementation>

  <implementation service-id="hivetranse.core.TransactionService">
    <interceptor service-id="hivemind.LoggingInterceptor"/>
  </implementation>

  <implementation service-id="hivetranse.hibernate3.SessionFactory">
    <interceptor service-id="hivemind.LoggingInterceptor"/>
  </implementation>

  <service-point id="customerDao" interface="bt.havoc.data.dao.CustomerDao"/>
  <!-- many Dao's omitted... -->

  <implementation service-id="customerDao">
    <invoke-factory>
      <construct class="bt.havoc.data.dao.hibernate.HibernateCustomerDao"/>
    </invoke-factory>
    <interceptor service-id="hivetranse.core.TransactionInterceptor"/>
  </implementation>
  <!-- many implementations's omitted... -->
</module>


On Monday 20 February 2006 17:21, Andreas Bulling wrote:
> Thanks for your answer and sorry, that's what I wanted to post...
> I have that in my hivemodule.xml but the error remains :(
> Would you mind send me your hivemodule.xml file?
>
> Sincerly,
>   Andreas

-- 
	"...A strange enigma is man!"
	"Someone calls him a soul concealed in an animal," I suggested.
	"Winwood Reade is good upon the subject," said Holmes.  "He remarked
that, while the individual man is an insoluble puzzle, in the aggregate he
becomes a mathematical certainty.  You can, for example, never foretell what
any one man will do, but you can say with precision what an average number
will be up to.  Individuals vary, but percentages remain constant.  So says
the statistician."
		-- Sherlock Holmes, "The Sign of Four"
--------------
Jason Dyer
BlueTarp Financial, inc.

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nick Faiz <ni...@q9software.com>.
The dependency requires Hibernate 3.1.1 (see http:// 
forum.hibernate.org/viewtopic.php?t=954577&highlight=secondpass) !

I'm running with 3.1.2 and everything is working well.

Nick

On 21/02/2006, at 7:37 PM, Nick Faiz wrote:

> Apologies ...
>
>> Just a note to anyone working on Tapestry + Hibernate +Hivemind  
>> via HiveUtils.
>
>  I meant to specify that there are a couple of dependencies to  
> satisfy for *Hibernate 3*.
>
> Nick
>
>
>> I've had to also ensure that I had hibernate-annotations on the  
>> classpath. I'm just working out to satisfy a dependency on  
>> org.hibernate.cfg.http://forum.hibernate.org/viewtopic.php? 
>> t=954577&highlight=secondpassPass right now. I'll add my steps to  
>> the wiki later on.
>>
>> Cheers,
>> Nick
>>
>> On 21/02/2006, at 10:32 AM, Nick Faiz wrote:
>>
>>> Andreas,
>>>
>>> Yes, I too used the default setting to work around this.
>>>
>>> I'm sitting in #tapestry on irc.freenode.net, if you'd like to  
>>> come in and work on your configuration briefly. I can't give you  
>>> more than ten minutes but it might help to have someone to work  
>>> through the problem in real time.
>>>
>>> Cheers,
>>> Nick
>>>
>>>
>>> On 21/02/2006, at 9:12 AM, Jason Dyer wrote:
>>>
>>>> I've got tap4+hibernate+hivetranse working.  Do you have the
>>>> TransactionDefaults element?  Here's mine:
>>>>
>>>>   <!-- Default transaction management settings -->
>>>>   <contribution configuration- 
>>>> id="hivetranse.core.TransactionDefaults">
>>>>     <defaults>
>>>>       <exception	name="java.lang.Throwable" rollback="true"/>
>>>>       <method		pattern="*" demarcation="Required"/>
>>>>     </defaults>
>>>>   </contribution>
>>>>
>>>>
>>>> On Monday 20 February 2006 16:47, Andreas Bulling wrote:
>>>>> That's what I searched on google for the last half an hour ;)
>>>>> But unfortunately without success, as even putting
>>>>>
>>>>> <contribution configuration-id="hivemind.ApplicationDefaults">
>>>>>     <default symbol="hivetranse.hibernate3.DeferSessionClose"
>>>>> value="true"/> </contribution>
>>>>>
>>>>> in hivemodule.xml doesn't fix the problem. :(
>>>>>
>>>>> Thanks anyway for your answer!
>>>>>
>>>>> On 20. Feb 2006 - 16:40:02, Wayland Chan wrote:
>>>>> | I don't even know how to use Hivemind but maybe this part of  
>>>>> the stack
>>>>> | trace can shed some light on your problem:
>>>>> |
>>>>> | /META-INF/hivemodule.xml, line 20, column 59: Configuration  
>>>>> point
>>>>> | hivetranse.core.TransactionDefaults contains no contributions  
>>>>> but expects
>>>>> | exactly one contribution.
>>>>>
>>>>> ------------------------------------------------------------------ 
>>>>> ---
>>>>> To unsubscribe, e-mail: tapestry-user- 
>>>>> unsubscribe@jakarta.apache.org
>>>>> For additional commands, e-mail: tapestry-user- 
>>>>> help@jakarta.apache.org
>>>>
>>>> -- 
>>>> Black Dens:
>>>> 	Where Black Holes live; often unheated warehouses with Day-Glo
>>>> spray painting, mutilated mannequins, Elvis references, dozens of
>>>> overflowing ashtrays, mirror sculptures, and Velvet Underground  
>>>> music
>>>> playing in background.
>>>> 		-- Douglas Coupland, "Generation X: Tales for an Accelerated
>>>> 		   Culture"
>>>> --------------
>>>> Jason Dyer
>>>> BlueTarp Financial, inc.
>>>>
>>>> ------------------------------------------------------------------- 
>>>> --
>>>> To unsubscribe, e-mail: tapestry-user- 
>>>> unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tapestry-user- 
>>>> help@jakarta.apache.org
>>>>
>>>
>>> Nick Faiz,
>>> Developer
>>> www.q9software.com
>>>
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user- 
>>> help@jakarta.apache.org
>>>
>>
>> Nick Faiz,
>> Developer
>> www.q9software.com
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user- 
>> help@jakarta.apache.org
>>
>
> Nick Faiz,
> Developer
> www.q9software.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

Nick Faiz,
Developer
www.q9software.com



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nick Faiz <ni...@q9software.com>.
Apologies ...

> Just a note to anyone working on Tapestry + Hibernate +Hivemind via  
> HiveUtils.

  I meant to specify that there are a couple of dependencies to  
satisfy for *Hibernate 3*.

Nick


> I've had to also ensure that I had hibernate-annotations on the  
> classpath. I'm just working out to satisfy a dependency on  
> org.hibernate.cfg.SecondPass right now. I'll add my steps to the  
> wiki later on.
>
> Cheers,
> Nick
>
> On 21/02/2006, at 10:32 AM, Nick Faiz wrote:
>
>> Andreas,
>>
>> Yes, I too used the default setting to work around this.
>>
>> I'm sitting in #tapestry on irc.freenode.net, if you'd like to  
>> come in and work on your configuration briefly. I can't give you  
>> more than ten minutes but it might help to have someone to work  
>> through the problem in real time.
>>
>> Cheers,
>> Nick
>>
>>
>> On 21/02/2006, at 9:12 AM, Jason Dyer wrote:
>>
>>> I've got tap4+hibernate+hivetranse working.  Do you have the
>>> TransactionDefaults element?  Here's mine:
>>>
>>>   <!-- Default transaction management settings -->
>>>   <contribution configuration- 
>>> id="hivetranse.core.TransactionDefaults">
>>>     <defaults>
>>>       <exception	name="java.lang.Throwable" rollback="true"/>
>>>       <method		pattern="*" demarcation="Required"/>
>>>     </defaults>
>>>   </contribution>
>>>
>>>
>>> On Monday 20 February 2006 16:47, Andreas Bulling wrote:
>>>> That's what I searched on google for the last half an hour ;)
>>>> But unfortunately without success, as even putting
>>>>
>>>> <contribution configuration-id="hivemind.ApplicationDefaults">
>>>>     <default symbol="hivetranse.hibernate3.DeferSessionClose"
>>>> value="true"/> </contribution>
>>>>
>>>> in hivemodule.xml doesn't fix the problem. :(
>>>>
>>>> Thanks anyway for your answer!
>>>>
>>>> On 20. Feb 2006 - 16:40:02, Wayland Chan wrote:
>>>> | I don't even know how to use Hivemind but maybe this part of  
>>>> the stack
>>>> | trace can shed some light on your problem:
>>>> |
>>>> | /META-INF/hivemodule.xml, line 20, column 59: Configuration point
>>>> | hivetranse.core.TransactionDefaults contains no contributions  
>>>> but expects
>>>> | exactly one contribution.
>>>>
>>>> ------------------------------------------------------------------- 
>>>> --
>>>> To unsubscribe, e-mail: tapestry-user- 
>>>> unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tapestry-user- 
>>>> help@jakarta.apache.org
>>>
>>> -- 
>>> Black Dens:
>>> 	Where Black Holes live; often unheated warehouses with Day-Glo
>>> spray painting, mutilated mannequins, Elvis references, dozens of
>>> overflowing ashtrays, mirror sculptures, and Velvet Underground  
>>> music
>>> playing in background.
>>> 		-- Douglas Coupland, "Generation X: Tales for an Accelerated
>>> 		   Culture"
>>> --------------
>>> Jason Dyer
>>> BlueTarp Financial, inc.
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user- 
>>> help@jakarta.apache.org
>>>
>>
>> Nick Faiz,
>> Developer
>> www.q9software.com
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user- 
>> help@jakarta.apache.org
>>
>
> Nick Faiz,
> Developer
> www.q9software.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

Nick Faiz,
Developer
www.q9software.com



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nick Faiz <ni...@q9software.com>.
Just a note to anyone working on Tapestry + Hibernate +Hivemind via  
HiveUtils.  I've had to also ensure that I had hibernate-annotations  
on the classpath. I'm just working out to satisfy a dependency on  
org.hibernate.cfg.SecondPass right now. I'll add my steps to the wiki  
later on.

Cheers,
Nick

On 21/02/2006, at 10:32 AM, Nick Faiz wrote:

> Andreas,
>
> Yes, I too used the default setting to work around this.
>
> I'm sitting in #tapestry on irc.freenode.net, if you'd like to come  
> in and work on your configuration briefly. I can't give you more  
> than ten minutes but it might help to have someone to work through  
> the problem in real time.
>
> Cheers,
> Nick
>
>
> On 21/02/2006, at 9:12 AM, Jason Dyer wrote:
>
>> I've got tap4+hibernate+hivetranse working.  Do you have the
>> TransactionDefaults element?  Here's mine:
>>
>>   <!-- Default transaction management settings -->
>>   <contribution configuration- 
>> id="hivetranse.core.TransactionDefaults">
>>     <defaults>
>>       <exception	name="java.lang.Throwable" rollback="true"/>
>>       <method		pattern="*" demarcation="Required"/>
>>     </defaults>
>>   </contribution>
>>
>>
>> On Monday 20 February 2006 16:47, Andreas Bulling wrote:
>>> That's what I searched on google for the last half an hour ;)
>>> But unfortunately without success, as even putting
>>>
>>> <contribution configuration-id="hivemind.ApplicationDefaults">
>>>     <default symbol="hivetranse.hibernate3.DeferSessionClose"
>>> value="true"/> </contribution>
>>>
>>> in hivemodule.xml doesn't fix the problem. :(
>>>
>>> Thanks anyway for your answer!
>>>
>>> On 20. Feb 2006 - 16:40:02, Wayland Chan wrote:
>>> | I don't even know how to use Hivemind but maybe this part of  
>>> the stack
>>> | trace can shed some light on your problem:
>>> |
>>> | /META-INF/hivemodule.xml, line 20, column 59: Configuration point
>>> | hivetranse.core.TransactionDefaults contains no contributions  
>>> but expects
>>> | exactly one contribution.
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user- 
>>> help@jakarta.apache.org
>>
>> -- 
>> Black Dens:
>> 	Where Black Holes live; often unheated warehouses with Day-Glo
>> spray painting, mutilated mannequins, Elvis references, dozens of
>> overflowing ashtrays, mirror sculptures, and Velvet Underground music
>> playing in background.
>> 		-- Douglas Coupland, "Generation X: Tales for an Accelerated
>> 		   Culture"
>> --------------
>> Jason Dyer
>> BlueTarp Financial, inc.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user- 
>> help@jakarta.apache.org
>>
>
> Nick Faiz,
> Developer
> www.q9software.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

Nick Faiz,
Developer
www.q9software.com



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nick Faiz <ni...@q9software.com>.
Andreas,

Yes, I too used the default setting to work around this.

I'm sitting in #tapestry on irc.freenode.net, if you'd like to come  
in and work on your configuration briefly. I can't give you more than  
ten minutes but it might help to have someone to work through the  
problem in real time.

Cheers,
Nick


On 21/02/2006, at 9:12 AM, Jason Dyer wrote:

> I've got tap4+hibernate+hivetranse working.  Do you have the
> TransactionDefaults element?  Here's mine:
>
>   <!-- Default transaction management settings -->
>   <contribution configuration- 
> id="hivetranse.core.TransactionDefaults">
>     <defaults>
>       <exception	name="java.lang.Throwable" rollback="true"/>
>       <method		pattern="*" demarcation="Required"/>
>     </defaults>
>   </contribution>
>
>
> On Monday 20 February 2006 16:47, Andreas Bulling wrote:
>> That's what I searched on google for the last half an hour ;)
>> But unfortunately without success, as even putting
>>
>> <contribution configuration-id="hivemind.ApplicationDefaults">
>>     <default symbol="hivetranse.hibernate3.DeferSessionClose"
>> value="true"/> </contribution>
>>
>> in hivemodule.xml doesn't fix the problem. :(
>>
>> Thanks anyway for your answer!
>>
>> On 20. Feb 2006 - 16:40:02, Wayland Chan wrote:
>> | I don't even know how to use Hivemind but maybe this part of the  
>> stack
>> | trace can shed some light on your problem:
>> |
>> | /META-INF/hivemodule.xml, line 20, column 59: Configuration point
>> | hivetranse.core.TransactionDefaults contains no contributions  
>> but expects
>> | exactly one contribution.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user- 
>> help@jakarta.apache.org
>
> -- 
> Black Dens:
> 	Where Black Holes live; often unheated warehouses with Day-Glo
> spray painting, mutilated mannequins, Elvis references, dozens of
> overflowing ashtrays, mirror sculptures, and Velvet Underground music
> playing in background.
> 		-- Douglas Coupland, "Generation X: Tales for an Accelerated
> 		   Culture"
> --------------
> Jason Dyer
> BlueTarp Financial, inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

Nick Faiz,
Developer
www.q9software.com



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Thanks for your answer and sorry, that's what I wanted to post...
I have that in my hivemodule.xml but the error remains :(
Would you mind send me your hivemodule.xml file?

Sincerly,
  Andreas

On 20. Feb 2006 - 17:12:53, Jason Dyer wrote:
| I've got tap4+hibernate+hivetranse working.  Do you have the 
| TransactionDefaults element?  Here's mine:
| 
|   <!-- Default transaction management settings -->
|   <contribution configuration-id="hivetranse.core.TransactionDefaults">
|     <defaults>
|       <exception	name="java.lang.Throwable" rollback="true"/>
|       <method		pattern="*" demarcation="Required"/>
|     </defaults>
|   </contribution>

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Jason Dyer <jd...@bluetarp.com>.
I've got tap4+hibernate+hivetranse working.  Do you have the 
TransactionDefaults element?  Here's mine:

  <!-- Default transaction management settings -->
  <contribution configuration-id="hivetranse.core.TransactionDefaults">
    <defaults>
      <exception	name="java.lang.Throwable" rollback="true"/>
      <method		pattern="*" demarcation="Required"/>
    </defaults>
  </contribution>


On Monday 20 February 2006 16:47, Andreas Bulling wrote:
> That's what I searched on google for the last half an hour ;)
> But unfortunately without success, as even putting
>
> <contribution configuration-id="hivemind.ApplicationDefaults">
>     <default symbol="hivetranse.hibernate3.DeferSessionClose"
> value="true"/> </contribution>
>
> in hivemodule.xml doesn't fix the problem. :(
>
> Thanks anyway for your answer!
>
> On 20. Feb 2006 - 16:40:02, Wayland Chan wrote:
> | I don't even know how to use Hivemind but maybe this part of the stack
> | trace can shed some light on your problem:
> |
> | /META-INF/hivemodule.xml, line 20, column 59: Configuration point
> | hivetranse.core.TransactionDefaults contains no contributions but expects
> | exactly one contribution.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org

-- 
Black Dens:
	Where Black Holes live; often unheated warehouses with Day-Glo
spray painting, mutilated mannequins, Elvis references, dozens of
overflowing ashtrays, mirror sculptures, and Velvet Underground music
playing in background.
		-- Douglas Coupland, "Generation X: Tales for an Accelerated
		   Culture"
--------------
Jason Dyer
BlueTarp Financial, inc.

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 20. Feb 2006 - 11:09:39, James Carman wrote:
| Well, that's one of my goals, to help make Trails less "magical."  It does
| do some pretty cool stuff behind the scenes and I feel your pain.  I just
| recently joined the project and it has taken me quite a while to understand
| how it all works.  I don't even understand it all yet.  I'm currently trying
| to figure out how to make it more intuitive (it does have my EntitySqueezer
| implementation in it, though). 

Well, I didn't want to bash trails as I'm sure it's a great approach!
Its just that I don't like those magic-things that much because I
need and want the feeling that everything is in my hands and I can fully
understand what's going on. And only after having read the two articles
there was too much "magic" for me ;)

But anyway I just downloaded trails and perhaps I can use some of their configuration
files or at least take a look on how they achieved things.

Sincerly,
  Andreas

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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
Well, that's one of my goals, to help make Trails less "magical."  It does
do some pretty cool stuff behind the scenes and I feel your pain.  I just
recently joined the project and it has taken me quite a while to understand
how it all works.  I don't even understand it all yet.  I'm currently trying
to figure out how to make it more intuitive (it does have my EntitySqueezer
implementation in it, though). 

-----Original Message-----
From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
Andreas Bulling
Sent: Monday, February 20, 2006 11:07 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

On 20. Feb 2006 - 10:53:22, James Carman wrote:
| Have you checked out the Trails framework (https://trails.dev.java.net/)?
| I'm also a committer on that project and it's a good way for you to
| jump-start your way into Tapestry, Spring, Hibernate, and I'm trying to
get
| them to use HiveMind more (they like to use AspectJ a lot and that's one
| reason they're sticking with Spring).

Yeah, I also looked at Trails and read the two java.net articles.
But I read somewhere that only a part of Tapestry's components
is supported/implemented and for my taste Trails was doing a little bit
too much magic with less possibility to look behind the scenes
(after a very short look at it).

Perhaps I should look at it a second time if I can't get Spring to
work here... *sigh*

Sincerly,
  Andreas

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



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 20. Feb 2006 - 10:53:22, James Carman wrote:
| Have you checked out the Trails framework (https://trails.dev.java.net/)?
| I'm also a committer on that project and it's a good way for you to
| jump-start your way into Tapestry, Spring, Hibernate, and I'm trying to get
| them to use HiveMind more (they like to use AspectJ a lot and that's one
| reason they're sticking with Spring).

Yeah, I also looked at Trails and read the two java.net articles.
But I read somewhere that only a part of Tapestry's components
is supported/implemented and for my taste Trails was doing a little bit
too much magic with less possibility to look behind the scenes
(after a very short look at it).

Perhaps I should look at it a second time if I can't get Spring to
work here... *sigh*

Sincerly,
  Andreas

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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
Trails already uses Tapestry 4.  The version in the lib directory is the
beta, though.  We need to upgrade to the "full" version.
 

-----Original Message-----
From: Wayland Chan [mailto:wayland.chan@gmail.com] 
Sent: Monday, February 20, 2006 12:51 PM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

I was looking at the Trails mailing list this morning and the activity on
that project seems to have *trailed* off ;)

I was thinking of using it to jumpstart/build a skeleton T4+Hib3+Spring app
but when I saw how long it hadn't been updated, I figured there's no way
it's using T4 yet.

James, do you know if there's any developer rumblings on updating it for T4
yet?

On 2/20/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> Have you checked out the Trails framework (https://trails.dev.java.net/)?
> I'm also a committer on that project and it's a good way for you to
> jump-start your way into Tapestry, Spring, Hibernate, and I'm trying to
> get
> them to use HiveMind more (they like to use AspectJ a lot and that's one
> reason they're sticking with Spring).
>



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Wayland Chan <wa...@gmail.com>.
I was looking at the Trails mailing list this morning and the activity on
that project seems to have *trailed* off ;)

I was thinking of using it to jumpstart/build a skeleton T4+Hib3+Spring app
but when I saw how long it hadn't been updated, I figured there's no way
it's using T4 yet.

James, do you know if there's any developer rumblings on updating it for T4
yet?

On 2/20/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> Have you checked out the Trails framework (https://trails.dev.java.net/)?
> I'm also a committer on that project and it's a good way for you to
> jump-start your way into Tapestry, Spring, Hibernate, and I'm trying to
> get
> them to use HiveMind more (they like to use AspectJ a lot and that's one
> reason they're sticking with Spring).
>

Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
That's what I searched on google for the last half an hour ;)
But unfortunately without success, as even putting

<contribution configuration-id="hivemind.ApplicationDefaults">
    <default symbol="hivetranse.hibernate3.DeferSessionClose" value="true"/>
</contribution>

in hivemodule.xml doesn't fix the problem. :(

Thanks anyway for your answer!

On 20. Feb 2006 - 16:40:02, Wayland Chan wrote:
| I don't even know how to use Hivemind but maybe this part of the stack trace
| can shed some light on your problem:
| 
| /META-INF/hivemodule.xml, line 20, column 59: Configuration point
| hivetranse.core.TransactionDefaults contains no contributions but expects
| exactly one contribution.

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Wayland Chan <wa...@gmail.com>.
I don't even know how to use Hivemind but maybe this part of the stack trace
can shed some light on your problem:

/META-INF/hivemodule.xml, line 20, column 59: Configuration point
hivetranse.core.TransactionDefaults contains no contributions but expects
exactly one contribution.



On 2/20/06, Andreas Bulling <sp...@phoenix.hadiko.de> wrote:
>
> Hi Lutz,
>
> | wow, this thread is really wandering off a bit... I will at least try
> | to stick to the point.
>
> That's right. But anyway very useful/interesting for many people as I'm
> not
> the only one struggling with problems as it seems. ;)
>
> Let me describe what I did in the meanwhile:
> I've set up everything _with Spring_ and at least I got further than using
> Hivemind (means: For the first time Hibernate created the database tables!
> jipii).
>
> But even at this early point I think that Spring is very probably too
> big for my needs... Well, as its not a big issue to switch back to
> Hivemind (by just removing the tapestry-spring and spring jars and
> re-enabling some hivemodule.xml configuration) I decided to try that.
> Call me a masochist but now _I_ _just_ _want_ _to_ _know_ :)
>
> Now, I'm using HiveTrans (as this seems to be the easiest solution)
> and followed the documentation on
> http://hivetranse.sourceforge.net/quickstart.html
>
> I've put all necessary libraries under WEB-INF/lib but receive
> the following error message, now:
> ---
> javax.servlet.ServletException: Unable to initialize application servlet:
> Error at
> jar:file:/home/andreas/workspace/ecgplattformng/context/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
> line 20, column 59: Configuration point
> hivetranse.core.TransactionDefaults contains no contributions but expects
> exactly one contribution.
>         org.apache.tapestry.ApplicationServlet.init(
> ApplicationServlet.java:206)
>         org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:118)
>         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java
> :160)
>         org.apache.coyote.http11.Http11Processor.process(
> Http11Processor.java:799)
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
> (Http11Protocol.java:705)
>         org.apache.tomcat.util.net.TcpWorkerThread.runIt(
> PoolTcpEndpoint.java:577)
>         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:683)
>         java.lang.Thread.run(Thread.java:595)
>
> root cause
>
> org.apache.hivemind.ApplicationRuntimeException: Error at
> jar:file:/home/andreas/workspace/ecgplattformng/context/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
> line 20, column 59: Configuration point
> hivetranse.core.TransactionDefaults contains no contributions but expects
> exactly one contribution.
> [jar:file:/home/andreas/workspace/ecgplattformng/context/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
> line 20, column 59]
>         org.apache.hivemind.impl.StrictErrorHandler.error(
> StrictErrorHandler.java:39)
>
> org.apache.hivemind.impl.RegistryInfrastructureConstructor.checkContributionCounts
> (RegistryInfrastructureConstructor.java:678)
>
> org.apache.hivemind.impl.RegistryInfrastructureConstructor.constructRegistryInfrastructure
> (RegistryInfrastructureConstructor.java:180)
>         org.apache.hivemind.impl.RegistryBuilder.constructRegistry(
> RegistryBuilder.java:151)
>         org.apache.tapestry.ApplicationServlet.constructRegistry(
> ApplicationServlet.java:253)
>         org.apache.tapestry.ApplicationServlet.init(
> ApplicationServlet.java:194)
>         org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:118)
>         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java
> :160)
>         org.apache.coyote.http11.Http11Processor.process(
> Http11Processor.java:799)
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
> (Http11Protocol.java:705)
>         org.apache.tomcat.util.net.TcpWorkerThread.runIt(
> PoolTcpEndpoint.java:577)
>         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:683)
>         java.lang.Thread.run(Thread.java:595)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Daniel Lydiard <dl...@hotmail.com>.
I've working on an application right now using T4+hibernate+spring and have 
0 problems with it.  I didn't read all of the thread, but what problems were 
you having?

I used the tapestry-spring.jar found here 
http://wiki.apache.org/jakarta-tapestry/Tapestry4Spring I haven't tried 
Howard's version yet 
(http://howardlewisship.com/tapestry-javaforge/tapestry-spring/).

Some other tips are:
Use OpenSessionInViewFilter 
http://wiki.apache.org/jakarta-tapestry/FrequentlyAskedQuestions/SpringHibernate 
to prevent Lazy Loading exceptions.

Make sure you read the documentation for Spring's OpenSessionInViewFilter 
carefully
http://www.springframework.org/docs/api/org/springframework/orm/hibernate/support/OpenSessionInViewFilter.html

I extended OpenSessionInViewFilter  like this:
 protected Session getSession(SessionFactory sessionFactory) throws 
DataAccessResourceFailureException {
    Session session = super.getSession(sessionFactory);
    session.setFlushMode(FlushMode.AUTO);
    return session;
  }

  protected void closeSession(Session session, SessionFactory 
sessionFactory) {
    session.flush();
    super.closeSession(session, sessionFactory);
  }

This prevents FlushMode.NONE exceptions, and prevents commits not showing up 
in the database.



----- Original Message ----- 
From: "Andreas Bulling" <sp...@phoenix.hadiko.de>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, February 20, 2006 1:24 PM
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry


> Hi Lutz,
>
> | wow, this thread is really wandering off a bit... I will at least try
> | to stick to the point.
>
> That's right. But anyway very useful/interesting for many people as I'm 
> not
> the only one struggling with problems as it seems. ;)
>
> Let me describe what I did in the meanwhile:
> I've set up everything _with Spring_ and at least I got further than using
> Hivemind (means: For the first time Hibernate created the database tables! 
> jipii).
>
> But even at this early point I think that Spring is very probably too
> big for my needs... Well, as its not a big issue to switch back to
> Hivemind (by just removing the tapestry-spring and spring jars and
> re-enabling some hivemodule.xml configuration) I decided to try that.
> Call me a masochist but now _I_ _just_ _want_ _to_ _know_ :)
>
> Now, I'm using HiveTrans (as this seems to be the easiest solution)
> and followed the documentation on
> http://hivetranse.sourceforge.net/quickstart.html
>
> I've put all necessary libraries under WEB-INF/lib but receive
> the following error message, now:
> ---
> javax.servlet.ServletException: Unable to initialize application servlet: 
> Error at 
> jar:file:/home/andreas/workspace/ecgplattformng/context/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml, 
> line 20, column 59: Configuration point 
> hivetranse.core.TransactionDefaults contains no contributions but expects 
> exactly one contribution.
> org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:206)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> java.lang.Thread.run(Thread.java:595)
>
> root cause
>
> org.apache.hivemind.ApplicationRuntimeException: Error at 
> jar:file:/home/andreas/workspace/ecgplattformng/context/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml, 
> line 20, column 59: Configuration point 
> hivetranse.core.TransactionDefaults contains no contributions but expects 
> exactly one contribution. 
> [jar:file:/home/andreas/workspace/ecgplattformng/context/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml, 
> line 20, column 59]
> org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39)
> org.apache.hivemind.impl.RegistryInfrastructureConstructor.checkContributionCounts(RegistryInfrastructureConstructor.java:678)
> org.apache.hivemind.impl.RegistryInfrastructureConstructor.constructRegistryInfrastructure(RegistryInfrastructureConstructor.java:180)
> org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:151)
> org.apache.tapestry.ApplicationServlet.constructRegistry(ApplicationServlet.java:253)
> org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:194)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> java.lang.Thread.run(Thread.java:595)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
> 

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Hi Lutz,

| wow, this thread is really wandering off a bit... I will at least try
| to stick to the point.

That's right. But anyway very useful/interesting for many people as I'm not
the only one struggling with problems as it seems. ;)

Let me describe what I did in the meanwhile:
I've set up everything _with Spring_ and at least I got further than using
Hivemind (means: For the first time Hibernate created the database tables! jipii).

But even at this early point I think that Spring is very probably too
big for my needs... Well, as its not a big issue to switch back to
Hivemind (by just removing the tapestry-spring and spring jars and
re-enabling some hivemodule.xml configuration) I decided to try that.
Call me a masochist but now _I_ _just_ _want_ _to_ _know_ :)

Now, I'm using HiveTrans (as this seems to be the easiest solution)
and followed the documentation on
http://hivetranse.sourceforge.net/quickstart.html

I've put all necessary libraries under WEB-INF/lib but receive
the following error message, now:
---
javax.servlet.ServletException: Unable to initialize application servlet: Error at jar:file:/home/andreas/workspace/ecgplattformng/context/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml, line 20, column 59: Configuration point hivetranse.core.TransactionDefaults contains no contributions but expects exactly one contribution.
	org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:206)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
	org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
	org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	java.lang.Thread.run(Thread.java:595)

root cause

org.apache.hivemind.ApplicationRuntimeException: Error at jar:file:/home/andreas/workspace/ecgplattformng/context/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml, line 20, column 59: Configuration point hivetranse.core.TransactionDefaults contains no contributions but expects exactly one contribution. [jar:file:/home/andreas/workspace/ecgplattformng/context/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml, line 20, column 59]
	org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39)
	org.apache.hivemind.impl.RegistryInfrastructureConstructor.checkContributionCounts(RegistryInfrastructureConstructor.java:678)
	org.apache.hivemind.impl.RegistryInfrastructureConstructor.constructRegistryInfrastructure(RegistryInfrastructureConstructor.java:180)
	org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:151)
	org.apache.tapestry.ApplicationServlet.constructRegistry(ApplicationServlet.java:253)
	org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:194)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
	org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
	org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
	org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	java.lang.Thread.run(Thread.java:595)

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Lutz Hühnken <lh...@googlemail.com>.
Hi Andreas,

wow, this thread is really wandering off a bit... I will at least try
to stick to the point.

1. Regarding your stack trace posted earlier: Is commons-logging.jar
in your lib directory? You really want to check your 3rd party
libraries... see 2.

2. ClassLoaders are a broad topic... but for now, I suggest you put
all your 3rd party libraries in your <your_project>/WEB-INF/lib
directory. Including your mysql driver. As they say on
"http://www.hibernate.org/114.html":
> Copy hibernate3.jar into your WEB-inf/lib directory and with it all required
> 3rd party libraries (see lib/README.txt in the Hibernate distribution).
> Don't forget to also copy your JDBC driver to WEB-INF/lib. Never ever
> copy anything in Tomcat into a global directory outside of your web
> application or you are in classloader hell!

3. About Spring or not: Ok, let's just let Spring out of it for now.
You don't seem to need it, and there is some overlap in the services
that they (Spring and Hivemind) provide, so some people might consider
it not to be the most beautiful solution to use them both at the same
time.
Just Hivemind, Tapestry and Hibernate now. Spring maybe later. Trails
some other time.

> this whole issue for more than a week now (perhaps you've read my first
> postings concering EJB's)

4. No I haven't. I just joined the mailing list today. That's why I'm
so happily typing away about things I know so little about. I hope
people don't mind.

> 1) OK, the first error is:
> ---
> 16:42:46,715  WARN SettingsFactory:103 - Could not obtain connection metadata
> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'

5. Well, it seems your connection pool doesn't find the JDBC driver.
Maybe in different lib directories? See 2.
That might also be the reason for the other error message you posted.

So, to sum things up:
- forget about Spring for now
- make sure you got all necessary 3rd party libraries
- put them all in WEB-INF/lib

Hth,

Lutz

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Peter Svensson <ps...@gmail.com>.
I'm quite new to tapestry, but the solution I've tried very succesfully is
to check out latest trails from its subversion repository and get formy
purposes transparent integration with hibernate.

The only thing I do is try to be coherent when using JSR-220/Hib annotions.

And also quite nice working security :)

One doesn't _have_ to use the automatic CRUD pages which trails provide, but
they are mostly enough, actually.

Apologies for bicycling on deep water,

Cheers,
PS

On 2/22/06, Wayland Chan <wa...@gmail.com> wrote:
>
> This topic has strayed quite a bit. You're trying to integrate Hibernate
> and
> Tapestry, someone has suggested you try using Appfuse (or Equinox).
>
> I see no reason why Appfuse/Equinox shouldn't get you up and running with
> a
> tapestry application integrated with Hibernate. Maybe you can be a bit
> more
> explicit in regards to what "questions" of yours that it doesn't answer.
>
> You've refactored so many times to try different things, each time
> unsuccessful. I would suggest maybe using a small sample application to
> get
> started and prototype the integration you're after. After that's working,
> then add your application code. I venture to guess that after refactoring
> several times, your codebase might be a bit 'untidy' now.
>
>
> On 2/20/06, Andreas Bulling <sp...@phoenix.hadiko.de> wrote:
> >
> > | - if you have decided that you need Spring, for AOP or else, but are
> > | put off by some exceptions you have been getting, don't give up so
> > | easily. Check again if you have all required libraries installed
> > | (missing libraries seem to have been the reasons for the first errors
> > | you have been posting). Have a look at AppFuse and "betterpetstore" to
> > | see how the three tools Tapestry, Spring and Hibernate are used
> > | together there.
> >
> > *sigh*
> > I can tell you: I definitely don't give up so easily. I'm fighting with
> > this whole issue for more than a week now (perhaps you've read my first
> > postings concering EJB's), refactored my whole code three times now
> > and read tons of documents/example code/etc.
> > I also looked at AppFuse but also that code didn't answer all my
> > questions. :(
> >
> >
>
>

Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Wayland Chan <wa...@gmail.com>.
This topic has strayed quite a bit. You're trying to integrate Hibernate and
Tapestry, someone has suggested you try using Appfuse (or Equinox).

I see no reason why Appfuse/Equinox shouldn't get you up and running with a
tapestry application integrated with Hibernate. Maybe you can be a bit more
explicit in regards to what "questions" of yours that it doesn't answer.

You've refactored so many times to try different things, each time
unsuccessful. I would suggest maybe using a small sample application to get
started and prototype the integration you're after. After that's working,
then add your application code. I venture to guess that after refactoring
several times, your codebase might be a bit 'untidy' now.


On 2/20/06, Andreas Bulling <sp...@phoenix.hadiko.de> wrote:
>
> | - if you have decided that you need Spring, for AOP or else, but are
> | put off by some exceptions you have been getting, don't give up so
> | easily. Check again if you have all required libraries installed
> | (missing libraries seem to have been the reasons for the first errors
> | you have been posting). Have a look at AppFuse and "betterpetstore" to
> | see how the three tools Tapestry, Spring and Hibernate are used
> | together there.
>
> *sigh*
> I can tell you: I definitely don't give up so easily. I'm fighting with
> this whole issue for more than a week now (perhaps you've read my first
> postings concering EJB's), refactored my whole code three times now
> and read tons of documents/example code/etc.
> I also looked at AppFuse but also that code didn't answer all my
> questions. :(
>
>

RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
Have you checked out the Trails framework (https://trails.dev.java.net/)?
I'm also a committer on that project and it's a good way for you to
jump-start your way into Tapestry, Spring, Hibernate, and I'm trying to get
them to use HiveMind more (they like to use AspectJ a lot and that's one
reason they're sticking with Spring).

-----Original Message-----
From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
Andreas Bulling
Sent: Monday, February 20, 2006 10:50 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Hi Lutz,

also thanks for your answer!

| - if the HibernateTemplate is your only reason to use Spring, I'd say,
| don't. Of all the features of Spring, I think this template is a
| rather not-so-interesting one, since it offers rather little advantage
| over Hibernate's own API.

Well, at least at the moment where I just want _something_ to work
it's the only reason. As you mentioned other things like mail, AOPs
etc.: Perhaps that's also relevant for me in the future but at the
moment I just don't know.

| - if you have decided that you need Spring, for AOP or else, but are
| put off by some exceptions you have been getting, don't give up so
| easily. Check again if you have all required libraries installed
| (missing libraries seem to have been the reasons for the first errors
| you have been posting). Have a look at AppFuse and "betterpetstore" to
| see how the three tools Tapestry, Spring and Hibernate are used
| together there. 

*sigh*
I can tell you: I definitely don't give up so easily. I'm fighting with
this whole issue for more than a week now (perhaps you've read my first
postings concering EJB's), refactored my whole code three times now
and read tons of documents/example code/etc.
I also looked at AppFuse but also that code didn't answer all my questions.
:(

The problem is that there is a bunch of information regarding the different
issues but no single up-to-date document describing for example the
Tapestry-Hivemind-Hibernate setup procedure step-by-step or a good
example app (which would be very helpful to beginners like me). That's
why one has to ask so many questions. ;)

| What was the current state of things again? The last stack trace you
| posted doesn't seem to give helpful information. Not to me, anyway. Is
| maybe something wrong with your applicationContext.xml?

1) OK, the first error is:
---
16:42:46,715  WARN SettingsFactory:103 - Could not obtain connection
metadata
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class
'org.gjt.mm.mysql.Driver'
---
But I have mysql-connector-java-3.1.12-bin.jar in shared/libs in the tomcat
directory.

applicationContext.xml:
[...]
<!-- DataSource -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
	<property name="driverClassName" value="org.gjt.mm.mysql.Driver" />
	<property name="url" value="jdbc:mysql://localhost/project" />
	<property name="username" value="username" />
	<property name="password" value="password" />
	<property name="maxActive" value="100" />
	<property name="maxIdle" value="30" />
	<property name="maxWait" value="1000" />
	<property name="defaultAutoCommit" value="true" />
	<property name="removeAbandoned" value="true" />
	<property name="removeAbandonedTimeout" value="60" />
	<property name="logAbandoned" value="true" />
</bean>
[...]

2) The second one is:
---
javax.servlet.ServletException: Unable to initialize application servlet:
Unable to construct
service com.javaforge.tapestry.spring.ApplicationContextSource: Error
building service
com.javaforge.tapestry.spring.ApplicationContextSource: Error at
jar:file:/var/lib/tomcat-5/default/shared/lib/tapestry-spring-0.1.1.jar!/MET
A-INF/hivemodule.xml,
line 29, column 57: Unable to initialize service
com.javaforge.tapestry.spring.ApplicationContextSource
(by invoking method initializeService on
com.javaforge.tapestry.spring.ApplicationContextSource):
Error creating bean with name 'sessionFactory' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]:
Initialization of bean failed; nested exception is
java.lang.NoClassDefFoundError: null
---

And to tell the truth: I just have no idea if applicationContext.xml is
wrong.
I posted the sessionFactory part in a previous mail - what else do you need
to
(perhaps) locate the problem?

Sincerly,
  Andreas

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



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Hi Lutz,

also thanks for your answer!

| - if the HibernateTemplate is your only reason to use Spring, I'd say,
| don't. Of all the features of Spring, I think this template is a
| rather not-so-interesting one, since it offers rather little advantage
| over Hibernate's own API.

Well, at least at the moment where I just want _something_ to work
it's the only reason. As you mentioned other things like mail, AOPs
etc.: Perhaps that's also relevant for me in the future but at the
moment I just don't know.

| - if you have decided that you need Spring, for AOP or else, but are
| put off by some exceptions you have been getting, don't give up so
| easily. Check again if you have all required libraries installed
| (missing libraries seem to have been the reasons for the first errors
| you have been posting). Have a look at AppFuse and "betterpetstore" to
| see how the three tools Tapestry, Spring and Hibernate are used
| together there. 

*sigh*
I can tell you: I definitely don't give up so easily. I'm fighting with
this whole issue for more than a week now (perhaps you've read my first
postings concering EJB's), refactored my whole code three times now
and read tons of documents/example code/etc.
I also looked at AppFuse but also that code didn't answer all my questions. :(

The problem is that there is a bunch of information regarding the different
issues but no single up-to-date document describing for example the
Tapestry-Hivemind-Hibernate setup procedure step-by-step or a good
example app (which would be very helpful to beginners like me). That's
why one has to ask so many questions. ;)

| What was the current state of things again? The last stack trace you
| posted doesn't seem to give helpful information. Not to me, anyway. Is
| maybe something wrong with your applicationContext.xml?

1) OK, the first error is:
---
16:42:46,715  WARN SettingsFactory:103 - Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
---
But I have mysql-connector-java-3.1.12-bin.jar in shared/libs in the tomcat directory.

applicationContext.xml:
[...]
<!-- DataSource -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
	<property name="driverClassName" value="org.gjt.mm.mysql.Driver" />
	<property name="url" value="jdbc:mysql://localhost/project" />
	<property name="username" value="username" />
	<property name="password" value="password" />
	<property name="maxActive" value="100" />
	<property name="maxIdle" value="30" />
	<property name="maxWait" value="1000" />
	<property name="defaultAutoCommit" value="true" />
	<property name="removeAbandoned" value="true" />
	<property name="removeAbandonedTimeout" value="60" />
	<property name="logAbandoned" value="true" />
</bean>
[...]

2) The second one is:
---
javax.servlet.ServletException: Unable to initialize application servlet: Unable to construct
service com.javaforge.tapestry.spring.ApplicationContextSource: Error building service
com.javaforge.tapestry.spring.ApplicationContextSource: Error at jar:file:/var/lib/tomcat-5/default/shared/lib/tapestry-spring-0.1.1.jar!/META-INF/hivemodule.xml,
line 29, column 57: Unable to initialize service com.javaforge.tapestry.spring.ApplicationContextSource
(by invoking method initializeService on com.javaforge.tapestry.spring.ApplicationContextSource):
Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]:
Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: null
---

And to tell the truth: I just have no idea if applicationContext.xml is wrong.
I posted the sessionFactory part in a previous mail - what else do you need to
(perhaps) locate the problem?

Sincerly,
  Andreas

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Hey you're quite optimistic. That's very refreshing as I got more and more
pessimistic during the last week ;) Thanks, I will try and report...

On 20. Feb 2006 - 11:35:41, James Carman wrote:
| Here's a list of the jars I have in my WEB-INF/lib directory of my project.
| Not all of them will be required, but if you have them, I know it will work!
| :-)
| 
| antlr-2.7.6rc1.jar           hibernate-annotations.jar
| asm-attrs.jar                hivemind-1.1.1.jar
| asm.jar                      hivemind-jmx-1.1.1.jar
| c3p0-0.9.0.jar               hivemind-lib-1.1.1.jar
| cglib-2.1.2.jar              jakarta-oro-2.0.8.jar
| commons-codec-1.3.jar        javassist.jar
| commons-collections-3.1.jar  jta.jar
| commons-dbcp-1.2.1.jar       log4j-1.2.8.jar
| commons-lang-2.1.jar         mysql-connector-java-3.1.8-bin.jar
| commons-logging.jar          ognl-2.6.7.jar
| commons-pool-1.2.jar         spring.jar
| dom4j-1.6.1.jar              tapestry-4.0.jar
| ehcache-1.1.jar              tapestry-annotations-4.0.jar
| ejb3-persistence.jar         tapestry-contrib-4.0.jar
| hibernate3.jar               tapestry-portlet-4.0.jar

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by John Coleman <jo...@ntlworld.com>.
You may want to keep an eye on this if you use Eclipse to dev Tapestry and
want to use Hibernate;

http://www.eclipse.org/jsr220orm/hibernate.html

John



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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
Here's a list of the jars I have in my WEB-INF/lib directory of my project.
Not all of them will be required, but if you have them, I know it will work!
:-)

antlr-2.7.6rc1.jar           hibernate-annotations.jar
asm-attrs.jar                hivemind-1.1.1.jar
asm.jar                      hivemind-jmx-1.1.1.jar
c3p0-0.9.0.jar               hivemind-lib-1.1.1.jar
cglib-2.1.2.jar              jakarta-oro-2.0.8.jar
commons-codec-1.3.jar        javassist.jar
commons-collections-3.1.jar  jta.jar
commons-dbcp-1.2.1.jar       log4j-1.2.8.jar
commons-lang-2.1.jar         mysql-connector-java-3.1.8-bin.jar
commons-logging.jar          ognl-2.6.7.jar
commons-pool-1.2.jar         spring.jar
dom4j-1.6.1.jar              tapestry-4.0.jar
ehcache-1.1.jar              tapestry-annotations-4.0.jar
ejb3-persistence.jar         tapestry-contrib-4.0.jar
hibernate3.jar               tapestry-portlet-4.0.jar


-----Original Message-----
From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
Andreas Bulling
Sent: Monday, February 20, 2006 11:34 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Some more lines of the stack trace:
---
17:32:04,141 ERROR ContextLoader:205 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'sessionFactory' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested
exception is java.lang.NoClassDefFoundError: null
java.lang.NoClassDefFoundError
        at
org.hibernate.tuple.EntityMetamodel.class$(EntityMetamodel.java:41)
        at
org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:122)
        at
org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntity
Persister.java:412)
        at
org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTable
EntityPersister.java:108)
        at
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFacto
ry.java:55)
        at
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:215)
        at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory
(LocalSessionFactoryBean.java:800)
        at
org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSe
t(LocalSessionFactoryBean.java:726)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
.createBean(AbstractAutowireCapableBeanFactory.java:363)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:226)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstra
ctBeanFactory.java:147)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInst
antiateSingletons(DefaultListableBeanFactory.java:269)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:320)
        at
org.springframework.web.context.support.AbstractRefreshableWebApplicationCon
text.refresh(AbstractRefreshableWebApplicationContext.java:134)
        at
org.springframework.web.context.ContextLoader.createWebApplicationContext(Co
ntextLoader.java:246)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(Cont
extLoader.java:184)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(Con
textLoaderListener.java:49)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3827)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
        at
org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeployer.jav
a:830)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:991)
        at
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1322)
        at
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java
:530)
        at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java
:104)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


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



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Some more lines of the stack trace:
---
17:32:04,141 ERROR ContextLoader:205 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: null
java.lang.NoClassDefFoundError
        at org.hibernate.tuple.EntityMetamodel.class$(EntityMetamodel.java:41)
        at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:122)
        at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)
        at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
        at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:215)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:800)
        at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:726)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:269)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
        at org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeployer.java:830)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:991)
        at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1322)
        at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:530)
        at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:104)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Lutz Hühnken <lh...@googlemail.com>.
Hi Andreas,

> If I don't necessarily need HibernateTemplates should I use
> Hivemind oder Spring? In which features do they differ, which is
> easier to set up? *I've read many articles concerning this issue
> but it's still not clear to me*

About Spring vs. Hivemind

As far as I understand, Spring goes beyond Hivemind. Hivemind offers a
neat way of using Dependency Injection. Spring does that, too, but it
also offers Spring AOP, and a whole bunch of convenient templates and
utilities to simplify development, not only for persistence, but also
for mail, messaging, etc. There is probably a lot more to be said
about both, but since that would be only very loosely related to
Tapestry, maybe a Spring or Hivemind forum would be a better place to
discuss it in detail.

Concerning your problem:

- if the HibernateTemplate is your only reason to use Spring, I'd say,
don't. Of all the features of Spring, I think this template is a
rather not-so-interesting one, since it offers rather little advantage
over Hibernate's own API.

- if you have decided that you need Spring, for AOP or else, but are
put off by some exceptions you have been getting, don't give up so
easily. Check again if you have all required libraries installed
(missing libraries seem to have been the reasons for the first errors
you have been posting). Have a look at AppFuse and "betterpetstore" to
see how the three tools Tapestry, Spring and Hibernate are used
together there.

What was the current state of things again? The last stack trace you
posted doesn't seem to give helpful information. Not to me, anyway. Is
maybe something wrong with your applicationContext.xml?

Hth,

Lutz

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nick Faiz <ni...@q9software.com>.
Yes, but using annotations to set up transactions is a nice feature,  
but it's not necessary. Putting annotatons aside, it's not very  
difficult to map a transaction in XML in either Hivemind or Spring.

I would need a further reason to justify adding a second IoC  
framework to the application.

Cheers,
Nick



On 21/02/2006, at 2:06 AM, James Carman wrote:

> You can certainly use a TransactionInterceptor (and HiveUtils has  
> one of
> these), but it won't be automatically added to your HiveMind-managed
> services like it will in Spring.
>
> -----Original Message-----
> From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
> Andreas Bulling
> Sent: Monday, February 20, 2006 10:00 AM
> To: Tapestry users
> Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry
>
> Hi Richard,
>
> first, thanks for your answer!
>
> | I have succesfully used HiveMind and Spring together with  
> Tapestry and
> | Hibernate. I used Spring for this HibernateTemplate and  
> transactional
> | support, so just defined DAOs in Spring. I used HiveMind to  
> define all
> | other services, and using the HiveMind-Spring connector library,  
> it was
> | simple to inject the Spring DAOs into the HiveMind services that  
> needed
> | them.
>
> Uh, that sounds even more complex to me :(
>
> | However, I am not completely happy with this as a solution, as it is
> | unnecessarily complex, and I have not solved how to inject HiveMind
> | services into Spring so there is a natural disconnect there. With
> | hivetrans, it is likely that I will drop Spring altogether and  
> just use
> | HiveMind. As you don't appear to want HibernateTemplate, I would  
> suggest
> | just sticking with HiveMind, which is a little harder initially  
> to pick
> | up than Spring, but IMO a more productive solution once you grok it.
> | Particularly as HiveMind is integral to Tapestry.
>
> Well, at least I _think_ that I don't need HibernateTemplates...
> What's the good thing about them besides "clear application layering"
> as mentioned in the spring reference documentation?
>
> And what about the interceptor stuff and session/transaction handling?
> Is this also possible with Hivemind/do drop-in solutions already  
> exist?
>
> Thanks!
>   Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

Nick Faiz,
Developer
www.q9software.com



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Thank also for your answer - with every posting I read I get another part
of the puzzle...

| It is right the HiveMind Utilities do not provide the same level of features
| to HiveMind that Spring provides to itself! And I don't believe it will one
| day. As far as I can say, Spring is becoming the elephant that it was
| supposed to kill, and I think it is harder and harder to get into it (but I
| don't want to start a war here, so please no flame;-)).

I didn't want to start a war with my questions either and I hope that
there won't be anything like that!

Sincerly,
  Andreas

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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
The autoproxy issue has already been brought up on the HiveMind developers
list (by me).  I really think we should try to implement this, as it really
makes configuration easy when used in conjunction with annotations.

-----Original Message-----
From: Jean-Francois Poilpret [mailto:jfpoilpret@hcm.vnn.vn] 
Sent: Monday, February 20, 2006 10:25 AM
To: 'Tapestry users'
Subject: RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Hi all,

Just one point (I talk as the author of HiveMind Utilities) I want to
emphasize about auto-proxying: this is not a feature that HiveUtils can
bring by itself, it belongs to the container (ie HiveMind). When/if HiveMind
provides it, then HiveMind Utilities will provide it;-)

Personnally (but I don't use Tapestry by itself, I just use HiveMind), I do
not like much the idea of putting HiveMind + Spring together in the same
application (and I would add that I don't like Spring XML config files: they
are very obscure, compared with what you can do with HiveMind).

It is right the HiveMind Utilities do not provide the same level of features
to HiveMind that Spring provides to itself! And I don't believe it will one
day. As far as I can say, Spring is becoming the elephant that it was
supposed to kill, and I think it is harder and harder to get into it (but I
don't want to start a war here, so please no flame;-)).

Just my 2 Dongs (and that is really not much!)

	Jean-Francois

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: Monday, February 20, 2006 10:06 PM
To: 'Tapestry users'
Subject: RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

You can certainly use a TransactionInterceptor (and HiveUtils has one of
these), but it won't be automatically added to your HiveMind-managed
services like it will in Spring.

-----Original Message-----
From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
Andreas Bulling
Sent: Monday, February 20, 2006 10:00 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Hi Richard,

first, thanks for your answer!

| I have succesfully used HiveMind and Spring together with Tapestry and 
| Hibernate. I used Spring for this HibernateTemplate and transactional 
| support, so just defined DAOs in Spring. I used HiveMind to define all 
| other services, and using the HiveMind-Spring connector library, it was 
| simple to inject the Spring DAOs into the HiveMind services that needed 
| them.

Uh, that sounds even more complex to me :(

| However, I am not completely happy with this as a solution, as it is 
| unnecessarily complex, and I have not solved how to inject HiveMind 
| services into Spring so there is a natural disconnect there. With 
| hivetrans, it is likely that I will drop Spring altogether and just use 
| HiveMind. As you don't appear to want HibernateTemplate, I would suggest 
| just sticking with HiveMind, which is a little harder initially to pick 
| up than Spring, but IMO a more productive solution once you grok it. 
| Particularly as HiveMind is integral to Tapestry.

Well, at least I _think_ that I don't need HibernateTemplates...
What's the good thing about them besides "clear application layering"
as mentioned in the spring reference documentation?

And what about the interceptor stuff and session/transaction handling?
Is this also possible with Hivemind/do drop-in solutions already exist?

Thanks!
  Andreas


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



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




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



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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Jean-Francois Poilpret <jf...@hcm.vnn.vn>.
Hi all,

Just one point (I talk as the author of HiveMind Utilities) I want to
emphasize about auto-proxying: this is not a feature that HiveUtils can
bring by itself, it belongs to the container (ie HiveMind). When/if HiveMind
provides it, then HiveMind Utilities will provide it;-)

Personnally (but I don't use Tapestry by itself, I just use HiveMind), I do
not like much the idea of putting HiveMind + Spring together in the same
application (and I would add that I don't like Spring XML config files: they
are very obscure, compared with what you can do with HiveMind).

It is right the HiveMind Utilities do not provide the same level of features
to HiveMind that Spring provides to itself! And I don't believe it will one
day. As far as I can say, Spring is becoming the elephant that it was
supposed to kill, and I think it is harder and harder to get into it (but I
don't want to start a war here, so please no flame;-)).

Just my 2 Dongs (and that is really not much!)

	Jean-Francois

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: Monday, February 20, 2006 10:06 PM
To: 'Tapestry users'
Subject: RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

You can certainly use a TransactionInterceptor (and HiveUtils has one of
these), but it won't be automatically added to your HiveMind-managed
services like it will in Spring.

-----Original Message-----
From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
Andreas Bulling
Sent: Monday, February 20, 2006 10:00 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Hi Richard,

first, thanks for your answer!

| I have succesfully used HiveMind and Spring together with Tapestry and 
| Hibernate. I used Spring for this HibernateTemplate and transactional 
| support, so just defined DAOs in Spring. I used HiveMind to define all 
| other services, and using the HiveMind-Spring connector library, it was 
| simple to inject the Spring DAOs into the HiveMind services that needed 
| them.

Uh, that sounds even more complex to me :(

| However, I am not completely happy with this as a solution, as it is 
| unnecessarily complex, and I have not solved how to inject HiveMind 
| services into Spring so there is a natural disconnect there. With 
| hivetrans, it is likely that I will drop Spring altogether and just use 
| HiveMind. As you don't appear to want HibernateTemplate, I would suggest 
| just sticking with HiveMind, which is a little harder initially to pick 
| up than Spring, but IMO a more productive solution once you grok it. 
| Particularly as HiveMind is integral to Tapestry.

Well, at least I _think_ that I don't need HibernateTemplates...
What's the good thing about them besides "clear application layering"
as mentioned in the spring reference documentation?

And what about the interceptor stuff and session/transaction handling?
Is this also possible with Hivemind/do drop-in solutions already exist?

Thanks!
  Andreas


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



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




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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
You can certainly use a TransactionInterceptor (and HiveUtils has one of
these), but it won't be automatically added to your HiveMind-managed
services like it will in Spring.

-----Original Message-----
From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
Andreas Bulling
Sent: Monday, February 20, 2006 10:00 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Hi Richard,

first, thanks for your answer!

| I have succesfully used HiveMind and Spring together with Tapestry and 
| Hibernate. I used Spring for this HibernateTemplate and transactional 
| support, so just defined DAOs in Spring. I used HiveMind to define all 
| other services, and using the HiveMind-Spring connector library, it was 
| simple to inject the Spring DAOs into the HiveMind services that needed 
| them.

Uh, that sounds even more complex to me :(

| However, I am not completely happy with this as a solution, as it is 
| unnecessarily complex, and I have not solved how to inject HiveMind 
| services into Spring so there is a natural disconnect there. With 
| hivetrans, it is likely that I will drop Spring altogether and just use 
| HiveMind. As you don't appear to want HibernateTemplate, I would suggest 
| just sticking with HiveMind, which is a little harder initially to pick 
| up than Spring, but IMO a more productive solution once you grok it. 
| Particularly as HiveMind is integral to Tapestry.

Well, at least I _think_ that I don't need HibernateTemplates...
What's the good thing about them besides "clear application layering"
as mentioned in the spring reference documentation?

And what about the interceptor stuff and session/transaction handling?
Is this also possible with Hivemind/do drop-in solutions already exist?

Thanks!
  Andreas


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



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Hi Richard,

first, thanks for your answer!

| I have succesfully used HiveMind and Spring together with Tapestry and 
| Hibernate. I used Spring for this HibernateTemplate and transactional 
| support, so just defined DAOs in Spring. I used HiveMind to define all 
| other services, and using the HiveMind-Spring connector library, it was 
| simple to inject the Spring DAOs into the HiveMind services that needed 
| them.

Uh, that sounds even more complex to me :(

| However, I am not completely happy with this as a solution, as it is 
| unnecessarily complex, and I have not solved how to inject HiveMind 
| services into Spring so there is a natural disconnect there. With 
| hivetrans, it is likely that I will drop Spring altogether and just use 
| HiveMind. As you don't appear to want HibernateTemplate, I would suggest 
| just sticking with HiveMind, which is a little harder initially to pick 
| up than Spring, but IMO a more productive solution once you grok it. 
| Particularly as HiveMind is integral to Tapestry.

Well, at least I _think_ that I don't need HibernateTemplates...
What's the good thing about them besides "clear application layering"
as mentioned in the spring reference documentation?

And what about the interceptor stuff and session/transaction handling?
Is this also possible with Hivemind/do drop-in solutions already exist?

Thanks!
  Andreas


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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Richard Kirby <rb...@capdm.com>.
Hi Andreas

I have succesfully used HiveMind and Spring together with Tapestry and 
Hibernate. I used Spring for this HibernateTemplate and transactional 
support, so just defined DAOs in Spring. I used HiveMind to define all 
other services, and using the HiveMind-Spring connector library, it was 
simple to inject the Spring DAOs into the HiveMind services that needed 
them.

However, I am not completely happy with this as a solution, as it is 
unnecessarily complex, and I have not solved how to inject HiveMind 
services into Spring so there is a natural disconnect there. With 
hivetrans, it is likely that I will drop Spring altogether and just use 
HiveMind. As you don't appear to want HibernateTemplate, I would suggest 
just sticking with HiveMind, which is a little harder initially to pick 
up than Spring, but IMO a more productive solution once you grok it. 
Particularly as HiveMind is integral to Tapestry.

Hope that helps

Richard

Andreas Bulling wrote:
> Hi Nick,
>
> | If you are confused, do what is the simplest and fastest solution? If  
> | it's simple and fast it is at least not hard to remove and replace  
> | with something else, later on. If you don't need to replace it you've  
> | solved a problem efficiently! Well ... that's my current theory,  
> | anyhow. :)
>
> Yes, I _am_ confused - for a week, now...
> Your theory sounds good (*g) but the problem is: What actually is the simplest
> and fastest solution? Even the answer to this question is not obvious to me :(
>
> I'm testing Spring right at the moment but get a new problem every
> time I'm able to solve the previous one... 
>
> 15:21:18,172 ERROR ContextLoader:205 - Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'sessionFactory' defined in ServletContext resource
> [/WEB-INF/applicationContext.xml]: Initialization of bean failed;
> nested exception is java.lang.NoClassDefFoundError: null
> java.lang.NoClassDefFoundError
>
> @all:
> What are your experiences concerning Spring/Hivemind?
> If I don't necessarily need HibernateTemplates should I use
> Hivemind oder Spring? In which features do they differ, which is
> easier to set up? *I've read many articles concerning this issue
> but it's still not clear to me*
>
> | I'll post what I have through tomorrow. It's midnight here now.
>
> That would be great! :)
>
> Sincerly,
>   Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>   


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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Hi Nick,

| If you are confused, do what is the simplest and fastest solution? If  
| it's simple and fast it is at least not hard to remove and replace  
| with something else, later on. If you don't need to replace it you've  
| solved a problem efficiently! Well ... that's my current theory,  
| anyhow. :)

Yes, I _am_ confused - for a week, now...
Your theory sounds good (*g) but the problem is: What actually is the simplest
and fastest solution? Even the answer to this question is not obvious to me :(

I'm testing Spring right at the moment but get a new problem every
time I'm able to solve the previous one... 

15:21:18,172 ERROR ContextLoader:205 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'sessionFactory' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Initialization of bean failed;
nested exception is java.lang.NoClassDefFoundError: null
java.lang.NoClassDefFoundError

@all:
What are your experiences concerning Spring/Hivemind?
If I don't necessarily need HibernateTemplates should I use
Hivemind oder Spring? In which features do they differ, which is
easier to set up? *I've read many articles concerning this issue
but it's still not clear to me*

| I'll post what I have through tomorrow. It's midnight here now.

That would be great! :)

Sincerly,
  Andreas

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nick Faiz <ni...@q9software.com>.
Hey Andreas,

On 20/02/2006, at 11:48 PM, Andreas Bulling wrote:

> Hi Nick,
>
> thanks for your answer!
>

No prob.s.


> Yesterday I thought I could finally decide which combination of  
> frameworks
> I should use/which combination is the best (perhaps at least for me)
> but you're right: I also thought why to use another framework (Spring)
> if Hivemind seems to be a replacement and is already needed by  
> tapestry...
> I didn't (and still don't) know how they differ but if you say that
> you don't miss a thing...
>

I have only just set up my configuration and have no experience with  
it. I'll be watching it as the project goes on.

> Well, I think perhaps I will change my decision another time.

If you are confused, do what is the simplest and fastest solution? If  
it's simple and fast it is at least not hard to remove and replace  
with something else, later on. If you don't need to replace it you've  
solved a problem efficiently! Well ... that's my current theory,  
anyhow. :)

> Would you mind provide some sample code (especially the setup and
> different xml files)? That would be great!
>

I've only really followed the examples at http:// 
hivetranse.sourceforge.net/quickstart.html#start.config.hibernate .  
I'm happy to share my experiences with that configuration or share  
any new pieces of code which spring to light.

I'll post what I have through tomorrow. It's midnight here now.

All the best,
Nick


> Sincerly,
>   Andreas
>
> On 20. Feb 2006 - 23:38:32, Nick Faiz wrote:
> | Andreas,
> |
> | Thanks for your response.
> |
> |
> | On 20/02/2006, at 11:19 PM, Andreas Bulling wrote:
> | >
> | >unfortunately I can't tell you any experiences but one question  
> comes
> | >to my mind: Do the HiveUtils offer something similar to the
> | >HibernateTemplates
> | >in Spring?
> |
> | No, but I've never really relied on Hibernate templates except as a
> | convenience. I think you're referring to DAOs extending the
> | HibernateDaoSupport class, which supports getTemplate().saveOrUpdate
> | (foo) or something like that?
> |
> | Right now, our DAOs are just injecting the session from the Hive and
> | using it directly, according to the open session in view pattern[1].
> | I could write a convenience super-class, like  
> HibernateDaoSupport, if
> | one doesnt exist, if I run into the need for it.
> |
> | >That was the main reason for me to use Spring but perhaps
> | >Hivemind is even better (because you don't have the Spring  
> dependancy
> | >anymore as hivemind is needed for tapestry anyway)?
> |
> | Hrm ... I'm probably missing the compelling reason to use the Spring
> | idea of Hibernate templates. The best I like most is the declarative
> | transactions in the config. - both frameworks support that for
> | Hibernate. On the other hand, my first instinct would be to avoid  
> the
> | complexity of having Spring *and* Hivemind *and* Tapestry.
> |
> | I've only just begun learning it but Hivemind has been able to do
> | everything I've wanted from IoC so far; albeit the configuration is
> | very verbose compared to Spring's.
> |
> | Cheers,
> | Nick
> |
> | [1] - http://hibernate.org/43.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

Nick Faiz,
Developer
www.q9software.com



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Hi Nick,

thanks for your answer!

oooooh noooo... *sigh*

Yesterday I thought I could finally decide which combination of frameworks
I should use/which combination is the best (perhaps at least for me)
but you're right: I also thought why to use another framework (Spring)
if Hivemind seems to be a replacement and is already needed by tapestry...
I didn't (and still don't) know how they differ but if you say that
you don't miss a thing...

Well, I think perhaps I will change my decision another time.
Would you mind provide some sample code (especially the setup and
different xml files)? That would be great!

Sincerly,
  Andreas

On 20. Feb 2006 - 23:38:32, Nick Faiz wrote:
| Andreas,
| 
| Thanks for your response.
| 
| 
| On 20/02/2006, at 11:19 PM, Andreas Bulling wrote:
| >
| >unfortunately I can't tell you any experiences but one question comes
| >to my mind: Do the HiveUtils offer something similar to the  
| >HibernateTemplates
| >in Spring?
| 
| No, but I've never really relied on Hibernate templates except as a  
| convenience. I think you're referring to DAOs extending the  
| HibernateDaoSupport class, which supports getTemplate().saveOrUpdate 
| (foo) or something like that?
| 
| Right now, our DAOs are just injecting the session from the Hive and  
| using it directly, according to the open session in view pattern[1].  
| I could write a convenience super-class, like HibernateDaoSupport, if  
| one doesnt exist, if I run into the need for it.
| 
| >That was the main reason for me to use Spring but perhaps
| >Hivemind is even better (because you don't have the Spring dependancy
| >anymore as hivemind is needed for tapestry anyway)?
| 
| Hrm ... I'm probably missing the compelling reason to use the Spring  
| idea of Hibernate templates. The best I like most is the declarative  
| transactions in the config. - both frameworks support that for  
| Hibernate. On the other hand, my first instinct would be to avoid the  
| complexity of having Spring *and* Hivemind *and* Tapestry.
| 
| I've only just begun learning it but Hivemind has been able to do  
| everything I've wanted from IoC so far; albeit the configuration is  
| very verbose compared to Spring's.
| 
| Cheers,
| Nick
| 
| [1] - http://hibernate.org/43.html

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nick Faiz <ni...@q9software.com>.
Andreas,

Thanks for your response.


On 20/02/2006, at 11:19 PM, Andreas Bulling wrote:
>
> unfortunately I can't tell you any experiences but one question comes
> to my mind: Do the HiveUtils offer something similar to the  
> HibernateTemplates
> in Spring?

No, but I've never really relied on Hibernate templates except as a  
convenience. I think you're referring to DAOs extending the  
HibernateDaoSupport class, which supports getTemplate().saveOrUpdate 
(foo) or something like that?

Right now, our DAOs are just injecting the session from the Hive and  
using it directly, according to the open session in view pattern[1].  
I could write a convenience super-class, like HibernateDaoSupport, if  
one doesnt exist, if I run into the need for it.

> That was the main reason for me to use Spring but perhaps
> Hivemind is even better (because you don't have the Spring dependancy
> anymore as hivemind is needed for tapestry anyway)?

Hrm ... I'm probably missing the compelling reason to use the Spring  
idea of Hibernate templates. The best I like most is the declarative  
transactions in the config. - both frameworks support that for  
Hibernate. On the other hand, my first instinct would be to avoid the  
complexity of having Spring *and* Hivemind *and* Tapestry.

I've only just begun learning it but Hivemind has been able to do  
everything I've wanted from IoC so far; albeit the configuration is  
very verbose compared to Spring's.

Cheers,
Nick

[1] - http://hibernate.org/43.html

>
> Sincerly,
>   Andreas
>
> On 20. Feb 2006 - 23:07:23, Nick Faiz wrote:
> | I know that this post is about Tapestry, Hibernate, and Spring but I
> | wanted to query readers about Tapestry, Hibernate, and Hivemind.  
> I've
> | only just set up Hivemind with Hibernate, using the HiveUtils.
> |
> | I've used the 'Open Session in View' pattern, with a Spring and
> | Hibernate combination, before. The HiveUtils/HiveTranse offering
> | seems fairly close to it and the doc.s have an example  
> configuration:
> |
> | http://hivetranse.sourceforge.net/ 
> quickstart.html#start.config.hibernate
> |
> | Doing so has allowed me to inject a session object into my DAOs. It
> | seems fairly elegant and close to what I have used with Spring and
> | Hibernate, anyhow.
> |
> | Has anyone had any particular experience using this configuration?
> |
> | Cheers,
> | Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

Nick Faiz,
Developer
www.q9software.com



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Hi Nick,

unfortunately I can't tell you any experiences but one question comes
to my mind: Do the HiveUtils offer something similar to the HibernateTemplates
in Spring? That was the main reason for me to use Spring but perhaps
Hivemind is even better (because you don't have the Spring dependancy
anymore as hivemind is needed for tapestry anyway)?

Sincerly,
  Andreas

On 20. Feb 2006 - 23:07:23, Nick Faiz wrote:
| I know that this post is about Tapestry, Hibernate, and Spring but I  
| wanted to query readers about Tapestry, Hibernate, and Hivemind. I've  
| only just set up Hivemind with Hibernate, using the HiveUtils.
| 
| I've used the 'Open Session in View' pattern, with a Spring and  
| Hibernate combination, before. The HiveUtils/HiveTranse offering  
| seems fairly close to it and the doc.s have an example configuration:
| 
| http://hivetranse.sourceforge.net/quickstart.html#start.config.hibernate
| 
| Doing so has allowed me to inject a session object into my DAOs. It  
| seems fairly elegant and close to what I have used with Spring and  
| Hibernate, anyhow.
| 
| Has anyone had any particular experience using this configuration?
| 
| Cheers,
| Nick

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nick Faiz <ni...@q9software.com>.
Yes, that did look nice.

Cheers,
Nick

On 21/02/2006, at 12:03 AM, James Carman wrote:

> You don't have autoproxy support in HiveMind, though.  That, in my  
> mind, is
> more elegant.
>
> -----Original Message-----
> From: Nick Faiz [mailto:nick@q9software.com]
> Sent: Monday, February 20, 2006 7:07 AM
> To: Tapestry users
> Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry
>
> I know that this post is about Tapestry, Hibernate, and Spring but I
> wanted to query readers about Tapestry, Hibernate, and Hivemind. I've
> only just set up Hivemind with Hibernate, using the HiveUtils.
>
> I've used the 'Open Session in View' pattern, with a Spring and
> Hibernate combination, before. The HiveUtils/HiveTranse offering
> seems fairly close to it and the doc.s have an example configuration:
>
> http://hivetranse.sourceforge.net/ 
> quickstart.html#start.config.hibernate
>
> Doing so has allowed me to inject a session object into my DAOs. It
> seems fairly elegant and close to what I have used with Spring and
> Hibernate, anyhow.
>
> Has anyone had any particular experience using this configuration?
>
> Cheers,
> Nick
>
>
> On 20/02/2006, at 10:57 PM, James Carman wrote:
>
>> Yes I will.
>>
>> -----Original Message-----
>> From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
>> Andreas Bulling
>> Sent: Monday, February 20, 2006 6:54 AM
>> To: Tapestry users
>> Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry
>>
>> On 20. Feb 2006 - 06:45:19, James Carman wrote:
>> | I might be able to put something together for you.  I'll see what
>> I can do
>> | and I'll make it available via SVN from my website.
>>
>> I'm also looking forward to such a sample app...
>> Are you planning to publish the URL here? That would be nice!
>>
>> Sincerly,
>>   Andreas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user- 
>> help@jakarta.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user- 
>> help@jakarta.apache.org
>>
>
> Nick Faiz,
> Developer
> www.q9software.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

Nick Faiz,
Developer
www.q9software.com



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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
You don't have autoproxy support in HiveMind, though.  That, in my mind, is
more elegant.

-----Original Message-----
From: Nick Faiz [mailto:nick@q9software.com] 
Sent: Monday, February 20, 2006 7:07 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

I know that this post is about Tapestry, Hibernate, and Spring but I  
wanted to query readers about Tapestry, Hibernate, and Hivemind. I've  
only just set up Hivemind with Hibernate, using the HiveUtils.

I've used the 'Open Session in View' pattern, with a Spring and  
Hibernate combination, before. The HiveUtils/HiveTranse offering  
seems fairly close to it and the doc.s have an example configuration:

http://hivetranse.sourceforge.net/quickstart.html#start.config.hibernate

Doing so has allowed me to inject a session object into my DAOs. It  
seems fairly elegant and close to what I have used with Spring and  
Hibernate, anyhow.

Has anyone had any particular experience using this configuration?

Cheers,
Nick


On 20/02/2006, at 10:57 PM, James Carman wrote:

> Yes I will.
>
> -----Original Message-----
> From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
> Andreas Bulling
> Sent: Monday, February 20, 2006 6:54 AM
> To: Tapestry users
> Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry
>
> On 20. Feb 2006 - 06:45:19, James Carman wrote:
> | I might be able to put something together for you.  I'll see what  
> I can do
> | and I'll make it available via SVN from my website.
>
> I'm also looking forward to such a sample app...
> Are you planning to publish the URL here? That would be nice!
>
> Sincerly,
>   Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

Nick Faiz,
Developer
www.q9software.com



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



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nick Faiz <ni...@q9software.com>.
I know that this post is about Tapestry, Hibernate, and Spring but I  
wanted to query readers about Tapestry, Hibernate, and Hivemind. I've  
only just set up Hivemind with Hibernate, using the HiveUtils.

I've used the 'Open Session in View' pattern, with a Spring and  
Hibernate combination, before. The HiveUtils/HiveTranse offering  
seems fairly close to it and the doc.s have an example configuration:

http://hivetranse.sourceforge.net/quickstart.html#start.config.hibernate

Doing so has allowed me to inject a session object into my DAOs. It  
seems fairly elegant and close to what I have used with Spring and  
Hibernate, anyhow.

Has anyone had any particular experience using this configuration?

Cheers,
Nick


On 20/02/2006, at 10:57 PM, James Carman wrote:

> Yes I will.
>
> -----Original Message-----
> From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
> Andreas Bulling
> Sent: Monday, February 20, 2006 6:54 AM
> To: Tapestry users
> Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry
>
> On 20. Feb 2006 - 06:45:19, James Carman wrote:
> | I might be able to put something together for you.  I'll see what  
> I can do
> | and I'll make it available via SVN from my website.
>
> I'm also looking forward to such a sample app...
> Are you planning to publish the URL here? That would be nice!
>
> Sincerly,
>   Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>

Nick Faiz,
Developer
www.q9software.com



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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
Yes I will.  

-----Original Message-----
From: Andreas Bulling [mailto:andreas@phoenix.hadiko.de] On Behalf Of
Andreas Bulling
Sent: Monday, February 20, 2006 6:54 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

On 20. Feb 2006 - 06:45:19, James Carman wrote:
| I might be able to put something together for you.  I'll see what I can do
| and I'll make it available via SVN from my website.

I'm also looking forward to such a sample app...
Are you planning to publish the URL here? That would be nice!

Sincerly,
  Andreas 

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



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
On 20. Feb 2006 - 06:45:19, James Carman wrote:
| I might be able to put something together for you.  I'll see what I can do
| and I'll make it available via SVN from my website.

I'm also looking forward to such a sample app...
Are you planning to publish the URL here? That would be nice!

Sincerly,
  Andreas 

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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Andreas Bulling <sp...@phoenix.hadiko.de>.
Hi Nicolas,

as I had to go a very stony way the last week (and I'm still on this way...)
I had the idea to strap all experiences together on a wiki page or something like
that afterwards. But I don't think that I can do that before March... :(

If there is something to publish I will announce the URL here ;)

Sincerly,
  Andreas

On 20. Feb 2006 - 10:59:27, Nicolas wrote:
| Hi,
| 
| Reading this, Tapestry + Spring + Hibernate looks great !
| Does anyone have a small application using Tapestry 4 + Hibernate 3 + Spring


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


RE: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by James Carman <ja...@carmanconsulting.com>.
I might be able to put something together for you.  I'll see what I can do
and I'll make it available via SVN from my website.

-----Original Message-----
From: Nicolas [mailto:scalpmail@gmail.com] 
Sent: Monday, February 20, 2006 4:59 AM
To: Tapestry users
Subject: Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Hi,

Reading this, Tapestry + Spring + Hibernate looks great !
Does anyone have a small application using Tapestry 4 + Hibernate 3 + Spring
?

Thanx in advance,
Nicolas


On 2/20/06, Pedro Abelleira Seco <pe...@usc.es> wrote:
>
> EJB's are different things mixed. I'd you recommend you to read the Rod
> Johnson books, but a good rule of thumb is: if you are not _sure_ you
> need them the chances are that you don't need them.
>
> Use Spring to wire your DAO's and it's utility classes to help you write
> them (with Hibernate or plain JDBC, if you are more used to it). Then
> use your DAO's from Tapestry. It's really simple, once you have
> bootstraped your enviroment, and more ellegant than the EJB normal
> applications, IMHO.
>
> You might want to have a look at the jpetstore and petclinic sample apps
> in the spring distribution.
>
> Regards
> Pedro
>
> El sáb, 18-02-2006 a las 00:48 +0100, Andreas Bulling escribió:
> > Hi again,
> >
> > I'm in despair because I just can't understand the whole
> Hibernate/EJB/domain-model/etc.
> > stuff even after reading documentation, tutorials and example code for
> days, now :(
> > (perhaps I've just read the wrong documents, I don't know...)
> >
> > So *please*, even if it's not directly related to Tapestry, but as other
> OT messages
> > have been posted and answered already on this list and I don't know
> > whom to ask instead or which documents/books to read.
> >
> > If someone has a few minutes:
> > Could someone please explain to me (even a short explanation would help)
> >
> > - What's the difference between CMP and Hibernate and in which situation
> which
> > one can/should be used? What are the pro's and con's of both approaches?
> >
> > - How can Hibernate be used in a Tapestry vlib-style application (where
> CMP was used
> > so far)? (the mentioned epluribus example seems to be reorganized
> completely and I don't
> > know if it's possible/reasonable at all to recode everything). Therefore
> which
> > Classes would need to be replaced/changed?
> >
> > - Is it possible/reasonable to use EJB's _and_ Hibernate and if yes how
> can they
> > be used together?
> >
> > Thanks a lot for any answer!
> >   Andreas
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>



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


Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Nicolas <sc...@gmail.com>.
Hi,

Reading this, Tapestry + Spring + Hibernate looks great !
Does anyone have a small application using Tapestry 4 + Hibernate 3 + Spring
?

Thanx in advance,
Nicolas


On 2/20/06, Pedro Abelleira Seco <pe...@usc.es> wrote:
>
> EJB's are different things mixed. I'd you recommend you to read the Rod
> Johnson books, but a good rule of thumb is: if you are not _sure_ you
> need them the chances are that you don't need them.
>
> Use Spring to wire your DAO's and it's utility classes to help you write
> them (with Hibernate or plain JDBC, if you are more used to it). Then
> use your DAO's from Tapestry. It's really simple, once you have
> bootstraped your enviroment, and more ellegant than the EJB normal
> applications, IMHO.
>
> You might want to have a look at the jpetstore and petclinic sample apps
> in the spring distribution.
>
> Regards
> Pedro
>
> El sáb, 18-02-2006 a las 00:48 +0100, Andreas Bulling escribió:
> > Hi again,
> >
> > I'm in despair because I just can't understand the whole
> Hibernate/EJB/domain-model/etc.
> > stuff even after reading documentation, tutorials and example code for
> days, now :(
> > (perhaps I've just read the wrong documents, I don't know...)
> >
> > So *please*, even if it's not directly related to Tapestry, but as other
> OT messages
> > have been posted and answered already on this list and I don't know
> > whom to ask instead or which documents/books to read.
> >
> > If someone has a few minutes:
> > Could someone please explain to me (even a short explanation would help)
> >
> > - What's the difference between CMP and Hibernate and in which situation
> which
> > one can/should be used? What are the pro's and con's of both approaches?
> >
> > - How can Hibernate be used in a Tapestry vlib-style application (where
> CMP was used
> > so far)? (the mentioned epluribus example seems to be reorganized
> completely and I don't
> > know if it's possible/reasonable at all to recode everything). Therefore
> which
> > Classes would need to be replaced/changed?
> >
> > - Is it possible/reasonable to use EJB's _and_ Hibernate and if yes how
> can they
> > be used together?
> >
> > Thanks a lot for any answer!
> >   Andreas
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

Re: [OT] Re: Best practice - Integration Hibernate/Tapestry

Posted by Pedro Abelleira Seco <pe...@usc.es>.
EJB's are different things mixed. I'd you recommend you to read the Rod
Johnson books, but a good rule of thumb is: if you are not _sure_ you
need them the chances are that you don't need them.

Use Spring to wire your DAO's and it's utility classes to help you write
them (with Hibernate or plain JDBC, if you are more used to it). Then
use your DAO's from Tapestry. It's really simple, once you have
bootstraped your enviroment, and more ellegant than the EJB normal
applications, IMHO.

You might want to have a look at the jpetstore and petclinic sample apps
in the spring distribution. 

Regards
Pedro

El sáb, 18-02-2006 a las 00:48 +0100, Andreas Bulling escribió:
> Hi again,
> 
> I'm in despair because I just can't understand the whole Hibernate/EJB/domain-model/etc.
> stuff even after reading documentation, tutorials and example code for days, now :(
> (perhaps I've just read the wrong documents, I don't know...)
> 
> So *please*, even if it's not directly related to Tapestry, but as other OT messages
> have been posted and answered already on this list and I don't know
> whom to ask instead or which documents/books to read.
> 
> If someone has a few minutes:
> Could someone please explain to me (even a short explanation would help)
> 
> - What's the difference between CMP and Hibernate and in which situation which
> one can/should be used? What are the pro's and con's of both approaches?
> 
> - How can Hibernate be used in a Tapestry vlib-style application (where CMP was used
> so far)? (the mentioned epluribus example seems to be reorganized completely and I don't
> know if it's possible/reasonable at all to recode everything). Therefore which
> Classes would need to be replaced/changed?
> 
> - Is it possible/reasonable to use EJB's _and_ Hibernate and if yes how can they
> be used together?
> 
> Thanks a lot for any answer!
>   Andreas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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