Class: JMS::OracleAQConnectionFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/jms/oracle_a_q_connection_factory.rb

Overview

Connection Factory to support Oracle AQ

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#password=(value) ⇒ Object (writeonly)

Sets the attribute password

Parameters:

  • value

    the value to set the attribute password to.



22
23
24
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 22

def password=(value)
  @password = value
end

#urlObject

Returns the value of attribute url.



21
22
23
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 21

def url
  @url
end

#usernameObject

Returns the value of attribute username.



21
22
23
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 21

def username
  @username
end

Instance Method Details

#create_connectionObject

Creates a connection per standard JMS 1.1 techniques from the Oracle AQ JMS Interface



25
26
27
28
29
30
31
32
# File 'lib/jms/oracle_a_q_connection_factory.rb', line 25

def create_connection
  cf = oracle.jms.AQjmsFactory.getConnectionFactory(@url, java.util.Properties.new)
  if username
    cf.createConnection(@username, @password)
  else
    cf.createConnection()
  end
end