Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368366 - Support JNDI in the Java runtime
Summary: Support JNDI in the Java runtime
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Justin Spadea CLA
QA Contact:
URL:
Whiteboard: jndi
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-11 11:32 EST by Justin Spadea CLA
Modified: 2017-02-23 14:17 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Spadea CLA 2012-01-11 11:32:40 EST
A new type will be added to the system parts in package eglx.persistence.sql:

externalType SQLJNDIDataSource extends SQLDataSource type NativeType
end

It has no new API, it just obtains the Connection differently than plain JDBC
(SQLDataSource). Users can manually instantiate this, or they can use resource
bindings. It has the same constructors as SQLDataSource, but you pass in the
JNDI name instead of the JDBC URL. If the data source is using Application
authentication instead of Container authentication, the user can pass in a
dictionary with the 'user' and 'password' attributes.

Corresponding Java class for SQLJNDIDataSource will be added to the runtime, subclassing SQLDataSource.
SysLib.getResource() will create SQLJNDIDataSource when the jndi:// URI for a
binding is used.
An SQLException will be thrown if the lookup fails (the name is not found, or the InitialContext cannot be created - as is typically true in non-JEE environments).
Comment 1 Lisa Lasher CLA 2012-01-23 15:42:22 EST
changing target from M1 to M2
Comment 2 Justin Spadea CLA 2012-02-01 13:40:27 EST
Implemented as described in comment 1.
Comment 3 Justin Spadea CLA 2012-02-22 08:52:27 EST
Closing