Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modify LocalContext to support minimal LocalConfig for JMS

Signed-off-by: Nick Sieger <nick@nicksieger.com>
  • Loading branch information...
commit 6649e9532f3ed0cc58aecf6774faa1f23e9353b9 1 parent 5f51d8f
@gconaty gconaty authored nicksieger committed
Showing with 16 additions and 0 deletions.
  1. +16 −0 src/main/ruby/jruby/rack/queues/local.rb
View
16 src/main/ruby/jruby/rack/queues/local.rb
@@ -48,6 +48,18 @@ def finishedWithApplication(app)
end
end
+ class LocalConfig < java.lang.Object
+ include Java::OrgJrubyRack::RackConfig
+
+ def getJmsJndiProperties
+ LocalContext.init_parameters['jms.jndi.properties']
+ end
+
+ def getJmsConnectionFactory
+ LocalContext.init_parameters['jms.connection.factory']
+ end
+ end
+
class LocalContext < java.lang.Object
include Java::OrgJrubyRack::RackContext
@@ -59,6 +71,10 @@ def self.init_parameters=(params)
@params = params
end
+ def getConfig
+ @rack_config ||= LocalConfig.new
+ end
+
def getInitParameter(k)
self.class.init_parameters[k]
end
Please sign in to comment.
Something went wrong with that request. Please try again.