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 …
Tag Archive: jruby
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 …
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? |