Some more info. JBOss 3.2.6. I tried to debug and found that:
exception is frown in TXConnectionManager:
public Object allocateConnection(ManagedConnectionFactory mcf,
if (poolingStrategy == null)
throw new ResourceException("You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.");
Why poolingStrategy is null?
I found that the object TXConnectionManager which is called is the first one which was ever contructed by JBoss (on startup). Any further changing of datasource.xml stops previous TXConnectionManager (which does poolingStrategy = null - see stopService) and creates and starts new one. But finder/QL still sees the previous TXConnectionManager.
More important is that I have also in the code some BMP (take datasource by jndi, getConntection). As you can suspect it WORKS. So hot deployment of datasource works for BMP, doesn't work for CMP. Is there a special tag to tell that CMP should reflect the changes of datasource?
Can you commit that it ever worked for CMP beans? Any clue how to go on?
This is officially my last post (for non bug related questions) until the portal developers
provide a mechanism to weed out these posts by lazy users.
The FAQ is there for a reason.....
Adrian, I don't undestand your possition.
I'm not 'lazy user', before making post I check forum and wiki for half a day. And as you have seen I tried to debug and UNDERSTAND what is going on after redeploying of DS.
Also several other people have seen my post - no answer, so seems that noone is aware of the problem !!! Or JBoss have bad help-community.
Wiki is great way of publishing workaround - but as many other EJB servers provide such BASIC functionality, why not to mention in User Guide, or simply implement it in the box. You will always deal with such questions, as the users don't need to know detailes of internals of JBoss to achieve BASIC funtionality.
Now technical part:
I've seen this Wiki page, but it didn't seem to me as solution. Reading the header:
The goal is to dynamically change the datasource, for example,
* for entity beans at runtime.
* The service implements javax.sql.DataSource interface and is bound in the JNDI.
* The target datasource can be changed with setTargetName(String jndiName) passing in
* the JNDI name of the target datasource.
I understand that this mbean is for changing dynamicaly the underlying jndi name for Entity Bean, so ignored as something else. Also keep in mind that I was still thinking that it is basic functionality and I forgot to set something in descriptor or datasource configuration.
And thanks for help
I just wanted to add that I _also_ see this problem with my current jboss: 3.2.5.
Also, I didn't find anywhere anything about this problem.
If someone could point me to some directions...
I also noted that this seems to be fixed in 4.0.2. I don't know if this was preivously fixed, I only tested 4.0.2 today and tried that.
I hope it helps.