J2Ee-Jboss-Ejb-With-Eclipse-2003-java-book-java-ebooks
ebook, java January 14th, 2010Introduction
It all started with the article °Working with Java (R)C Enterprise Java on Apples website. It showed that enterprise Java on OS X
was possible, that everything worked. But it left me somewhat unhappy. As I am very GUI minded (R)C I would not be a Ma
user if I wasn°Ot (R)C I wanted an IDE that could help me with my OS X enterprise java stuff, and nowhere in that article w
any hint to such an IDE. Secondly, but very related, I want to debug my server code. And last but not least, I do not want to
spend my time writing repetitive code or code that can easily be generated. Just think about EJB-JAR.XML, a good part of
jboss.xml and even the ejb°Os and their interfaces(R)Call these getters and setters – they can easily be generated from the lay-ou
of your database..
Fortunately, I got involved in a big J2EE project, exchanging messages between unrelated services via XML and https. We
choose J2EE as the platform to implement our part of it, and JBoss as our application server.
The environment at work is Windows plus Oracle. For this article, I replaced the Oracle database by MySql, and Windows
by OS X. All the rest stayed the same. If you prefer another database, you can do so. This article describes the necessary steps
to make JBoss work with MySql. Doing this for another database is quite similar. If you want to use Windows or *nix, you
can as well: all the software used trough this article is available on all these platforms.
The IDE used is Eclipse, a free product written by IBM and backed by others (Borland being one of them). Although it lacks
some of the flashy features offered by commercial IDE°Os (just think of GUI-editors, wizards°≠), it is very good at what
does, and its performance is acceptable. It is even usable on a Pismo 500 MHz PowerBook, although you°Oll better have th
fastest dual G4 at hand if you are using it on a daily basis. Eclipse has an extensible plug-in architecture. The integration
with JBoss is handled by such a plug-in to name one. No doubt GUI-editing, EJB-generation and others will be added as
plug-ins later. (If you all register WhereDidAllMyMoneyGo?, I could do this myself).
As stated earlier, MySql is the database system I use. To generate °AEstupid code°O, I am using a command line tool call
Middlegen. JBoss is my application server, Tomcat my webserver. All these tools are available for free under a GNU licence.
Later, I might add a chapter on version control (using CVS), a chapter on XML (using Castor), but currently, I°Oll limi
myself to session and entity beans, and to JSP and servlets.
One last thing: if you do not know what an EJB is, what the difference is between a session and an entity bean, and what a
local and a remote interface is, I suggest you read the relevant chapters of Suns J2ee tutorial first.
This document is pretty much written as a step-by-step instruction (R)C making sense only when you repeat everything that i
described on your own machine while reading.
Oh yes, one more thing: I did not pay any attention to formatting and layout. Sorry for the ugly headers (R)C they are wha
Microsoft gave me.
Environment
All the stuff described in this article was written and tested on a dual GHz Quicksilver G4 running OS X 10.2.1. 10.2 is a
prerequisite for Eclipse (R)C threads on Apples Java developer mailing list learn that people using 10.1 have difficulties runnin
Eclipse. A second prerequisite is a fast Internet connection. There is over 100 megabytes to download if you want to replay
this article.
I unzipped or unstuffed all downloads with Stuffit Expander. You MUST use Stuffit Expander version 7.0 or later, as earlier
versions make a mess of long filenames.
Everything I downloaded just worked as advertised for me after unstuffing. I do not have any unsupported tools, cracked or
doubtful software or haxy installed, so my system is quite out-of-the-box.
As I am not a command line freak, I did not change the configuration of my terminal application. If you use another shell, I
guess you know enough of Unix to adapt the few Unix commands presented in this document so they work with your shell.
And yes, I have the latest version of Apples developer tools installed. (Don°Ot know if it is required though.
April 16th, 2010 at 12:55 pm
что бы небыло нада глянуть……
was possible, that everything worked. But it left me somewhat unhappy…..