JBoss Community

Re: Provide one datasource with two different JNDI names

created by jaikiran pai in JNDI and Naming - View the full discussion

I misunderstood your first question then. The NamingAlias just creates a LinkRef for a source to target jndi name.

 

From what I see in your latest post, you are trying something different. The DefaultDS does some other things that just binding to JNDI at java:DefaultDS. For example, there are multiple MBeans which are created using the "DefaultDS" as the name for those services. And then there are numerous other services which depend on the name of this DefaultDS MBeans. So in your case, when you drop the DefaultDS in favour of the MyDataSource name, you have to make sure that the dependent MBeans also you this new name to depend on.

 

This wiki http://community.jboss.org/wiki/ChangeDefaultDataSource has the details of which exact files need to be changed.

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community