jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glaucio Scheibel <glaucio.schei...@datasul.com.br>
Subject Re: loading javaclasses-node mapping files in multiuser environment
Date Fri, 18 May 2007 12:29:58 GMT
Hi,

How stable is OCM, I am really interested in this component. I used to 
code my own DAO's and this component will save a lot of time.
It's only available on subversion?

Thanks is advance

Glaucio

ruchi goel wrote:
> Hi,
>   I am using OCM (jcr-mapping ) to access jackrabbit repository.
>
>
>
> To get  persistenceManager , I am doing the following :
>
> Class PMSetUp{
>  
>    private static QueryManager queryManager;
>
>    private static Mapper mapper;
>
>    private static AtomicTypeConverterProvider converterProvider;
>
>    private static ObjectConverter objectConverter;
>
>    private static pmIsInitiaized = false;
>      public void init(){
>        String path =  "." + fs + "config";             files[0] = path 
> + fs + "portalCMS_jcrmapping.xml";
>
>        //set up OCM
>        mapper = new DigesterMapperImpl(files);
>        converterProvider = new DefaultAtomicTypeConverterProvider();
>        Map atomicTypeConverters = 
> converterProvider.getAtomicTypeConverters();
>        queryManager = new QueryManagerImpl(mapper, atomicTypeConverters);
>        objectConverter = new ObjectConverterImpl(mapper, 
> converterProvider);
>        pmIsInitiaized = true;
>     }
>
>     public PersistenceManager getPersistenceManager(HttpRequest 
> request) throws CMSException {        if (!pmIsInitialized){
>          init();
>          }
>          return new PersistenceManagerImpl(mapper, objectConverter, 
> queryManager, request.getSession().getAttribute("jcrSession");
>    }
> }
>
> In case of single user environment , the above works fine. My question 
> is in case of multiuser environment also, can I have querymanager, 
> mapper etc.as static since they are not dependent on user session.
>
>
> Thanks,
> Ruchi
>
>

Mime
View raw message