Ramblings

Archive for the ‘Computers’ Category

17 Dec, 2008

JBoss and Sesame Street’s Count

Posted by: Matt Williams In: jboss| tips

One, One database record!
Two, Two database record!
Muahahaha!

By default, when using datasources with JBoss, it does a count to validate a connection, both on creation and when it is requested from the connection pool.  It looks something like:
select count(*) from x
Now, this can take take a while when working with tables containing 1.8 million rows and [...]

25 Nov, 2008

Upgrading rubygems on Ubuntu

Posted by: Matt Williams In: ruby| tips

Maybe it’s me.  Maybe it’s a feature of ubuntu, but on two separate systems, when I went to upgrade rubygems to the latest via
gem update –system
it didn’t work for me.  So, I had to go the more extreme route of:
gem install rubygems-updateupdatee_rubygems
This is mostly for my own reference, it’s not the first time [...]

14 Nov, 2008

Concatenation Note to Self

Posted by: Matt Williams In: gotchas

To concatenate in PHP you use a ‘.’, not a ‘+’.  Likewise, you don’t use ‘.’ to reference an object’s members, you use ‘->’. 
Move along, nothing to see.

Tags:

12 Nov, 2008

DIY Maps and Linux Firefox/Flash Quirks

Posted by: Matt Williams In: gotchas| javascript

First off, let me say that I really like DIY Map. It’s quick, and responsive, with an easy to use interface, as well as allowing you to make changes on the fly easily.
That said, I discovered lastnight / this morning that there are some quirks with its updating through the Flash JavaScript Integration Kit. [...]

11 Nov, 2008

YUI Datasources

Posted by: Matt Williams In: gotchas

Been a while since I’ve written.  I’ve been sick and working on a side project.  That said, I’ll be writing more……
Today’s note/reminder is a gotcha about YUI datasources.  If you have JSON feeding the datasource and you’re getting back more fields in the results than you’re expecting, the datasource will not behave properly.  For example, [...]

Tags: ,

08 Oct, 2008

Semantic Web

Posted by: Matt Williams In: philosophy| programming

I have been doing some site scraping of late.  And as a result, I have really come to appreciate the semantic web.  It’d make life infinitely easier for grabbing data.  Of course there are other, better reasons for using the semantic web, but right now, it’d make a difference in my life.

25 Sep, 2008

JBoss run.sh may be harmful

Posted by: Matt Williams In: gotchas| jboss

A coworker and I discovered an issue with jboss’ run.sh (which starts the app server).  The problem lies in different flavours of unix (or unix-like) shells returning different values for wait.
The relevant code is:

# Wait until the background process exits
WAIT_STATUS=0
[...]

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 also need the [...]

22 Sep, 2008

JRuby to check connectivity…

Posted by: Matt Williams In: jruby| programming

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:

require ‘rubygems’
require ‘jdbc’
require ‘java’
Java::oracle.jdbc.driver.OracleDriver
url = "jdbc:oracle:thin:@SERVER:1521:DB"
user = "user"
pass [...]

Tags: , ,

More about methods, it’s inspired/spurred by a comment on methods, public_methods, and private_methods by Pit Captain. It also corrects some misconceptions I had (and may have (wrongly) given others).
I’ve added a new category, “eating crow” for this and any other postings where I step back and re-evaluate my posts. This is [...]


Categories

DrakNet Web Hosting