StatelessSession has nothing to do with lack of a transaction!

-----Original Message-----
From: Darryl Miles [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 11, 2006 3:13 AM
To: Steve Ebersole
Cc: hibernate-devel@lists.sourceforge.net
Subject: Re: [Hibernate] Session.replicate() into IDENTITY table ?

Steve Ebersole wrote:
> Not sure if anyone replied to this yet or not, so I'll throw my $0.02
> into the discussion.  I think all that is needed is to better allow
> definition of what is to occur during replication in the method call.
> For example, consider the changing the signature from accepting a
> ReplicationMode to accepting a (new) "ReplicationStrategy", where
> ReplicationStrategy is defined something like:
> ReplicationStrategy {
>     /**
>      * How should we react when we encounter a pre-existing row
>      * in the target database?
>      * <p/>
>      * TODO: probably rename the ReplicationMode class to MergeMode
>      */
>     public ReplicationMode getMergeMode() ... 
>     /**
>      * When replicating an entity which does not yet occur in the
>      * target database, should we enforce that the target data
>      * we are about to create have the same identifier value?
>      */
>     public boolean forceIdentiferRetention() ...
> }
> 
> Also, there has been some discussion about moving the replicate
> functionality from the Session interface to the StatelessSession
> interface which would be a good point in time to introduce such
changes.

The use of a strategy configuration object would fine from the Hibernate

API users perspective and head off the possibility of legacy API kruft 
issues (when another parameter is wanted in the future).


Would I be correct in saying that operations using a StatelessSession 
are not part of a transaction ?  If so are you proposing to _REMOVE_ the

Session#replicate() operation completely that is part of a transaction. 
  Providing for both stateful and stateless would cover all bases and 
have their valid use cases.  Maybe I am misunderstanding something here.

Darryl

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to