You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by JOSE FELIX HERNANDEZ BARRIO <jo...@isthari.com> on 2010/05/03 11:25:37 UTC
bug in javadoc
api 2.1.0
In the interface
DataStoreGarbageCollectorthe following example appears:
DataStoreGarbageCollector gc =
((JackrabbitSession)session).createDataStoreGarbageCollector();
I think it should be SessionImpl instead of JackrabbitSession
--
Jose Hernandez
675599600
Isthari
http://www.isthari.com
Re: bug in javadoc
Posted by Thomas Müller <th...@day.com>.
Hi,
> I think this way is suitable for standalone instances, but for an embedded
> jackrabbit (jackrabbit inside a web app) perhaps this is a better method
There are two problem:
- Casting to an implementation class is bad for compatibility. You are
not using an interface, you are using concrete classes. This will
break in future versions of Jackrabbit.
- Security: (only admin sessions should be able to run data store
garbage collection). In future versions of Jackrabbit this feature may
be removed for this reason.
Regards,
Thomas
Re: bug in javadoc
Posted by JOSE FELIX HERNANDEZ BARRIO <jo...@isthari.com>.
Hi,
> Actually the 'official' way to run garbage collection is documented here:
>
>
> http://wiki.apache.org/jackrabbit/DataStore#Running_Data_Store_Garbage_Collection_.28Jackrabbit_2.x.29
>
I think this way is suitable for standalone instances, but for an embedded
jackrabbit (jackrabbit inside a web app) perhaps this is a better method
session = repository.login(new SimpleCredentials(user,
password.toCharArray()));
SessionImpl impl = (SessionImpl)session;
DataStoreGarbageCollector gc =
impl.createDataStoreGarbageCollector();
try {
gc.mark();
gc.sweep();
} finally {
gc.close();
}
> > api 2.1.0
> > In the interface
>
> Where did you find this information? Could you provide a link? (it
> looks like the Jackrabbit web site is currently broken, so I can't
> find it)
>
http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/api/management/DataStoreGarbageCollector.html
>
> Regards,
> Thomas
>
>
> On Mon, May 3, 2010 at 11:25 AM, JOSE FELIX HERNANDEZ BARRIO
> <jo...@isthari.com> wrote:
> > api 2.1.0
> > In the interface
> > DataStoreGarbageCollectorthe following example appears:
> >
> > DataStoreGarbageCollector gc =
> > ((JackrabbitSession)session).createDataStoreGarbageCollector();
> >
> >
> > I think it should be SessionImpl instead of JackrabbitSession
> >
> >
> >
> > --
> > Jose Hernandez
> > 675599600
> > Isthari
> > http://www.isthari.com
> >
>
--
Jose Hernandez
675599600
Isthari
http://www.isthari.com
Re: bug in javadoc
Posted by Thomas Müller <th...@day.com>.
Hi,
Actually the 'official' way to run garbage collection is documented here:
http://wiki.apache.org/jackrabbit/DataStore#Running_Data_Store_Garbage_Collection_.28Jackrabbit_2.x.29
> api 2.1.0
> In the interface
Where did you find this information? Could you provide a link? (it
looks like the Jackrabbit web site is currently broken, so I can't
find it)
Regards,
Thomas
On Mon, May 3, 2010 at 11:25 AM, JOSE FELIX HERNANDEZ BARRIO
<jo...@isthari.com> wrote:
> api 2.1.0
> In the interface
> DataStoreGarbageCollectorthe following example appears:
>
> DataStoreGarbageCollector gc =
> ((JackrabbitSession)session).createDataStoreGarbageCollector();
>
>
> I think it should be SessionImpl instead of JackrabbitSession
>
>
>
> --
> Jose Hernandez
> 675599600
> Isthari
> http://www.isthari.com
>