Dragos Mihalache wrote:
Jean-Marc Orliaguet wrote:

Hi,

I've started working on http://jira.nuxeo.org/browse/NXP-165 to associate local themes to document uuids using the placeful annotation service.

how is the PlacefulServiceBean supposed to be instantiated, or be looked up? there is a JNDILookupHelper in org.nuxeo.ecm.core.api.ejb but it's deprecated.

Pls take a look at NotificationServiceBusinessDelegate for example. The binding to ejb should be done with something like : PlacefulServiceRemote service = ECM.getPlatform().getService(PlacefulServiceRemote.class);

Also for this to work a configuration like in PlatformBindings.xml files is needed.

Dragos


OK,

I now have something that works. The only thing that bothers me is that I have to add:

   Nuxeo-RequiredBy: org.nuxeo.ecm.platform.placeful.facade

in nuxeo-platform-webapp-core/src/main/resources/META-INF/MANIFEST.MF to make the deployment work otherwise I get:

2007-05-17 10:35:03,205 DEBUG [org.jboss.ejb3.entity.PersistenceUnitDeployment] Found persistence.xml file in EJB3 jar 2007-05-17 10:35:03,206 DEBUG [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo [
   name: nxplacefulservice
   persistence provider classname: org.hibernate.ejb.HibernatePersistence
classloader: [EMAIL PROTECTED] url=file:/opt/jboss-4.0.4.GA/server/default/deploy/nuxeo.ear/ ,addedOrder=42}
   Temporary classloader: null
   excludeUnlistedClasses: false
   JTA datasource: [EMAIL PROTECTED]
   Non JTA datasource: null
   Transaction type: JTA
PU root URL: file:/opt/jboss-4.0.4.GA/server/default/deploy/nuxeo.ear/platform/nuxeo-platform-placeful-facade-5.1-SNAPSHOT.jar/
   Jar files URLs []
   Managed classes names [
       org.nuxeo.ecm.platform.ec.notification.UserSubscription
       org.nuxeo.ecm.webapp.theme.negotiation.LocalThemeConfig]
   Mapping files names []
   Properties [
hibernate.jndi.java.naming.factory.url.pkgs: org.jboss.naming:org.jnp.interfaces hibernate.cache.provider_class: org.hibernate.cache.HashtableCacheProvider hibernate.jndi.java.naming.factory.initial: org.jnp.interfaces.NamingContextFactory hibernate.transaction.manager_lookup_class: org.hibernate.transaction.JBossTransactionManagerLookup hibernate.jacc.ctx.id: nuxeo-platform-placeful-facade-5.1-SNAPSHOT.jar
       hibernate.hbm2ddl.auto: update
       jboss.entity.manager.jndi.name: java:/nxplacefulservice
       hibernate.bytecode.use_reflection_optimizer: false
       hibernate.bytecode.provider: javassist]
2007-05-17 10:35:03,206 DEBUG [org.hibernate.ejb.Ejb3Configuration] Detect class: true; detect hbm: true 2007-05-17 10:35:03,206 DEBUG [org.hibernate.ejb.Ejb3Configuration] Detect class: true; detect hbm: true 2007-05-17 10:35:03,209 INFO [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: org.nuxeo.ecm.platform.ec.placeful.ejb.SubscriptionConfig 2007-05-17 10:35:03,211 WARN [org.hibernate.ejb.Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null. 2007-05-17 10:35:03,213 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Starting failed persistence.units:ear=nuxeo.ear,jar=nuxeo-platform-placeful-facade-5.1-SNAPSHOT.jar,unitName=nxplacefulservice javax.persistence.PersistenceException: [PersistenceUnit: nxplacefulservice] class or package not found


that's because 'persistence.xml' is in 'nuxeo-platform-placeful-facade' and refers to a class in 'org.nuxeo.ecm.webapp-core'.

It seems like a weird dependency, in the same way that 'nuxeo-platform-placeful-facade' depends on 'nuxeo-platform-notification-core' and vice-versa.

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

Reply via email to