|
From: Peter S. <co...@pe...> - 2007-01-31 15:46:15
|
Hi, Until now, when using lmappletserver-addons, I've always duplicated the classes one by one and inserted into the ejb-jar of the destination project. However this has not been an optimal solution. My wish has always been to just insert lmappletserver-addons.jar as another ejb-jar in the destination ear. Now I've somehow managed to do this. The trick was to inject the lmappletserver-addons entitymanagers using jndi (since the entitymanger belongs to the destination project). If you look at EntityListManagerBean and MetaDataManagerBean, you'll see this new way of injecting... To make this work - one has to: 1. configure what entitymanager to use (it has to be exposed to jndi) in lmappletserver_conf.properties 2. from the destination projects persistence.xml all the Entity beans of lmappletserver-addons has to be referenced by class name (cannot get the <jar-file> attribute to work properly yet). 3. application.xml of the destination project must refer lmappletserver-addons.jar as an ejb module. This should be correctly set up in the lmappletserver project right now. Tell me if something doesn't work correctly anymore. And again - hope this doesn't break any of your current work.. cheers, Peter |