Forum: JRuby Adding in jirb on an existing project?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bothari (Guest)
on 2009-02-05 19:11
(Received via mailing list)
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
Nick S. (Guest)
on 2009-02-05 19:48
(Received via mailing list)
On Thu, Feb 5, 2009 at 11:10 AM, Bothari <removed_email_address@domain.invalid> 
wrote:
> 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?

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: http://gist.github.com/58858

Let me know if you give it a try.

/Nick

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Paweł Wielgus (Guest)
on 2009-02-06 11:29
(Received via mailing list)
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. <removed_email_address@domain.invalid>:
>>
> 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
This topic is locked and can not be replied to.