Hi, See [1] how to create a SessionFactory object with Spring. Session objects shouldn't be pooled. One session object should serve all requests for a specific user. OpenCMIS is thread-safe. So just create one object and reuse it wherever possible. In this way all threads share one cache which much more efficient than pooling.
- Florian [1] http://static.springsource.org/spring/docs/2.0.x/reference/beans.html#beans-factory-class-static-factory-method On 17/07/2011 18:32, Christopher Cheng wrote: > This is the normal procedure to obtain a session with opencmis api > > SessionFactory f = SessionFactoryImpl.newInstance(); > Map<String, String> params = new HashMap<String, String>(); > params.put(SessionParameter.USER, "admin"); > params.put(SessionParameter.PASSWORD, "admin"); > params.put(SessionParameter.ATOMPUB_URL, " > http://localhost:8080/alfresco/service/cmis"); > params.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value()); > params.put(SessionParameter.REPOSITORY_ID, > f.getRepositories(params).get(0).getId()); > Session s = f.createSession(params); > > Is there any component in chemistry to make this more spring friendly and > poolable like Hibernate or ActiveMQ session factories? >
