In trying to define my own JNDI resources using BeanFactory I came across a number of bugs.
Bugs: 1) The howto examples used the newer <resource-env-ref> inplace of <resource-ref>. Problem is that BeanFactory does not work with <resource-env-ref>. It just returns null. 2) BeanFactory checks for instances of a ResourceRef object, if the object passed isn't one BeanFactory just returns null. No error is logged or exception thrown. This made debugging more difficult than it should have been. It later casts the object to a Reference not a ResourceRef. 3) BeanFactory tries to put the value from <description> element into the object as a parameter. If it can't find a setDescription method it throws a NamingException. Fixes: 1) BeanFactory should be checking for instances of Reference not ResourceRef. ResourceRef and ResourceEnvRef both subclass Reference. 2) BeanFactory should throw a NamingException if the object is not an instanceof Reference. 3) Description parameter should be ignored. I have attached a fixed BeanFactory.java. There are quite a few messages in the archive that relate to BeanFactory problems and the howto examples do not work, so I hope someone will add this to the source tree. Rick Hansen
BeanFactory.java
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>