Forum: Ruby Advising JRuby code from AspectJ?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Susan D. (Guest)
on 2007-06-13 09:21
(Received via mailing list)
We're developing a RESTful web application, and we're looking at running
Rails under JRuby for many of our services.  The front end is likely to
be Java, as we're kitbashing an existing OSS project into something that
fits our needs a bit better.

One of our big requirements is a billing subsystem that supports a wide
number of pricing models, and the ability for our sales/marketing people
to introduce new ones on the fly.  Another is a robust auditing
subsystem.  Both problems absolutely scream to be pulled out into
aspects, which is fine for the bits of the system written in Java, but
what about the Ruby code?  I hear tell (handwave) that there are Ruby
constructs that resemble aspects (handwave, handwave), but I'm new
enough to Ruby to not have learned those patterns yet, and really, we'd
like to only have to write our billing/auditing instrumentation code

Is there a good way to get AspectJ or Spring AOP aspects to advise JRuby
classes?  Alternatively, has anyone tried to use Spring AOP to use a
JRuby class to advise Java code?  Or is there some third possibility
that I'm overlooking?

For that matter, where on Usenet is the good place to ask about AOP in
general?  I don't see a specific group; is c.l.j.p the right place, or
does one simply not exist yet?

Thanks in advance,
 -- Sue --

Susan D. <removed_email_address@domain.invalid>

Sue needs developers!  See
Dean W. (Guest)
on 2007-06-13 21:54
(Received via mailing list)
"Advising" methods with behavior before, after, or around the method
invocation itself is easy to do in Ruby. If your advice just needs to
other ruby code, then using these techniques would be better (probably)
trying to combine a Java-based AOP mechanism with JRuby classes, etc.
are also several basic AOP frameworks for Ruby, although they tend to be
somewhat old or poorly documented.

However, if you need your ruby classes to invoke java services, then it
might make sense to try Spring AOP.

I've been doing some work on AOP in Ruby and I'm interested in issues
this. Feel free to follow up with me privately if you would to discuss

This topic is locked and can not be replied to.