OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | exoplatform List | May 2008 Index

<--  Date Index  --> <--  Thread Index  -->

[exoplatform] Re: [[exo-jcr]] Acess JCR with Naming service


Hi,

1. You have to configure InitialContextInitializer as described here http://wiki.exoplatform.org/xwiki/bin/view/Core/Naming+-+JNDI
something like
   <component-plugin>^M                                                                                                                        
      <name>bind.jcr</name>^M                                                                                                                   
      <set-method>addPlugin</set-method>^M                                                                                                      
      <type>org.exoplatform.services.naming.BindReferencePlugin</type>^M                                                                        
      <init-params>^M                                                                                                                           
        <value-param>^M                                                                                                                         
          <name>bind-name</name>^M                                                                                                              
          <value>repo</value>^M                                                                                                                 
        </value-param>^M                                                                                                                        
        <value-param>^M                                                                                                                         
          <name>class-name</name>^M                                                                                                             
          <value>javax.jcr.Repository</value>^M                                                                                                 
        </value-param>^M                                                                                                                        
        <value-param>^M                                                                                                                         
          <name>factory</name>^M                                                                                                                
          <value>org.exoplatform.services.jcr.impl.jndi.BindableRepositoryFactory</value>^M                                                     
        </value-param>^M                                                                                                                        
        <properties-param>^M                                                                                                                    
          <name>ref-addresses</name>^M                                                                                                          
          <description>ref-addresses</description>^M                                                                                            
          <property name="repositoryName" value="db1" />^M                                                                                                                          
        </properties-param>^M                                                                                                                   
      </init-params>^M                                                                                                                          
    </component-plugin>^M     
     
2. obtain JCR repository through JNDI in your code (by name "db1" as for example above)

HTH,

Gennady

On May 9, 2008, at 11:10 AM, Zoubeida dhouib wrote:

Hi,

I test the REST example for eXoplatform.. It works !.  
Now I want to access JCR (v1.8) from MyResourceContainer class.. 

I serach in many examples but i don't see a piece of  complete or helpful code.

II want to access the JCR repository using JNDI context on Tomcat J2EE server.. I think this package can help me : org.exoplatform.services.naming, but I can't find it on web...

Finally,  some help to arrive by JNDI context to My ManageableRepository 

thanks,

Zoubeïda
EISTI

__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail

__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 
--
You receive this message as a subscriber of the exo-jcr@xxxxxxx mailing list.
To unsubscribe: mailto:exo-jcr-unsubscribe@xxxxxxx
For general help: mailto:sympa@xxxxxxx?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.