With Rails-integration - is there a way (configuration option) to have servlet preload the jruby on startup rather than waiting for first hit?
There is a delay on the first hit while waiting for jruby to spin up, so I'd rather take that hit at startup. Also this might prevent another error I have sporadically seen (usually on the first time I hit page), I will often get in the logs an exception Linkage error and sometimes it is sent back to the browser on the first hit. Hitting the page again usually works fine. So I am thinking that if I can spool things up on startup maybe I'll avoid both of these issues and be ready for the first webpage hit. Below is the sporadic exception that sometimes makes its way up. Thanks for any help! Jeff -------------- 2007-04-26 10:18:30,105 INFO [org.jboss.web.localhost.Engine] StandardContext[/jrails]rails: Ruby is running in standalone mode 2007-04-26 10:18:30,435 INFO [STDOUT] java.lang.LinkageError: duplicate class definition: org/jruby/RubyObjectInvokerinitializexx1 2007-04-26 10:18:30,435 INFO [STDOUT] at java.lang.ClassLoader.defineClass0(Native Method) 2007-04-26 10:18:30,435 INFO [STDOUT] at java.lang.ClassLoader.defineClass(ClassLoader.java:539) 2007-04-26 10:18:30,435 INFO [STDOUT] at java.lang.ClassLoader.defineClass(ClassLoader.java:448) 2007-04-26 10:18:30,435 INFO [STDOUT] at org.jruby.util.JRubyClassLoader.defineClass(JRubyClassLoader.java:16) 2007-04-26 10:18:30,435 INFO [STDOUT] at org.jruby.runtime.callback.InvocationCallbackFactory.endCall( InvocationCallbackFactory.java:162) 2007-04-26 10:18:30,455 INFO [STDOUT] at org.jruby.runtime.callback.InvocationCallbackFactory.getOptMethod( InvocationCallbackFactory.java:496) 2007-04-26 10:18:30,455 INFO [STDOUT] at org.jruby.RubyObject.createObjectClass(RubyObject.java:148) 2007-04-26 10:18:30,455 INFO [STDOUT] at org.jruby.Ruby.initCoreClasses (Ruby.java:665) 2007-04-26 10:18:30,455 INFO [STDOUT] at org.jruby.Ruby.init(Ruby.java :588) 2007-04-26 10:18:30,455 INFO [STDOUT] at org.jruby.Ruby.newInstance( Ruby.java:243) 2007-04-26 10:18:30,455 INFO [STDOUT] at org.jruby.Ruby.getDefaultInstance(Ruby.java:232) 2007-04-26 10:18:30,475 INFO [STDOUT] at org.jruby.javasupport.JavaEmbedUtils.initialize(JavaEmbedUtils.java:53) 2007-04-26 10:18:30,475 INFO [STDOUT] at org.jruby.webapp.RailsFactory.makeObject(RailsFactory.java:86) 2007-04-26 10:18:30,475 INFO [STDOUT] at org.apache.commons.pool.impl.GenericObjectPool.addObject( GenericObjectPool.java:996) 2007-04-26 10:18:30,475 INFO [STDOUT] at org.jruby.webapp.AbstractRailsServlet$Preloader.run( AbstractRailsServlet.java:208) 2007-04-26 10:18:30,475 INFO [STDOUT] at java.lang.Thread.run( Thread.java:534)
_______________________________________________ Jruby-extras-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/jruby-extras-devel
