Loading mapping files from ManagedConnectionFactoryImpl in WebLogic

Description

ManagedConnectionFactoryImpl.initialize() passes the contextClassLoader from the thread to load the mapping files in Configuration.addResource.
This works fine (in both JBoss and WebLogic) IF the mapping files are on the class path of the application server.

It also works on JBoss when the mapping files are packaged with the connector deployment (-ds.xml). (The mapping files are found through JBoss' UnifiedClassLoader architecture.)

However, in WebLogic, the configuration files are not found when they are packaged with the individual deployment. This seems to be because the thread that deploys the component corresponds to the root thread on the application server, and therefore uses the Launcher$AppClassLoader. The actual class loader used to load the deployed connector (GenericClassLoader) is managed by the deploymer components of weblogic.

Changin the class loader passed to Configuration.addResource by the ManagedConnectionFactoryImpl to getClass().getClassLoader() seems to result in the desired ability to load the mapping files from the deployment directory.
Since the ManagedConnectionFactoryImpl is only used when deploying to an application server, I would assume that this has no adverse affects and it seems correct, but these class loader issues are quite mind boggling.

Environment

Windows 2000, WebLogic 8.1 (on windows 2000)

Assignee

Daniel Bradby

Reporter

Ethan Wolf

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Affects versions

Priority

Minor
Configure