jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From UMAIL <UM...@gmx.de>
Subject Re: Register custom node types globally
Date Tue, 08 Jan 2013 13:33:24 GMT
Try session.save()!

Am 08.01.2013 um 13:53 schrieb Alexander Klimetschek <aklimets@adobe.com>:

> On 29.12.2012, at 14:31, Ɓukasz Kaleta <lukaszkaleta@gmail.com> wrote:
> 
>> Hi,
>> 
>> I would like to register mine custom node types globally:
>> 
>> I am doing following:
>> 
>>           repository = new TransientRepository(config, home);
>>           Session session = repository.login((new
>> SimpleCredentials("username", "password".toCharArray())))
>>           ....
>>           JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager)
>> session.getWorkspace().getNodeTypeManager();
>>           nodeTypes = manager.registerNodeTypes(cndInputStream,
>> JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
>>           ....
>>           session.logout()
>> 
>> 
>> If next I login again mine custom node types are gone.
>> Is there a way for doing it globally ?
> 
> Looks good to me. Registering node types is always done "globally", i.e. persistent.
Are you sure that registering works? I.e. node types are present in that initial session and
no exceptions are thrown?
> 
> Cheers,
> Alex
> 

Mime
View raw message