Ok, thanks for your reply.
I have tried to use the <jar-file> tag in the persistence.xml but when I use it, I must set the path from the path where JBoss is running (run.bat in windows) and not from the deploy dir, is it normal ?
So, ok, the "update entities.jar problem" is resolved but another one is related to it :
For example, in one server, the session/entity beans will be used only by one client and so, it will access only one database. But in another server, the session/entity beans may be used by two or more clients and so, it will access two or more databases. And for the moment, from time to time,
some clients add themselves access to database to the software which is used (a visual basic soft) until the Java EE will be used.
So, two questions :
1) Is it possible to avoid to use the @PersistenceContext(unitName="xxxxx") annotation in the session beans and to tell to the entity manager which persistence unit to use and to reload the entities in memory ? Perhaps, using the EntityManagerFactory ?
2) Is it possible to modify the persistence.xml with a session bean to add/modify/delete a persistence unit and then to reload the ear in memory (if the ear is not compress in one file but deploy in a directory) ?
Thanks.
Olivier
|