I send them to ur email address.

Vincent Dutat wrote:
It looks like my attachements have been blocked, how can I send u these files ?


Vincent Dutat wrote:
Hi,

pls find in attached files a project showing my problem and the generated jar.

regards.


Bogdan Stefanescu wrote:

It's weird.. it seems the org.nuxeo.ecm.core.api.repository.RepositoryManager class is not visible to your module. And it's weird since the Framework class is visible and it is also part of nuxeo.ear. Where is your module installed? make sure you don't have old libraries in your nuxeo.ear and try to clean up your installation (remove nuxeo.ear, svn up, mvn clean, mvn install, ant copy) If this is not working please send me your code (or a similar one) to be able to reproduce the bug.

Bogdan



Vincent Dutat wrote:
hi,

I wrote an eventlistener which open the repository using the new Platform API. It works fine when it's triggered by an event like 'documentRemoved', 'documentCreated', ... but it gets exception on Framework.getService(RepositoryManager.class) when it's triggered by an event sent by a scheduler. I dont get any exception if I disable the Nuxeo isolated class loader. The exception is No ClassLoaders found for: org.nuxeo.ecm.core.api.repository.RepositoryManager (no security manager: RMI class loader disabled)]

Bogdan Stefanescu wrote:

Hi all,

The Platform API was marked as deprecated and the API was moved in nucxeo runtime. The current API and extension points are still working but should no more used - they will be removed in future.

NXRuntime was marked as deprecated too. Instead you should use "org.nuxeo.runtime.api.Framework"

The login infrastructure was refactored and moved in nuxeo runtime.
Defining security domains and login modules is now independent on JBoss (it is done using the extension point mechanism) This way the login is more portable (there yet some dependence on JBoss which will be removed in future) Also, the nuxeo-platform-login is now packaged as a jar and not as a sar.

Difference between old and new API:

1. services lookup:
- old method:
TypeManager typeMgr = ECM.getPlatform().getService(TypeManager.class);

- new method: TypeManager typeMgr = Framework.getService(TypeManager.class); 2. repository lookup:
- old method: (opening the first repository)
   RepositoryDescriptor[] rd = ECM.getPlatform().getRepositories();
   CoreSession session = ECM.getPlatform().openRepository(rd[0]);

- new method:
RepositoryManager mgr = Framework.getService(RepositoryManager.class);
 CoreSession session = mgr.getDefaultRepository().open();

3.  system login and user login:
- old method:
   new SystemSession().login();
   new UserSession().login("Administrator", "Administrator");

- new method:
   Framework.login();
   Framework.login("Administrator", "Administrator");

4. runtime service lookup:
- old method:
   NXRuntime.getRuntime()

- new method:
   Framework.getRuntime()

5. binding services (new method):

<extension target="org.nuxeo.runtime.api.ServiceManagement" point="services"> <service class="org.nuxeo.ecm.core.api.CoreSession" name="demo" group="core">
         <adapter>org.nuxeo.ecm.core.api.CoreSessionAdapter</adapter>
         <locator>%DocumentManagerBean</locator>
     </service>
  </extension>

6. declaring repositories (new method):

<extension target="org.nuxeo.ecm.core.api.repository.RepositoryManager"
       point="repositories">
   <repository name="demo" label="Default Repository"/>
 </extension>


7. defining a security domain (the new method):

 <extension target="org.nuxeo.runtime.LoginComponent" point="domains">
   <domain name="nuxeo-system-login">
<login-module code="org.nuxeo.runtime.api.login.SystemLoginModule" flag="required"/> <login-module code="org.jboss.security.ClientLoginModule" flag="required">
              <option name="password-stacking">true</option>
           <option name="restore-login-identity">true</option>
           <option name="multi-threaded">true</option>
       </login-module>
   </domain>
 </extension>


Bogdan

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm



------------------------------------------------------------------------

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to