https://github.com/lance/dm-ispan-preso
Sample code and presentation notes StrangeLoop 2011 talk
https://github.com/lance/dm-ispan-preso
Last synced: 11 months ago
JSON representation
Sample code and presentation notes StrangeLoop 2011 talk
- Host: GitHub
- URL: https://github.com/lance/dm-ispan-preso
- Owner: lance
- Created: 2011-09-14T17:27:09.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2011-09-16T14:01:36.000Z (almost 15 years ago)
- Last Synced: 2025-02-10T11:48:46.850Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 113 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Notes and sample code from the StrangeLoop 2011 presentation.
$ cat .rvmrc
rvm use jruby-1.6.4@beer --create
$ . .rvmrc
Using /Users/lanceball/.rvm/gems/jruby-1.6.4 with gemset beer
$ gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/
Fetching: torquebox-core-2.x.incremental.427-java.gem (100%)
Fetching: torquebox-transactions-2.x.incremental.427.gem (100%)
Fetching: blankslate-2.1.2.4.gem (100%)
Fetching: torquebox-configure-2.x.incremental.427-java.gem (100%)
Fetching: torquebox-messaging-2.x.incremental.427-java.gem (100%)
Fetching: torquebox-naming-2.x.incremental.427-java.gem (100%)
Fetching: torquebox-rake-support-2.x.incremental.427.gem (100%)
Fetching: torquebox-security-2.x.incremental.427-java.gem (100%)
Fetching: torquebox-vfs-2.x.incremental.427-java.gem (100%)
Fetching: torquebox-web-2.x.incremental.427-java.gem (100%)
Fetching: torquebox-cache-2.x.incremental.427-java.gem (100%)
Fetching: torquebox-stomp-2.x.incremental.427.gem (100%)
Fetching: torquebox-2.x.incremental.427.gem (100%)
Fetching: thor-0.14.6.gem (100%)
Fetching: torquebox-server-2.x.incremental.427-java.gem (100%)
Error: Your application used more memory than the safety cap of 500m.
Specify -J-Xmx####m to increase it (#### = cap size in MB).
Specify -w for full OutOfMemoryError stack trace
>> lanceball @ Neptune (jruby-1.6.4@beer) ~/dm-ispan-preso [master*] <<
$ jurby -S -J-Xmx1024m gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/
-bash: jurby: command not found
>> lanceball @ Neptune (jruby-1.6.4@beer) ~/dm-ispan-preso [master*] <<
$ jruby -S -J-Xmx1024m gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/
Successfully installed torquebox-server-2.x.incremental.427-java
1 gem installed
>> lanceball @ Neptune (jruby-1.6.4@beer) ~/dm-ispan-preso [master*] <<
$ gem install bundler
Fetching: bundler-1.0.18.gem (100%)
Successfully installed bundler-1.0.18
1 gem installed
>> lanceball @ Neptune (jruby-1.6.4@beer) ~/dm-ispan-preso [master*] <<
$ bundle install
Fetching source index for http://torquebox.org/2x/builds/LATEST/gem-repo/
Fetching source index for http://rubygems.org/
Using rake (0.9.2)
Installing addressable (2.2.6)
Installing bcrypt-ruby (2.1.4)
Using bundler (1.0.18)
Installing dm-core (1.1.0)
Installing fastercsv (1.5.4)
Installing json (1.4.6)
Installing dm-serializer (1.1.0)
Installing dm-timestamps (1.1.0)
Installing stringex (1.2.2)
Installing uuidtools (2.1.2)
Installing dm-types (1.1.0)
Installing haml (3.1.3)
Installing rack (1.3.2)
Installing sass (3.1.7)
Installing tilt (1.3.3)
Installing sinatra (1.2.6)
Using torquebox-core (2.x.incremental.427)
Using torquebox-cache (2.x.incremental.427)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
$ torquebox
Tasks:
torquebox deploy ROOT # Deploy an application to TorqueBox
torquebox undeploy ROOT # Undeploy an application from TorqueBox
torquebox run # Run TorqueBox
torquebox cli # Run the JBoss AS7 CLI
torquebox env [VARIABLE] # Display TorqueBox environment variables
torquebox help [TASK] # Describe available tasks or one specific task
>> lanceball @ Neptune (jruby-1.6.4@beer) ~/dm-ispan-preso [master*] <<
$ torquebox deploy .
Deployed: dm-ispan-preso-knob.yml
into: /Users/lanceball/.rvm/gems/jruby-1.6.4@beer/gems/torquebox-server-2.x.incremental.427-java/jboss/standalone/deployments
>> lanceball @ Neptune (jruby-1.6.4@beer) ~/dm-ispan-preso [master*] <<
$ cat /Users/lanceball/.rvm/gems/jruby-1.6.4\@beer/gems/torquebox-server-2.x.incremental.427-java/jboss/standalone/deployments/dm-ispan-preso-knob.yml
---
application:
root: /Users/lanceball/dm-ispan-preso
environment: {}
$ torquebox run
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /Users/lanceball/.rvm/gems/jruby-1.6.4@beer/gems/torquebox-server-2.x.incremental.427-java/jboss
JAVA: /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home//bin/java
JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
16:20:35,588 INFO [org.jboss.modules] JBoss Modules version 1.0.2.GA
16:20:35,864 INFO [org.jboss.msc] JBoss MSC version 1.0.1.GA
16:20:35,909 INFO [org.jboss.as] JBoss AS 7.x.incremental.109 "Lightning" starting
16:20:36,556 INFO [org.torquebox.jobs.as] readElement
16:20:36,557 INFO [org.torquebox.jobs.as] done readElement
16:20:36,717 INFO [org.torquebox.bootstrap] Bootstrapping TorqueBox
16:20:36,718 INFO [org.torquebox.bootstrap] ===> /Users/lanceball/.rvm/rubies/jruby-1.6.4
16:20:36,718 INFO [org.torquebox.bootstrap] Adding: /Users/lanceball/.rvm/rubies/jruby-1.6.4/lib/jruby.jar
16:20:36,720 INFO [org.torquebox.bootstrap] Swizzle: [org.jboss.modules.ResourceLoaderSpec@76a8a314, org.jboss.modules.ResourceLoaderSpec@396ab2e8]
16:20:36,734 INFO [org.torquebox.core.as] Initializing TorqueBox Core Subsystem
16:20:36,736 INFO [org.torquebox.cdi.as] Initializing TorqueBox CDI Subsystem
16:20:36,738 INFO [org.torquebox.jobs.as] Initializing TorqueBox jobs Subsystem
16:20:36,740 INFO [org.torquebox.messaging.as] Initializing TorqueBox Messaging Subsystem
16:20:36,742 INFO [org.torquebox.security.as] Initializing TorqueBox Auth Subsystem
16:20:36,743 INFO [org.torquebox.services.as] Initializing TorqueBox Services Subsystem
16:20:36,746 INFO [org.torquebox.stomp.as] Initializing TorqueBox STOMP Subsystem
16:20:36,756 INFO [org.torquebox.web.as] Initializing TorqueBox Web Subsystem
16:20:36,761 INFO [org.torquebox.cache.as] Initializing TorqueBox Cache Subsystem
16:20:36,812 WARN [org.jboss.as] No security realm defined for native management service, all access will be unrestricted.
16:20:36,880 INFO [org.jboss.as] creating http management service using network interface (management) port (9990)
16:20:36,882 WARN [org.jboss.as] No security realm defined for http management service, all access will be unrestricted.
16:20:36,888 INFO [org.jboss.as.logging] Removing bootstrap log handlers
16:20:36,917 INFO [org.jboss.as.connector.subsystems.datasources] (Controller Boot Thread) Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)
16:20:36,937 INFO [org.jboss.as.clustering.infinispan.subsystem] (Controller Boot Thread) Activating Infinispan subsystem.
16:20:36,991 INFO [org.jboss.as.jacorb] (Controller Boot Thread) Activating JacORB Subsystem
16:20:37,062 INFO [org.jboss.as.naming] (Controller Boot Thread) Activating Naming Subsystem
16:20:37,107 INFO [org.jboss.as.naming] (MSC service thread 1-15) Starting Naming Service
16:20:37,109 INFO [org.jboss.as.mail.extension.MailSessionAdd] (MSC service thread 1-7) Bound mail session [java:jboss/mail/Default]
16:20:37,110 INFO [org.jboss.as.osgi] (Controller Boot Thread) Activating OSGi Subsystem
16:20:37,126 INFO [org.jboss.as.security] (Controller Boot Thread) Activating Security Subsystem
16:20:37,131 INFO [org.jboss.remoting] (MSC service thread 1-12) JBoss Remoting version 3.2.0.Beta2
16:20:37,138 INFO [org.xnio] (MSC service thread 1-12) XNIO Version 3.0.0.Beta3
16:20:37,150 INFO [org.xnio.nio] (MSC service thread 1-12) XNIO NIO Implementation Version 3.0.0.Beta3
16:20:37,265 INFO [org.jboss.as.webservices] (Controller Boot Thread) Activating WebServices Extension
16:20:37,288 INFO [org.torquebox.core.as] (Controller Boot Thread) Welcome to TorqueBox AS - http://torquebox.org/
16:20:37,288 INFO [org.torquebox.core.as] (Controller Boot Thread) version........... 2.x.incremental.427
16:20:37,288 INFO [org.torquebox.core.as] (Controller Boot Thread) build............. 427
16:20:37,288 INFO [org.torquebox.core.as] (Controller Boot Thread) revision.......... afad7f23a297e6daed35fff16f4f70a1814773d9 +modifications
16:20:37,288 INFO [org.torquebox.core.as] (Controller Boot Thread) built with:
16:20:37,288 INFO [org.torquebox.core.as] (Controller Boot Thread) JBossAS......... 7.x.incremental.109
16:20:37,289 INFO [org.torquebox.core.as] (Controller Boot Thread) Quartz.......... 1.8.5
16:20:37,289 INFO [org.torquebox.core.as] (Controller Boot Thread) JRuby........... 1.6.4
16:20:37,322 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-13) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/local/ImageMagick-6.6.9/lib/:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
16:20:37,347 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-15) JBoss Web Services - Stack CXF Server 4.0.0.Beta3
16:20:37,363 INFO [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-5) Starting remote JMX connector
16:20:37,375 INFO [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem
16:20:37,421 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-14) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
16:20:37,425 INFO [org.jboss.as.remoting] (MSC service thread 1-8) Listening on /127.0.0.1:9999
16:20:37,448 INFO [org.torquebox.core.runtime] (MSC service thread 1-9) Creating ruby runtime (ruby_version: RUBY1_8, compile_mode: JIT, context: global)
16:20:37,667 WARN [jacorb.codeset] (MSC service thread 1-7) Warning - unknown codeset (MacRoman) - defaulting to ISO-8859-1
16:20:37,685 INFO [org.jboss.as.connector] (MSC service thread 1-16) Starting JCA Subsystem (JBoss IronJacamar 1.0.3.Final)
16:20:37,704 INFO [org.jboss.as.jacorb] (MSC service thread 1-7) CORBA ORB Service Started
16:20:37,743 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) Bound data source [java:jboss/datasources/ExampleDS]
16:20:37,749 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-6) live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=/Users/lanceball/.rvm/gems/jruby-1.6.4@beer/gems/torquebox-server-2.x.incremental.427-java/jboss/standalone/data/messagingjournal,bindingsDirectory=/Users/lanceball/.rvm/gems/jruby-1.6.4@beer/gems/torquebox-server-2.x.incremental.427-java/jboss/standalone/data/messagingbindings,largeMessagesDirectory=/Users/lanceball/.rvm/gems/jruby-1.6.4@beer/gems/torquebox-server-2.x.incremental.427-java/jboss/standalone/data/messaginglargemessages,pagingDirectory=/Users/lanceball/.rvm/gems/jruby-1.6.4@beer/gems/torquebox-server-2.x.incremental.427-java/jboss/standalone/data/messagingpaging)
16:20:37,764 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-12) Bound data source [java:jboss/datasources/ExampleXADS]
16:20:37,776 WARNING [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-6) Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.
16:20:37,776 INFO [org.jboss.as.connector.services.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-3) Registered connection factory java:/JmsXA
16:20:37,795 INFO [org.hornetq.ra.HornetQResourceAdapter] (MSC service thread 1-3) HornetQ resource adaptor started
16:20:37,796 INFO [org.jboss.as.connector.services.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-3) IJ020002: Deployed: file://RaActivatorhornetq-ra
16:20:37,855 INFO [org.jboss.as.jacorb] (MSC service thread 1-7) CORBA Naming Service Started
16:20:37,950 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-6) Started Netty Acceptor version 3.2.3.Final-r${buildNumber} localhost:5455 for CORE protocol
16:20:37,951 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-6) Started Netty Acceptor version 3.2.3.Final-r${buildNumber} localhost:5445 for CORE protocol
16:20:37,952 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-6) Server is now live
16:20:37,953 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-6) HornetQ Server version 2.2.7.Final (HQ_2_2_7_FINAL_AS7, 121) [2cba9529-dfd8-11e0-ab10-e0f8474154b8] started
16:20:37,955 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) trying to deploy queue jms.queue.testQueue
16:20:38,023 INFO [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-2) Bound messaging object to jndi name java:/queue/test
16:20:38,044 INFO [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-5) Bound messaging object to jndi name java:/ConnectionFactory
16:20:38,046 INFO [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-7) Bound messaging object to jndi name java:/RemoteConnectionFactory
16:20:38,047 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-14) trying to deploy queue jms.topic.testTopic
16:20:38,070 INFO [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-14) Bound messaging object to jndi name java:/topic/test
16:20:39,143 INFO [org.torquebox.core.runtime] (MSC service thread 1-9) Disabling POSIX ENV passthrough for global runtime (TORQUE-497)
16:20:41,123 WARN [org.torquebox.core.runtime] (MSC service thread 1-9) No initializer set for runtime
16:20:41,141 INFO [org.torquebox.core.runtime] (MSC service thread 1-9) Created ruby runtime (ruby_version: RUBY1_8, compile_mode: JIT, context: global) in 3.56s
16:20:41,152 INFO [org.jboss.as.deployment] (MSC service thread 1-7) Started FileSystemDeploymentService for directory /Users/lanceball/.rvm/gems/jruby-1.6.4@beer/gems/torquebox-server-2.x.incremental.427-java/jboss/standalone/deployments
16:20:41,171 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.x.incremental.109 "Lightning" started in 5994ms - Started 134 of 200 services (66 services are passive or on-demand)
16:20:41,175 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) Starting deployment of "dm-ispan-preso-knob.yml"
16:20:41,381 ERROR [stderr] (MSC service thread 1-2) ADJUSTER BEFORE stompAppMetaData=null
16:20:41,435 INFO [org.torquebox.cache.as] (MSC service thread 1-11) Adding dependency on: org.torquebox.cache:main to deployment "dm-ispan-preso-knob.yml"
16:20:41,437 INFO [org.jboss.as.jpa] (MSC service thread 1-11) added javax.persistence.api dependency to dm-ispan-preso-knob.yml
16:20:41,477 INFO [org.torquebox.messaging.tasks] (MSC service thread 1-6) Deploying task queue: /queues/torquebox/dm-ispan-preso/tasks/torquebox_backgroundable
16:20:41,660 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) trying to deploy queue jms.queue./queues/torquebox/dm-ispan-preso/tasks/torquebox_backgroundable
16:20:41,687 INFO [org.torquebox.core.as] (MSC service thread 1-11) Completely deployed: dm-ispan-preso-knob.yml in 409ms
16:20:41,688 INFO [org.torquebox.core.runtime.SharedRubyRuntimePool] (MSC service thread 1-16) Starting web runtime pool asynchronously
16:20:41,691 INFO [org.torquebox.core.runtime] (Thread-31) Creating ruby runtime (ruby_version: RUBY1_8, compile_mode: JIT, app: dm-ispan-preso, context: web)
16:20:41,701 INFO [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-2) Bound messaging object to jndi name java:/queues/torquebox/dm-ispan-preso/tasks/torquebox_backgroundable
16:20:41,808 INFO [org.jboss.web] (MSC service thread 1-4) registering web context:
16:20:41,841 INFO [org.torquebox.core.runtime] (Thread-31) Disabling POSIX ENV passthrough for web runtime (TORQUE-497)
16:20:41,863 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "dm-ispan-preso-knob.yml"
16:20:43,198 INFO [org.torquebox.core.runtime] (Thread-31) Created ruby runtime (ruby_version: RUBY1_8, compile_mode: JIT, app: dm-ispan-preso, context: web) in 1.5s