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
writeonly
Sets the attribute 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=(value) ⇒ Object (writeonly)
Sets the attribute password
8 9 10 |
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 8 def password=(value) @password = value end |
#url ⇒ Object
Returns the value of attribute url.
7 8 9 |
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 7 def url @url end |
#username ⇒ Object
Returns the value of attribute username.
7 8 9 |
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 7 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
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 11 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 |