You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Luca Tagliani <l....@cbt.it> on 2009/07/16 13:46:25 UTC
Reason for Item.save() to be deprecated...
Hi all,
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.
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)?
BR
Luca Tagliani
--
View this message in context: http://www.nabble.com/Reason-for-Item.save%28%29-to-be-deprecated...-tp24514858p24514858.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
Re: Reason for Item.save() to be deprecated...
Posted by Alexander Klimetschek <ak...@day.com>.
On Thu, Jul 16, 2009 at 3:40 PM, Luca Tagliani<l....@cbt.it> wrote:
> 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.
Your request should go to the JSR-283 committee, but not sure if there
is still a way to interact, since the public review is already over.
Personally, I think Item.save() can be useful sometimes, albeit the
question still remains why exactly you need it in your use case? Why
having so many modifications pending while already "working" on other
items and saving them step by step?
Regards,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com
Re: Reason for Item.save() to be deprecated...
Posted by Luca Tagliani <l....@cbt.it>.
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....@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.
Re: Reason for Item.save() to be deprecated...
Posted by Alexander Klimetschek <ak...@day.com>.
On Thu, Jul 16, 2009 at 1:46 PM, Luca Tagliani<l....@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