Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Actually lay down jruby by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobmcwhirter committed May 1, 2012
1 parent 3abbc29 commit e81af6d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions build/assembly/lib/assembly_tool.rb
Expand Up @@ -160,7 +160,7 @@ def increase_deployment_timeout(doc)
if options[:deployment_timeout]
profiles = doc.root.get_elements( '//profile' )
profiles.each do |profile|
subsystem = profile.get_elements( "subsystem[@xmlns='urn:jboss:domain:deployment-scanner:1.1']" ).first
subsystem = profile.get_elements( "subsystem[contains(@xmlns,'urn:jboss:domain:deployment-scanner:')]" ).first
scanner = subsystem.get_elements( 'deployment-scanner' ).first
scanner.add_attribute( 'deployment-timeout', options[:deployment_timeout] )
end
Expand All @@ -170,7 +170,7 @@ def increase_deployment_timeout(doc)
def add_cache(doc)
profiles = doc.root.get_elements( '//profile' )
profiles.each do |profile|
subsystem = profile.get_elements( "subsystem[@xmlns='urn:jboss:domain:infinispan:1.2']" ).first
subsystem = profile.get_elements( "subsystem[contains(@xmlns, 'urn:jboss:domain:infinispan:')]" ).first
container = subsystem.add_element( 'cache-container', 'name'=>'torquebox', 'default-cache'=>'sessions' )
cache = container.add_element( 'local-cache', 'name'=>'sessions' )
cache.add_element( 'eviction', 'strategy'=>'LRU', 'max-entries'=>'10000' )
Expand All @@ -181,7 +181,7 @@ def add_cache(doc)
def add_ha_cache(doc)
profiles = doc.root.get_elements( '//profile' )
profiles.each do |profile|
subsystem = profile.get_elements( "subsystem[@xmlns='urn:jboss:domain:infinispan:1.2']" ).first
subsystem = profile.get_elements( "subsystem[contains(@xmlns,'urn:jboss:domain:infinispan:')]" ).first
container = subsystem.get_elements( "cache-container[@name='web']" ).first
#subsystem.get_elements( "cache-container" ).each do |c|
#puts "CACHE_CONTAINER: #{c.to_s}"
Expand Down Expand Up @@ -228,7 +228,7 @@ def add_subsystems(doc, extra_subsystems)
end

def add_subsystem(element, name)
previous_subsystem = element.get_elements( "subsystem[@xmlns='urn:jboss:domain:#{name}:1.0']" )
previous_subsystem = element.get_elements( "subsystem[contains(@xmlns, 'urn:jboss:domain:#{name}:')]" )
if ( previous_subsystem.empty? )
#element.add_element( 'subsystem', 'xmlns'=>"urn:jboss:domain:#{name}:1.0" )
element.add_element( subsystem_element( name ) )
Expand Down Expand Up @@ -270,7 +270,7 @@ def add_socket_bindings(doc)
end

def add_messaging_socket_binding(doc)
doc.root.get_elements( "//subsystem[@xmlns='urn:jboss:domain:messaging:1.1']/hornetq-server" ).each do |hornetq_server|
doc.root.get_elements( "//subsystem[contains(@xmlns,'urn:jboss:domain:messaging:')]/hornetq-server" ).each do |hornetq_server|
hornetq_server.get_elements( 'broadcast-groups/broadcast-group' ).each do |broadcast_group|
broadcast_group.delete_element( 'group-address' )
broadcast_group.delete_element( 'group-port' )
Expand Down Expand Up @@ -304,7 +304,7 @@ def remove_non_web_subsystems(doc)
profiles = doc.root.get_elements( '//profile' )
profiles.each do |profile|
to_remove.each do |name|
profile.delete_element( "subsystem[@xmlns='urn:jboss:domain:#{name}:1.1']" )
profile.delete_element( "subsystem[contains(@xmlns,'urn:jboss:domain:#{name}:')]" )
end
end
end
Expand Down Expand Up @@ -383,7 +383,7 @@ def enable_messaging_jmx(doc)
end

def adjust_messaging_config(doc)
hornetq_server = doc.root.get_elements( "//subsystem[@xmlns='urn:jboss:domain:messaging:1.1']/hornetq-server" ).first
hornetq_server = doc.root.get_elements( "//subsystem[contains(@xmlns, 'urn:jboss:domain:messaging:')]/hornetq-server" ).first
address_setting = hornetq_server.get_elements( "address-settings/address-setting" ).first
address_setting.get_elements( 'address-full-policy' ).first.text = 'PAGE'
address_setting.get_elements( 'max-size-bytes' ).first.text = '20971520'
Expand All @@ -397,15 +397,15 @@ def adjust_messaging_config(doc)
end

def remove_messaging_security(doc)
doc.root.get_elements( "//subsystem[@xmlns='urn:jboss:domain:messaging:1.1']/hornetq-server" ).each do |hornetq_server|
doc.root.get_elements( "//subsystem[contains(@xmlns,'urn:jboss:domain:messaging:')]/hornetq-server" ).each do |hornetq_server|
e = REXML::Element.new( 'security-enabled' )
e.text = 'false'
hornetq_server.add_element( e )
end
end

def fix_messaging_clustering(doc)
hornetq_server = doc.root.get_elements( "//subsystem[@xmlns='urn:jboss:domain:messaging:1.1']/hornetq-server" ).first
hornetq_server = doc.root.get_elements( "//subsystem[contains(@xmlns,'urn:jboss:domain:messaging:')]/hornetq-server" ).first

e = REXML::Element.new( 'cluster-user' )
e.text = 'admin'
Expand Down Expand Up @@ -452,7 +452,7 @@ def add_logger_categories(doc)
categories = { 'org.jboss.jca.adapters.jdbc.extensions.mysql' => 'ERROR' }
profiles = doc.root.get_elements( '//profile' )
profiles.each do |profile|
subsystem = profile.get_elements( "subsystem[@xmlns='urn:jboss:domain:logging:1.1']" ).first
subsystem = profile.get_elements( "subsystem[contains(@xmlns,'urn:jboss:domain:logging:')]" ).first
categories.each_pair do |category, level|
container = subsystem.add_element( 'logger', 'category' => category )
container.add_element( 'level', 'name' => level )
Expand All @@ -464,7 +464,7 @@ def adjust_modcluster_config(doc)
profiles = doc.root.get_elements( '//profile' )
profiles.each do |profile|

subsystem = profile.get_elements( "subsystem[@xmlns='urn:jboss:domain:modcluster:1.0']" ).first
subsystem = profile.get_elements( "subsystem[contains(@xmlns,'urn:jboss:domain:modcluster:')]" ).first
unless subsystem.nil?
config = subsystem.get_elements( 'mod-cluster-config' ).first
config.add_attribute( 'excluded-contexts', 'invoker,jbossws,juddi,console' )
Expand Down

0 comments on commit e81af6d

Please sign in to comment.