Adding in jirb on an existing project?

I have a sizable web application built in Java. It uses Spring,
Hibernate, and WebWork. I would like to use JRuby to be able to “get
at” the DAO and business objects in a console like I can in Ruby.
I’ve done some research (but not much) and I can see three ways to do
it:

  1. I would like to be able to point a console at a war and have it
    “just work”. I don’t see how this is going to happen, but I’d like
    it.

  2. I could have a jruby ant task that compiles/jars everything just
    before it does the war task and then manually adds all the jars and
    classpaths to a jconsole session.

  3. I could have a non-ant task that takes a war, unzips it, adds all
    the jars and directories to the classpath, and starts the jconsole
    session.

Has anyone else done this? Is there a good reason not to?

Thanks,
Joe

“There are only two industries that refer to their customers as
‘users’.” - Edward Tufte


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Thu, Feb 5, 2009 at 11:10 AM, Bothari [email protected] wrote:

  1. I could have a jruby ant task that compiles/jars everything just
    before it does the war task and then manually adds all the jars and
    classpaths to a jconsole session.

  2. I could have a non-ant task that takes a war, unzips it, adds all
    the jars and directories to the classpath, and starts the jconsole
    session.

Has anyone else done this? Is there a good reason not to?

Here’s a possibility that I’ve used and I’ve been meaning to blog.
Maybe you can get it working for you. The idea is to run a DRb server
using JRuby inside your running, deployed war file that talks to an
IRB client, allowing you to poke around inside your running
application.

I’ve done a brief write-up here: DrbIrbLauncher.java · GitHub

Let me know if you give it a try.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi,
i did something similiar, i have a page with big text area for admin
to enter a script in ruby, after submiting it, on server it is beeing
processed by jsr223. But i don’t know if You need irb specific things
or just poke around Your bussines objects. If the second it will be
enought.

Best greetings,
Pawe³ Wielgus.

2009/2/5 Nick S. [email protected]:

Here’s a possibility that I’ve used and I’ve been meaning to blog.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email