Hi,
Earlier i was using jackrabbit 1.2.1, but now after your suggestion -
downloaded 1.3 version and tried implementing the custom node type
registration code. But it is failing because the NodeTypeManager which it is
returing is ClientNodeTypeManager and when i cast it to
JackrabbitNodeTypeManager it is giving ClassCast Exception.
Is there any thing which i am missing.
thanks,
Sudhan
Jukka Zitting wrote:
>
> Hi,
>
> On 5/11/07, Sudhan <[EMAIL PROTECTED]> wrote:
>> I am really stucked at a point where i need to make custom node type so
>> as
>> to set some custom features. Now my problem is that i am using Jackrabbit
>> repository through RMI, but i cannot get resources to the remote
>> repository
>> from my application. Now is there a work around, either by modifying the
>> standard nodetypes given in jackrabbit source code or can I add my own
>> custom node type definition somehow at startup of the repository on the
>> server itself.
>
> Starting with the 1.3 release, the jackrabbit-jcr-rmi component
> supports the jackrabbit-api extension interfaces when accessing a
> Jackrabbit repository. So you can use the following code in your
> client application:
>
> Session session = ...;
> JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager)
> session.getWorkspace().getNodeTypeManager();
> if (!manager.hasNodeType("my:customType")) {
> manager.registerNodeTypes(...);
> }
>
> See
> http://jackrabbit.apache.org/api/1.3/org/apache/jackrabbit/api/JackrabbitNodeTypeManager.html
>
> BR;
>
> Jukka Zitting
>
>
--
View this message in context:
http://www.nabble.com/Custom-node-types-with-RMI-tf3728625.html#a10614088
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.