DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCCORE-863
Type: Bug Bug
Status: Closed Closed
Resolution: Incomplete
Priority: Testcase Required Testcase Required
Assignee: Unassigned
Reporter: Branden Visser
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
DataNucleus Core

JNDI lookups should be done with "primary class loader" as context

Created: 26/Jun/12 03:30 AM   Updated: 24/Jul/12 03:50 PM   Resolved: 13/Jul/12 10:54 AM
Component/s: Transactions
Affects Version/s: 3.0.11, 3.1.0.m4
Fix Version/s: None

Environment: Felix OSGi container

 Description  « Hide
JNDI hard-codes use of the thread's context classloader when looking up the InitialContext factory. This is problematic for OSGi where the thread's context class loader is, well, usually not the one you want doing dynamic class lookups.

We can make this better by swapping in the configured "primary class loader" (if exists) as the context class loader for the lookup, then swapping it back afterward.

Only org.datanucleus.JTATransactionImpl is impacted by this:

~/Source/datanucleus$ find . -name "*.java" -exec grep -l ".lookup(\"" {} \;

Will attach a patch for this tomorrow morning.

Branden Visser added a comment - 26/Jun/12 03:42 AM
(tomorrow morning is about 10 hours from now)

Andy Jefferson made changes - 02/Jul/12 01:05 PM
Field Original Value New Value
Priority Major [ 3 ] Incomplete [ 6 ]
Andy Jefferson added a comment - 13/Jul/12 10:54 AM
As much as there may be some problem there, you provide no way to see it nor any patch so closing.

Andy Jefferson made changes - 13/Jul/12 10:54 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Incomplete [ 4 ]
Andy Jefferson made changes - 24/Jul/12 03:50 PM
Status Resolved [ 5 ] Closed [ 6 ]