Have you searched the forums? Approaches for this have been discussed in the past.
darranl, thanks for your reply. I searched the foruns and found some info, but unfortunatly, everyone seems to conclude that (currently) this is impossible to do.
The question came up because I was having some problems connecting DIRECTLY to a database inside my bean, that is, with a new Connection(), instead of using DataSources. Is there any issue with this approach? After some time, Oracle started throwing "cannot alocate shared memory" errors, and a database restart was needed to solve the problem.
So, I tryed the DataSource approach, and the problem was solved. But this is impossible, because the database access information is delivered in runtime, so a runtime and programtically DataSource creation was necessary.
If anyone can help me it would be really great, because the production environment is currently in hold because of this issue.
Thanks in advance,
If it is impossible, as a workaround could you generate the *-ds.xml file and copy it to your deploy directory?
Humm... Yes, that could work, but it's kind of a "medieval" approach, isn't it :)? Also, I think there are some timing issues involved, as the descriptor is auto-deployed. Do you know any drawback about using "raw" connections, that is, created directly with a new Connection()?
Thank you a lot,