PaloT wrote: > > Hi Patrik, > I'm reusing smartclient-bt project as business tier project in other > projects. I found that persistent unit generated in parent project > contains entities also from smartclient-bt project. >
That must be a bug. I have changed in JPA.xpt so that external modules are excluded. Please verify and test with smartclient. PaloT wrote: > > Only problem which > I feel is that AccessFactory implementations have name of unit manager > hard coded. e.g. from GuiDataSourceAccessFactoryImpl: > > @PersistenceContext(unitName = > "SmartlientGuiPartEntityManagerFactory") > protected void setEntityManager(EntityManager entityManager) { > this.entityManager = entityManager; > } > > The unit name is defined in extensions::helper::persistenceUnitName(Application app) You can do an around of that to redefine the unit name in smartclient-bt. PaloT wrote: > > > Can't we generate it without unitName? Do you know about any reason > why we need unitName? Shouldn't we wave default EntityManager and > avoid creating two EntityManagers? > > TNX > > Pavel > > No, it should be possible to define several units, to be able to use several databases in same app. I did that on based on customer request, so don't change. /Patrik -- View this message in context: http://old.nabble.com/Reusing-BT-projects-tp28510832s17564p28513745.html Sent from the Fornax-Platform mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer