Class: Reigns::JNDIContext
- Inherits:
-
Object
- Object
- Reigns::JNDIContext
- Defined in:
- lib/reigns/jndi_context.rb
Instance Method Summary collapse
-
#initialize(mappings) ⇒ JNDIContext
constructor
A new instance of JNDIContext.
- #lookup(name) ⇒ Object
Constructor Details
#initialize(mappings) ⇒ JNDIContext
Returns a new instance of JNDIContext.
7 8 9 10 11 |
# File 'lib/reigns/jndi_context.rb', line 7 def initialize(mappings) System.setProperty("java.naming.factory.initial", "com._5values.jndistub.LightweightJNDIContextFactory") @mappings = mappings LightweightJNDIContextFactory.set_context(self) end |
Instance Method Details
#lookup(name) ⇒ Object
13 14 15 |
# File 'lib/reigns/jndi_context.rb', line 13 def lookup(name) @mappings[name] end |