Ronan’s Blog


Random thoughts of an Irish Software Architect in the GIS Industry.

Oracle software standards come to Java

Posted in Development, Java by Ro on the August 8th, 2011

There’s long been and unwritten rule for Oracle Database users: “Never use R1 of the product, always wait for R2″.This was especially true with Database 10g.
Now it seems this same issue has come to Java, with Java 7 being released with some glaring issues, Oracle early adopters known this path well.
Its a pity, as before now, Java releases tended to be uptaken pretty quickly.
Lucid Imagination » Don’t Use Java 7, For Anything

Java Hangs When Converting 2.2250738585072012e-308

Posted in Java by Ro on the February 15th, 2011

Interesting String Parsing

Posted in Development, Java by Ro on the September 15th, 2010

Came across an interesting Bug “Feature” this morning, looks like the String Tokenizer does not work exactly lik you might expect it to !


Retrotranslator - Convert Java5/6 Classes to 1.4

Posted in Development, Java, Web by Ro on the January 5th, 2010

LinkedHashMap is Actually Quite Useful

Posted in Development, Java by Ro on the September 11th, 2009

After reading this article, I’ve done a little code reviewing …. Great Class !
[JavaSpecialists 073] - LinkedHashMap is Actually Quite Useful

Java Performance Tuning Startup Parameters

Posted in Development, Java, Web by Ro on the September 11th, 2007

I’ve come across these startup parameters which really seem to speed up the performance of our servers. They only work in the latest versions (1.4.2_15 & 1.5.0_12). But they really make a noticeable difference.
-XX:MaxTenuringThreshold=8 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:-CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=40 -XX:+UseCMSInitiatingOccupancyOnly

Online Spatial data editing

Posted in Development, Java, GIS, Web by Ro on the June 28th, 2007

At eSpatial we’re getting ready to release iSMART 5.3, one of the major new features is a completely revamped online spatial data editing capability. In the development team, we’re all pretty excited about its capabilities, because it like nothing we’ve seen before in a pure web (i.e. No Applet) mode.
Click the link below to get access to the early-access demo recording.
eSpatial _ next generation geospatial technology


Handy way to add extra custom Option Buttons into a JOptionPane

Posted in Java by Ro on the June 8th, 2007

private void showMyPopup()
{
//Object accessed iunside inner class must be final
final MyObject myo = new MyObject();

//Create Buttons
JButton btnOK = new JButton( “Ok” );
JButton btnCancel = new JButton( “Cancel” );
JButton btnPreview = new JButton( “Preview” );
Object[] options = new Object[]{btnOK, btnCancel, btnPreview};

//Create JOptionPane Object
JOptionPane jop = new JOptionPane(
myo, JOptionPane.PLAIN_MESSAGE, JOptionPane.YES_NO_CANCEL_OPTION, null, options );

//Create JDialog from JOptionPane Object
final JDialog jd = jop.createDialog( editorApp, “JOptionPane Tester” );

//Create ActionListener
ActionListener list = new ActionListener()
{
public void actionPerformed(ActionEvent ae){
if ( ae.getActionCommand().equals( “Ok” ) || ae.getActionCommand().equals( “Preview” ) )
{
//Do the Work when Preview or OK are pressed
myo.executePreview();
}

if ( ae.getActionCommand().equals( “Ok” ) || ae.getActionCommand().equals( “Cancel” ) )
{
//Close the Dialig when OK or Cancel Are pressed
jd.dispose();
}
}};

//Add ActionListners
btnOK.addActionListener( list );
btnCancel.addActionListener( list );
btnPreview.addActionListener( list );

//Show JDialog
jd.show();
}


Parsing XML without an Internet connection

Posted in Development, Java, Web by Ro on the May 1st, 2007

I came across this hand bit of Java to allow you to parse XML while behind a restrictive firewall or without any internet connection at all. Previously, reading the DTD was causing java.net.UnknownHostException’s, the updated code stops the parser from trying to connect to the Internet to download the DTD.
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
//Here is the new code….
docBuilder.setEntityResolver( new EntityResolver() {
public InputSource resolveEntity(String publicId, String systemId)
throws SAXException, IOException {
return new InputSource(
new ByteArrayInputStream( ““.getBytes()));
}
} );

document = docBuilder.parse(xmlFile);

Google Maps - My Maps

Posted in Development, Java, GIS, Web by Ro on the April 18th, 2007

I’ve been watching with interested as a whole lot of people get excited about the new “My Maps” functionality in Google Maps. It looks quite impressive, but is really nothing new, well not to me anyway. We’ve been writing on-line digitizing functionality for a few years now adding more and more functionality with every release, the difference being that our product is a commercial one, which you will not find too many free-to-access public deployments of it which allows digitizing functionality.

Google Maps and our product have always had quite a different focus/market position and this is the first time that they’ve crossed paths (Ignoring the export to KMZ functionality I wrote last year). However, rather than starting to worry about another major competitor, I maintain the same position that I had when writing my Thesis (gCommerce - How GIS is facilitating modern business), that publicly available mapping solutions will just increase the usage of on-line maps and ultimately lead to generating more business as a whole for the industry.

I do feel a vague sense of jealously watching all the praise that I am reading for the “My Maps” functionality, but such is life I guess !

Google Maps: My Maps