Class: JMS::OracleAQConnectionFactory
- Inherits:
-
Object
- Object
- JMS::OracleAQConnectionFactory
- Defined in:
- lib/jms/oracle_a_q_connection_factory.rb
Overview
Connection Factory to support Oracle AQ
Instance Attribute Summary collapse
-
#password ⇒ Object
attr_writer :password.
-
#url ⇒ Object
Returns the value of attribute url.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#create_connection(*args) ⇒ Object
Creates a connection per standard JMS 1.1 techniques from the Oracle AQ JMS Interface.
Instance Attribute Details
#password ⇒ Object
attr_writer :password
25 26 27 |
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 25 def password @password end |
#url ⇒ Object
Returns the value of attribute url.
23 24 25 |
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 23 def url @url end |
#username ⇒ Object
Returns the value of attribute username.
23 24 25 |
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 23 def username @username end |
Instance Method Details
#create_connection(*args) ⇒ Object
Creates a connection per standard JMS 1.1 techniques from the Oracle AQ JMS Interface
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 28 def create_connection(*args) # Since username and password are not assigned (see lib/jms/connection.rb:200) # and connection_factory.create_connection expects 2 arguments when username is not null ... if args.length == 2 @username = args[0] @password = args[1] end # Full Qualified name causes a Java exception #cf = oracle.jms.AQjmsFactory.getConnectionFactory(@url, java.util.Properties.new) cf = AQjmsFactory.getConnectionFactory(@url, java.util.Properties.new) if username cf.createConnection(@username, @password) else cf.createConnection() end end |