Message Driven Beans
Hi Dudes,
my application is using Message driven beans and im giving JNDI provider details ,initial context factory and provider url, in my appication server specific DTD.In my whole application ear these are the hardcoded values.So if I want my application to work with different JNDI provider then i need to build new ear file which will have current JNDI provider details in MDB's DTD. I dont want to change my ear file becuse of change in JNDI provider. Is there any way to remove these jndi provider details from DTD and specify in any file location so that i can have same ear file independent of JNDI provider? or any other solution how can i avoid changing ear file?
thanks ans regards,
a s k
> Hi Dudes,
>
> my application is using Message driven beans and im
> giving JNDI provider details ,initial context factory
> and provider url, in my appication server specific
> DTD.In my whole application ear these are the
> hardcoded values.So if I want my application to work
> with different JNDI provider then i need to build
> new ear file which will have current JNDI provider
> details in MDB's DTD. I dont want to change my ear
> file becuse of change in JNDI provider. Is there any
> way to remove these jndi provider details from DTD
> and specify in any file location so that i can have
> same ear file independent of JNDI provider? or any
> other solution how can i avoid changing ear file?
The J2EE way is to not include a JNDI provider in your EAR but to reference the J2EE resources you need in your EAR so that the J2EE application server can have those things created for you. e.g. JDBC resources you should reference in your EAR - not include your own JNDI provider to define what the database connection is.
So just create references to external JNDI resources that its the responsibility of the J2EE container - not the EAR - to define and you should be able to deploy your EAR in any app server.
James
http://logicblaze.com/