Oh, please don't tell me that EJB3 still requires that you bake configuration into the deployed artifact. :(

I generally would use a JNDI based lookup for the connection that would always be the same inside the code/configuration, and then you just need to configure your server depending on where it is targetting.

Anyway, if you actually need to change the values in the file, I've ranted on about this a few times before and you can probably find it in the maven users archive.

- Brett

Rinku wrote:
Hi,

I have a use case where I am trying to figure what might be an ideal (if not best) way to deal with it.

For an EJB3 project I need to toy around with a "META-INF/persistence.xml" which contains all the entity mappings.

There are two constraints:

1) Developers using Eclipse should not have to tweak any values manually in the xml above. I'd like them to be able to simply run the maven eclipse:eclipse goal and refresh the projects and it should work.

2) When the application is deployed on the an integration or production environment, the persistence.xml should reflect the correct DB connection and other property values. I could achieve this by using filters for different profiles but for the (1) constraint above :-(

Ideally I just want to maintain only one common persistence.xml *or* a common source that can generate the persistence.xml. I had a fleeting look at Modello and Doxia but I am probably way off-track here. Any ideas? Appreciate any pointers.

Cheers,

Rahul


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Brett Porter <[EMAIL PROTECTED]>
Apache Maven - http://maven.apache.org/
Better Builds with Maven - http://library.mergere.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to