Coding

My MBeans do not show up in jmx-console on Jboss 6

I have been trying to port an application of mine to JBoss 6, and managed to get there from JBoss 5.1.0.CR1 without too much hassle.  However my MBeans did not show up...

I could find no information as to why this is broken on the wonderful internet.  I tried posting on JBoss' forums but as usual, I was ignored on there.  Never get any responses.  Guess you have to pay for that.  I am digressing.

Eventually I figured it out.  Here are the details:

Blog Categories:

Optimising a read mostly write sometimes application

About 6 years ago I created a web based application using J2EE, a DAO layer using JDBC to a PostgreSQL database.  The J2EE application container ran on its own server, and the PostgreSQL on a dedicated server as well.  The two servers were connected with fast gigabit ethernet.  The DB is located on a SAN attached to the database server using Fibre Channel.

Blog Categories:

HTTPS (SSL) Support in Perl's LWP::Simple

If you run Ubuntu Linux and using Perl's LWP::Simple's get function to fetch the content of an SSL encrypted web site, make sure to install libcrypt-ssleay-perl to enable SSL support for LWP.

Blog Categories:

Conditional inserts in PostgreSQL

I have many times wanted to perform the following kind of SQL statement:

insert into X (field1, field2) values (A,B) if not exists X.field1 = A

The idea is to have a single statement that only inserts the value if a given key (in this case A) does not already exist.  Therefore it is like a unique add operation.  To implement this in PostgreSQL, simply do:

insert into X (field1, field2) select A, B where not exists
(select field1 from X where field1 = A)

Neat, hey?

Blog Categories:

Regex and posix utilities simplifies life

I had a small problem just now.  In trying to convert email from Outlook 2011 on the Mac to mbox format, I used the brilliant eml2mbox Ruby script on the directory of files I created by dragging and dropping all email to the Finder, to convert them from eml format to mbox.  I did this otherwise MailSteward imports them with a billion different mailbox names, as it uses the subject line as the mailbox.

I had several emails however that were sent from the iPhone, and their headers were wrong.  Look at an example:

Blog Categories:

JBoss Seam application not working under IE9

I have developed an application in JBoss Seam 2.2.1.Final using RichFaces 3.3.3.Final.  Some parts of the code make heavy use of a4j calls, i.e. Ajax calls.  This works very well under most browsers.  Unfortunately when IE9 was released two weeks ago, it refused to work with my application.  I would click on certain links and nothing would happen.  Or I'd get blank pages back.

Eventually I traced the issue to a known bug in the Sarissa.js file that is used by RichFaces for XML and DOM parsing.  This file in RichFaces 3.3.3.Final is not compatible with IE9.

Blog Categories:

JBoss Seam s:fileUpload and null data

Sometimes I can be a real schmuck.  Some people believe I always am one, but in this case it was a 30 minute lapse in neuron activity.  I had a JBoss Seam xhtml JSF page like this:

 

Blog Categories:

JBoss Seam: rich:dataTable with huge datasets

Have you ever wanted to implement Seam's rich:DataList but the search results could be in the tens or hundreds of thousand of records?  Well, I did recently run into that exact issue.  For the first attempt I tried to use the standard binding method, but knew it could never work in a production environment.

Blog Categories:

JBoss Seam not rendering any tags?

If you ever run into the weird situation where you use JBoss Seam with Facelets and everything seems to be working, except the page does not render any tag - no matter whether it is s, h, f, a4j, rich or ui (the common abbreviations for them), then have a look at faces-config.xml.  I once made the simple mistake of calling the file faces_config.xml, effectively the same as not having that file.  However since it WAS there and did look almost like faces-config.xml, I missed it for 3 hours.

Blog Categories:

Pages

Subscribe to Coding

Back to top