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

[726 byte] By [surspritea] at [2007-10-2 5:29:32]
# 1
Hi Can any body help me out in configuring JNDI provider details from outside deployment descriptors.Many thanks
surspritea at 2007-7-16 1:31:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
I dont think this is possible. MDBs are loaded when the server deploys the file and this is the only deployment file which it can look at. I dont think we can have it spearate out in a specific file.Did u check the JMS specifications? Did u find any leadS?
pazhanikanthana at 2007-7-16 1:31:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
> Can any body help me out in configuring JNDI provider> details from outside deployment descriptors.See http://activemq.org/JNDI+SupportJames http://logicblaze.com/
strachaja at 2007-7-16 1:31:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4

> 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/

strachaja at 2007-7-16 1:31:08 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...