Isn't there something called "Administered Object" that could help? These are arbitrary objects that will be bound in JNDI, but it's part of the JCA spec and you don't need to define them as JNDI custom resource which would be GF specific.
[Message sent by forum member 'ewernli' (ewernli)]
http://forums.java.net/jive/thread.jspa?messageID=352533