Our Meeho!™ Blog brings you general news, tech stuff, tips, inspiration and more in relation to the Meeho!™ platform.

Sign up now for free!

Posts from 1-2010

» Adjusting Development Memory Usage for JBoss 5.x

Posted by Anders Østergaard Jensen on 1/20 2010 at 7:07 AM

JBoss is an extremely popular Java EE application server. But, as excellent it may be, it definitely sucks up a lot of memory – also when in development mode. If you have plenty of memory (more than 2 gigabytes, I would say), you can speed up the waiting time for performing so-called hot redeploys. Hot redeployment happens, for instance, when you redeploy a packaged application EAR file from within Netbeans, which is responsible for propagating the EAR chunk to the correct directory. Reloading EAR files from scratch, especially if you have a lot of JPA/Hibernate related configuration directives, can be a lengthy process and increasing the memory available to JBoss can speed up this process significantly.

What we will do is simply to increase the JVM (Java Virtual Machine) memory on JBoss. This is done in the file <jboss-dir>/bin/run.conf. Find the line containing the following:

#
# Specify options to pass to the Java VM.
#

if [ "x$JAVA_OPTS" = "x" ]; then
   JAVA_OPTS="-Xms256m -Xmx1512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.cli
ent.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
fi

The two parameters, -Xms256m and -Xmx1512m specify the minimum (lower) and maximum (upper) JVM memory consumption limits. Normally, the maximum (-XmxXXXm) is set to 512, but in case you have enough memory, you can easily increase this to e.g. 1024 MB (-Xmx1024m) or 2048 MB (-Xmx2048m). That way, you can easily cut off a lot of the time unwillingly spent on waiting for your EAR files to redeploy during development.

#
# Specify options to pass to the Java VM.
#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS=”-Xms256m -Xmx1512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.cli
ent.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000″
fi

» How to make Ubuntu 9.10 use the Broadcom STA driver automatically on each startup

Posted by Kasper Tidemann on 1/12 2010 at 4:27 AM

Ubuntu 9.10 has recently been released and if you haven’t tried it yet, go check it out. However, you may be one of the people who has upgraded from 9.04 to 9.10. Everything worked fine, except the wireless Broadcom network card in your machine just doesn’t auto-start anymore.

A fix would be to access System -> Administration -> Hardware Drivers. Here, you can remove and the re-activate the proprietary Broadcom STA driver to make your wireless network card work in Ubuntu 9.10. The downfall is that you’d have to perform this task on each startup.

But in order to permanently make it work, you must access System -> Administration -> Synaptic Package Manager. Then you reload the list and search for:

bcmwl-kernel-source

Now, right-click on the package name and choose “Mark for Reinstallation”. Then press the big, green “Apply” button, wait till it’s done, restart, and you’re good to go!

» Netscape Navigator: those were the days…

Posted by Kasper Tidemann on 1/12 2010 at 3:06 AM

Yesterday, I stumbled across The Netscape Archive containing some of the classic versions of the good old Netscape Navigator – how cool of them to keep those versions lying around! You guys remember the 4.79 version with the recurring “Document: Done” status message at the bottom of the browser? Oh, but those were the days. Here’s a couple of screenshots to relive the beginning of it all:

Our Meeho!™ Blog shown in Netscape Navigator 4.79.

Our Meeho!™ Blog shown in Netscape Navigator 4.79.

google.com looks kind of odd in NN 4.79.

google.com looks kind of odd in NN 4.79.

So what happened to Netscape Navigator? Well, put shortly, it lost the competition to the – back then – rising star Internet Explorer. Funny thing is, version 4.79 is from 2001, which is also the release year of Internet Explorer 6, the most broken and randomly acting browser to have ever annoyed millions and millions of web developers world-wide. While Netscape Navigator phased out pretty quickly, Internet Explorer 6 is still out there… It makes you wonder, huh?

» The proper way of using the ORGANIZER attribute in iCalendar format

Posted by Kasper Tidemann on 1/11 2010 at 3:24 AM

Working with the iCalendar format using Ruby on Rails brings many possibilities of quickly getting data generated by using gems such as iCalendar. However, the gem seems not to handle the ORGANIZER attribute in a proper way. What it does is the following:

ORGANIZER:Kasper Tidemann

… which will make the ORGANIZER info not show in iCal. However, it will work if you remove the spaces in the attribute’s value, that is, it will work if you do the following:

ORGANIZER:KasperTidemann

… but while it may work, it’s not really what we want. The organizer’s name is not “KasperTidemann” to be exact, but “Kasper Tidemann”. Now, while this post deals with fixing the use of the iCalendar gem to make the organizer tag show properly in iCal, the following principle is general and should always be followed.

To make iCal show you the name of the organizer plus the person’s e-mail address, what you need is for the ORGANIZER attribute to look like this:

ORGANIZER;CN=Kasper Tidemann:mailto:kt@meeho.dk

This way, it will show up in iCal like this:

Screenshot of iCal showing the organizer info. Please do not mind the Danish attribute names.

Screenshot of iCal showing the organizer info. Please do not mind the Danish attribute names.

I have written the maintenance guys of the gem, but they haven’t replied me yet. Until then, you can either modify the gem yourself or use the custom_property method they’ve supplied the gem with:

event.custom_property("ORGANIZER;CN=Kasper Tidemann:mailto", "kt@meeho.dk")

It’s kind of not the way you would use the method, since you’re really supposed to simply type in an attribute name as the first parameter and the attribute value as the second, but hey, the above works and will help you out until the gem itself is fixed.