I’m in the process of revisiting and migrating a service I’d first written almost five years ago; one of the backend data sources has changed (drastically!) so I’m looking at refactoring as well as streamlining in the process — parsing the new backend takes longer than the old. Part of the reason for doing so …
Category Archive: jruby
Jun 22
cygwin and torquebox and rvm, oh my!
rvm, despite being wonderful, doesn’t play very well with torquebox under cygwin. In particular, the gem paths are not working. So, in order to fix this, simply do: rvm use system And then it will work right. Once you’re done with the torquebox work, you can go back to using rvm.
Jun 09
Torquebox and Cygwin: Take I
Torquebox and Cygwin don’t work as nicely together as one might hope. That said, here are a couple of findings: In order to deploy, you need to set the $JBOSS_HOME with the Windows path. You can do this via export JBOSS_PATH=cygpath -w PATH_TO_JBOSS. Additionally, the JRUBY_HOME needs to be a windows path as well. Otherwise …
Mar 02
Rails & JRuby in a Jar
This is a discussion of what I needed to do to put rails and JRuby together in a single jar.
Aug 25
Using jnp as a JBoss heartbeat
jnp is a JBoss protocol which exposes jndi. It is, by default, bound to port 1099. I’d been using that port as a heartbeat, but “cheating” — I would open a socket and then close it immediately. However, this caused problems. jnp is chatty. And it got upset at my not letting it say ‘hi’ …
Feb 05
Web Based Portable mysql tool suite
Are you limited in what software you can use at work? This article details how to have a web based tool suite for mysql. It currently has the following tools: AjaxMyTop — a php implementation of mytop (think top for mysql) which runs in a browser. rbdb — a phpmyadmin work-alike in progress. It’s the …
Jan 23
Prawn’d by Scruffy, Gruff
I’ve been putting together an automated report for my team, and decided to give prawn and scruffy a try. I ended up using Gruff, but here are some of the lessons along the way: Scruffy has issues with bar charts and values from 1-3 (actual values were [1,3,1]). I was able to get around this …
Sep 22
JRuby + jmx4r + rrd4j == Easy reporting on app servers (part I)
This is a how-to for using jmx and rrd4j, a java implementation of rrdtool, to report on app server statistics. Thanks to Jeff Mesnil(author of jmx4r), Werner Schuster (JMX the Ruby way with jmx4r), sishen (JRobin sucks), and the rrd4j team. You’ll need the following: JVM 1.5 or higher — JRE is not enough, you …
Sep 22
JRuby to check connectivity…
I had an issue reported by a developer where their jboss connection pool wasn’t working properly. It looked good to me, so I decided to verify that everything worked in so far as connectivity from the box. So, I used the following jruby script to help:
1 2 3 4 5 6 7 8 9 10 11 12 |
require 'rubygems' require 'jdbc' require 'java' Java::oracle.jdbc.driver.OracleDriver url = "jdbc:oracle:thin:@SERVER:1521:DB" user = "user" pass = "pass" conn = java.sql.DriverManager.get_connection(url,user,pass) stmt = conn.create_statement query = "select 1 from dual" rss = stmt.execute_query(query) puts rss.next? # did we get anything? |