Hi, Am Donnerstag, den 10.02.2011, 07:44 +0000 schrieb Rice Yeh: > Hi, > I have registered a ManagedServiceFactory service in an activator: > > Dictionary properties = new Hashtable(); > properties.put(Constants.SERVICE_PID, > "xs.persistence.hibernate.session.factory"); > this.hibernateConfigurationFactoryService = > context.registerService( > > ManagedServiceFactory.class.getName(), > new HibernateConfigurationFactory(), > > properties); > > Then I put a file called xs.persistence.hibernate.session.factory.cfg under > the etc directory. With config:list, I can find the configuration is noticed > by configuration admin service. However, why the updated method of > HibernateConfigurationFactory( implementation of ManagedServiceFactory) is > never called? What more should I do?
Not really, 100% sure. But it looks like you are creating a regular configuration and not a factory configuration. For the ManagedServiceFactory to be called you have to create a factory configuraiton. Again, I am not sure, but I think this would be done if you call your configuration file something like xs.persistence.hibernate.session.factory-pidalias.cfg This should create a factory configuration with factory PID xs.persistence.hibernate.session.factory and an automatically generated PID and provide this to your ManagedServiceFactory. Regards Felix > > Rice --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

