0 Replies Latest reply on Nov 8, 2006 11:00 AM by vangomjj

    EJB CMP persistence with existing oracle schemas.


      Hi all,

      Currently we are in the process of converting a client-server type system to an n-tier system. As such, all of our users have their own schema within our oracle database. However, it seems to me that JBoss doesn?t really support direct connections to a particular schema. Let me rephrase that a bit, EJB entity manager injection for CMP persistence does not seem to take to kindly to it. The entity manager seems to rather have a generic user allowing for all of the processing to occur as that user. Ideally I would like the entity manager to connect to the appropriate schema, allowing for our current user schema securities to be leveraged.

      Oracle apparently has a way to support a generic user connection pool while allowing a direct schema access through the generic user, utilizing Oracle Proxy Connections. Ideally I would like to leverage this functionality in my entity manager for my CMP persistence. Has anyone been able to achieve this? Is it possible?

      As it stands right now I can?t even get the OracleOCIConnectionPool I define as my data source. Currently the WrapperDataSource wraps the OracleOCIConnectionPool, and there seems to be no way of being able to pull the original oracle pool out. Is there a solid reason why I should not be able to retrieve my initially defined data source? Would this class ever have the ability to return me my original data source? It almost seems to me that it?s nearly impossible for me to provide my own implementations in special cases to better support my needs.

      Any suggestions? Is there a better way to provide my schema-based permissions, with my CMP beans? Or am I really going to have to have a generic connection pool account that has every possible permission I would ever need for an application?