Class: JMS::OracleAQConnectionFactory

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

Overview

Wrapper 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.



497
498
499
# File 'lib/jms/connection.rb', line 497

def password=(value)
  @password = value
end

#urlObject

Returns the value of attribute url.



496
497
498
# File 'lib/jms/connection.rb', line 496

def url
  @url
end

#usernameObject

Returns the value of attribute username.



496
497
498
# File 'lib/jms/connection.rb', line 496

def username
  @username
end

Instance Method Details

#create_connectionObject

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



500
501
502
503
504
505
506
507
# File 'lib/jms/connection.rb', line 500

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