jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Tagliani <l.tagli...@cbt.it>
Subject Re: Reason for Item.save() to be deprecated...
Date Thu, 16 Jul 2009 13:40:55 GMT

Hi Alexander,
  I've found the javadoc (I did not read well the code...).

The problem though is still there.

Let me explain.

We have developed a webapp for content management using jackrabbit as
repository.
Using the GUI (JSF) we can alter, modify, create or delete the entities
present in our repository (everithing, from user to document are mapped as a
node in the repository).

If we modify a different entity and want to save only one of them, we have
the problem to remove from the transient storage the modifications of the
other entity (which, of course, we don't put in a list of modified
entities...).

In this case, Session.save() persist all the modified entities, which,
obviously is not what we want.
That's why we use the Item.save() method.

We hope that it won't be removed in the future or else we won't be able to
update the repository to the newer version of Jacrabbit.

BR
Luca Tagliani


Alexander Klimetschek wrote:
> 
> On Thu, Jul 16, 2009 at 1:46 PM, Luca Tagliani<l.tagliani@cbt.it> wrote:
>>  I have downloaded the alpha4 of jackrabbit-2.0 and I'm using the
>> jcr-2.0-b19.jar for the jcr api.
>>
>> I've found that Item.save() has been deprecated.
>>
>> I haven't find the source of the jcr-2.0-b19.jar or any javadoc about it.
> 
> You'll find the javadoc of the current final draft in the JSR-283
> package from here [1], which includes the spec, the jar and the
> javadocs. Note that the -b19.jar is a more recent version than the
> official proposed final draft available on the JSR-283 website, but I
> think the changes are minimal.
> 
>> In our project we rely on item (tipically node) direct saving and I
>> wanted
>> to know if there will be in the future (jcr2.0 migration of the
>> project...)
>> any problem.
>>
>> Could someone please tell me why this method is deprecated and if there's
>> a
>> replacement (workaround)?
> 
> The workaround is to use Session.save().
> 
> I guess it was removed to simplify implementation of the API, but I
> think Jackrabbit will still support it in its 2.0 release (although it
> might be removed later).
> 
> [1] http://jcp.org/en/jsr/detail?id=283
> 
> Regards,
> Alex
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Reason-for-Item.save%28%29-to-be-deprecated...-tp24514858p24516616.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Mime
View raw message