Frontier Java
Struts with Tiles
I dropped the tiles-blank-struts1-1.war from
Jakarta Struts into the JBoss deploy directory and it worked great.
I think I will be using
Tiles for my application. Initially though it will just be as a overpowered replacement for Templates, which was the layout mechanism for
Struts 1.0.
Firestorm
I downloaded and installed an eval copy of
Firestorm. Given a
JDBC connection or SQL script, Firestorm is supposed to generate all your
DAO objects, along with a test harness containing
Struts,
Ant,
Session Facade and
Business delegate code.
It choked on the very first file in my database. I spent over an hour trying to massage the SQL, but to no avail. Firestorm works fine with the demo SQL scripts that come with it. I wish it would have worked for me, but their generated code might still be useful. I'll have to look it over in detail.
PostgreSQL JDBC Driver
The
JDBC driver for
PostgreSQL download and installed without a hitch this afternoon.
JBoss :: Professional Open Source
Now that
JBoss is up and running, I decided to take a stab at the
JBoss IDE, which is built on
Eclipse.
I installed JBoss IDE 1.2.0 on Eclipse 2.1.0 and everything went smoothly. When I open up the Server Navigator tab, it lists my JBoss 2.4.x install as 'not running'. A simple click on the 'start' button and I was on my way. A console window opened up to show all the startup messages. The only problem I have is that the 'shutdown' button is never active. I have to hit the 'terminate' button to shutdown JBoss.
JBoss is working
I installed
JBoss on my desktop a while ago, but could never get it working. Today, I decided to uninstall everything Java, App server or web server related (bye bye
Tomcat).
I then installed just the things I needed (
JBoss 2.4.3,
Jetty 3.1.3,
Ant,
JDK 1.3.1, and
Struts 1.1) and it worked!
I then dropped struts-example.war into the jboss\deploy directory and that worked too!
Recursion solved
I figured out how to get the recursive relationship setup in PostgreSQL.
After creating the public.person table, I create the loader record:
INSERT INTO public.person (person_name) VALUES ('loader');
Then I update that record to show that it was updated by itself:
UPDATE public.person SET updated_by = ( SELECT person_id FROM public.person );
Now that the record obeys the recursive constraint that I want to set up, I add the constraint:
ALTER TABLE public.person ADD CONSTRAINT person_updated_by_fk FOREIGN KEY (updated_by) REFERENCES public.person(person_id);
Now every time I add a new record, I do it this way:
INSERT INTO public.person (person_name, updated_by) VALUES ('first user', (
SELECT person_id FROM public.person WHERE person_name = 'loader' ));
It works!
LAMP project
In addition to my main
PostgreSQL /
JBoss /
Jetty /
Struts job, I also have a
Linux /
Apache /
MySQL /
PHP side job.
This is my first PHP job, so I am learning as I go. More on that later.