Multiple JBoss instances step by step

So you have got JBoss working on your linux box, if you did it manually then it
was a long hard fight involving start up scripts and file permission’s, but its
not enough, you want more, maybe you want to try out clustering, maybe you want
a dev and a live instance but only have one box, who knows, who cares, you just
want it, so step by step here it is:

“JBoss” = is the both the name of the existing instance and the user its
installed under (as per JBoss defaults)
“jbossXXX” = the name of the new instance and user
“Jboss-4.0.5.GA” = the JBoss install directory

0) I’m assuming you have already added your multiple IP addresses if not go
here if you are doing it with only 1 IP address and different ports then go
away as i don’t like you anymore, also you should be running in text only mode
for efficiency, if your running a gui then shame on you, and finally you should
be logged on as root or have equivalent rights

1) useradd jbossXXX
(this will create your user and their home directory)

2) passwd jbossXXX
(then enter the new password at the prompt, if you don’t do this the user wont
be activated)

2) passwd jbossXXX
(then enter the new password at the prompt, if you don’t do this the user wont
be activated)

3) mkdir /home/jbossXXX/jboss-4.0.5.GA
(time to make some where for JBoss to live)

4) cp -r /home/jboss/jboss-4.0.5.GA/* /home/jbossXXX/jboss-4.0.5.GA
(clone the current one to a new home)

5) sudo chown -R jbossXXX:root /home/jbossXXX/jboss-4.0.5.GA
(we cloned the file rights as well so lets reset the owner to the user we just
created)

6) cp /etc/rc.d/init.d/jboss /etc/rc.d/init.d/jbossXXX
(make a copy of the existing startup script for the new instance of the server)

7) vi /etc/rc.d/init.d/jbossXXX
(edit it so we change make some changes)

8) press “I” to enter interactive mode
(bloody VI does not start in edit mode)

9) find the following lines and amend with the new server location/user

JBOSS_HOME=${JBOSS_HOME:-“/home/jbossXXX/jboss-4.0.5.GA”}
JBOSS_USER=${JBOSS_USER:-“jbossXXX”}

10) put the new notes ip address in this line

JBOSS_HOST=${JBOSS_HOST:-“192.168.0.10”}

11) Press “escape” to edit interactive mode

12) press ‘shift’+zz to save and exit

13) now normally if you have only one JBoss server, its bound to all available
IP address i.e. the same JBoss server responds to all the IP address you have
on the server, but you cant have that any more so you will have to go into the
“/etc/rc.d/init.d/jboss” and change the line

JBOSS_HOST=${JBOSS_HOST:-“0.0.0.0”}

to be the servers original IP address.

14) run the following

ln -s /etc/rc.d/init.d/jbossXXX /etc/rc3.d/S84jbossXX

ln -s /etc/rc.d/init.d/jbossXXX /etc/rc4.d/S84jbossXXX

ln -s /etc/rc.d/init.d/jbossXXX /etc/rc5.d/S84jbossXXX

ln -s /etc/rc.d/init.d/jbossXXX /etc/rc6.d/K15jbossXXX

ln -s /etc/rc.d/init.d/jbossXXX /etc/rc0.d/K15jbossXXX

ln -s /etc/rc.d/init.d/jbossXX /etc/rc1.d/K15jbossXX

(this makes links from your startup script to all the different ways that you
can start a server up (you really only need mode 3 (multi user text) and mode 6
(multi user gui), but I’m trying to be neat here.

15) bounce the box (yes yes i know you don’t have to do that, but i like to
prove that servers can cope after a power outage) reboot

and that should be your lot

Update
Now it has come to light that old versions of JBoss (seems to be below version
4.2), have a slight bug in that startup and shut down script that still putts
“localhost” as a parameter, even if you have specified an alternative IP
address, as we no longer have one server on the localhost IP address this
obviously breaks things, so while you can start up JBoss with

/etc/init.d/jbossXXX start

to shut it down (individually), you need to use something like

/home/jbossXXX/jboss-4.0.5.GA/bin/shutdown.sh -s jnp://192.168.0.10:1099

End Update

New book from Steve Crug

As a designer I am well aware that I suck, I am one of the people responsible for Scott Good’s quote of “The worst applications that people use are the ones they use at work” (from his Lotusphere session “BP202-There’s no fixing ugly How to make a great first impression with your applications” an amazing session which left me ashamed of my sub standard design work but determined to do better).

My bible to this end is Steve Crugs book “Don’t make me think” or as I like to call it “Amazon got it right”, a truly fabulous book (my one is dog-eared having been passed round colleges and even family), this morning much to my excitement i discovered he has published a new book called

Rocket Surgery Made Easy:The Do-It-Yourself Guide to Finding and Fixing Usability Problems“,

I purchased a pdf version and ploughed into it.

This one has the same easy feel and readability of his first book, but for me has a slightly different target audience, its one of those books that you place meaningfully on a project managers desk, or read your self, but not to actually use just to have the tools to hand to fight the good fight and guide your wayward manager/user base when they skimp on testing, it also shows you what to do with any test results you might get (chapter 10 “debriefing 101” is a particular gem which I intend to print out and take to the next meeting in which we “address functional issues” / “listen to the users bitching”), with plenty of pertinent FAQ’s, it can flicked through for a quick fix, or read cover to cover with out falling asleep (rare for any IT based book), very much recommended.

lotusphere, between the lines for web developers

Back from Lotusphere and this is what i brought back

1) If your sticking with Notes for dev then learn xpages (best place is with Matt White at http://xpages101.net/ or at the http://xpagesblog.com/).
2) Mobile device support Android/iphone/blackberry, do not leave them out of ANY apps.
3) Flex is the RIA of choice.
4) Learn how to use Amazon s3 storage*.
5) Give lip service to dojo but use Jquery really.
6) Learn how to hack xml raw code (for Xpages/Websphere/Flex).
7) Ugly is out Out OUT*.
8) Tweak what ever your doing to sound like REST services.
9) Platform wise: for the client, Windows beats Mac, but Mac beats Linux (Eclipse is the future in all cases), server side: Redhat is the way to go.
10) Oldy but goldy: if your not learning Java, hurry up!!.

Well cloud computing really, but so far the only bit that is really cloud seems to be the storage, processor renting has not changed, however there is a bit more integration with other services.

**and Web 2.0 is in In IN (well thank you for that IBM)

There is other stuff like “we have gone API crazy, please integrate everything with everything”, but i recon that is the main points

LotuSphere 2010 notes pt1

LotuSphere Disclaimer: I have no intention of giving you any serious or useful information this lotusphere (well while not while im actually here at least, as there are too many people doing that already, go to planetlotus to find them

Now sharing a room with someone is a fab way of cutting the old LS costs down but after 2 days of sharing a room with the wretch, the cracks are showing,

what has he done you ask, well i tell you, he is tidy and reasonable, which is as far as im concerned is a crime against all that’s conference!!, i present exhibit A:

look at this bed!!, it has been slept in by a drunk person!!, where is the vomit, where is the ripped sheet and pillows on the floor, it a travesty, but there is worse to come:

he folds and lays out T-shirts before passing out, its wrong i tell you, tomorrow night i would not be surprised if he started hoovering, now THIS is how a hotel room should look

somewhere between a nest and a pit, with the sheets on the floor, socks should craw around the fetid air, growling gently.

P.S. I also attended a very good session Mr Tim Davis on blackberry and IPhone apps, but i turns out that i committed a number of terrible faux pas, that include asking question during the session and sliding out once i had got all the info i wanted, (i feel shamed)

UKLug Virtual views Flex download

This is terribly late, but I needed to just blog it before lotusphere. Earlier this year the Poole and myself presented at UKlug, my part of the presentation was a way of doing a few thing that we take for granted in the notes client but done on the web with flex, this included Formula validation, design information and private views

The only complex part was the private/virtual views, which while not hugely fast still gave us private views back in a easy way (it builds documents that flex then renders back as views), and permits full use of formulas, variable columns, column titles and does not require view or full text indexes

You can see it in action here (for some reason the source server it on is being REALLY REALLY slow at the moment and as the demo app was designed to be pre-loaded for a demo its load time sucks anyway, just wait till you see the “$$viewField” appear in the dropdown). there are already 2 prebuilt views.

 

However this is more of a ‘take it apart and see how it works’ thing so the flex source code is here and the whole app is here also Mr Poole’s code can be found here

You may wonder why the column and view selection formula is built so clumsily, well partly it is to give an excuse to show the formula validation, but mainly its because a perfect formula builder already exists, by Jake Howlett which can be found here

Oh. Next week I will be skulking at stand 622 at Lotusphere, where i will be fighting a hangover and writing an air app so you can have Elguji’s ‘Jam’ products on your desktop (well actually i was supposed to have already written it, however I’m a work shy sod, but bruce has forgiven me out of the kindness of his soul), so drop by and if you feel like a bit of free flex/air/webservices how-to. 🙂