Thursday, August 29, 2002

I've been looking at Sun's Java WebServices stuff. Its really neat and its free.
The samples were interesting. The build files seemed to be very broken.
Like maybe somebody changed directory structures completely.
The tutorial examples seem a little messed up as well.
So far, I've been focusing on JAXM.

I wrote two simple clients and a simple server.
One client is a Servlet, and the other client is a Java application.
The examples run under Resin fine.
I've been using the Resin plugin for eclipse, which is very sweet.

Tuesday, August 20, 2002

Updated swing course. Swing is fun. I wonder what SWT is like.
Peter sent me the updates to the example code for CMP/CMR and EJB QL.
The tutorial now works with JBoss.

Friday, August 16, 2002

I am going to become TogetherControl Center Certified. Sounds like fun....
I installed the Resin plugin for Eclipse. I will use that when writing the Resin Official guide. So far it has worked out well. It does not seem to do to much, but what it does it does well. I coverted a few of the Tomcat examples for the Resin book. I am going to go with the Employee listing example for most of the book. I am teaching a course on Java GUIs this week. In a few weeks, I will teach a course on swing. I am also going to be working on the course generator.

Saturday, August 10, 2002

I use to hate XSL and XSLT. But now I am starting to like it. It is so easy to use.
I created two style sheets:
One creates fo for a course workbook
The second one creates fo for a slide set
I created a lesson xml file.
I run the lesson.xml file through xalan using the above two style sheets to generate fo files.
Then I use Apache fop to turn the fo files into PDFs.
The slide set looks just like I did it in power point.
The workbook looks nice too.

Friday, August 09, 2002


http://sourceforge.net/projects/pythoneclipse

Looks like a good project. I wish I had the time. This would be a project I
would like to get involved in. Right now I am knee deep in XSL and FOP (I
worked on this till 5:00AM last night tweaking my FOP files until the
generated PDF looked just like my powerpoint slides). I just finished
working on two chapters for the Tomcat book. And, now I am working on a new
book until December/January (the official Resin guide). After that... I
think I want to update the Java Tools for Extreme Programming to the next
edition (hopefully Nick will want to as well)..... Then after that I want to
work on JYSP:

(from my blog)
http://rickhightower.blogspot.com/2002_06_01_rickhightower_archive.html
I want to create JYSP.... Jython Server Pages. I have been thinking about it
a lot.
It would consist of two things:
1) An Ant task that takes *.jysp files and converts them into Jython based
Servlets.
2) A Servlet that has *.jysp files associated with it. The Servlet (the JYSP
engine), would check to see if the jysp file has already been generated, if
not it would generate the file and then compile it with jythonc.

This will be my next pet project after I finish the others if someone does
not do it first.

Is there a WYSWIG FOP editor?

I was just in Chicago teaching a tutorial at XP Universe.

I added 20+ slides on XDoclet to my Java Tools For Extreme Programming
Presentation/Tutorial for XP Universe. BTW Everyone that attended the tutorial was really interested in XDoclet. I asked for a show of hands for how many people
thought they would use XDoclet, and almost everyone raised their hand.
XDoclet Rocks!

I am going to post the slides on my website with additional links to the
source code. I am going to beef up the XDoclet presentation for the TJug meeting next month.

WORKING SAMPLE SOURCE
I have some Custom Tag XDoclet examples, Servlet XDoclet example, and a
detailed CMP/CMR/EJB QL XDoclet example, and a Struts XDoclet example. The Struts and CMP/CMR examples both come complete with an Ant build script that builds the database tables.

The CMP/CMR example has examples of a stateless session bean; 4 entity
beans; with one to one, one to many and many to many relationships; and
plenty o' select & finder methods. It is a fairly complete example.

Look for the source at the bottom of this page (I wrote a 4 part CMP/CMR
tutorial the last two example sources use XDoclet)
http://www.rickhightower.com/ejbcmpcmrtut.html

The new Tomcat book from Wiley covers XDoclet for Custom Tags, Servlets and
Struts. I wrote the chapter on Ant and Struts. The Ant chapter has the
XDoclet examples. The book is Mastering Tomcat Development by Peter Harrison
et al by Wiley.

The source code for the Struts/XDoclet, Servlet/XDoclet and the Custom Tag
XDoclet can be found here:

http://www.rickhightower.com/tomcatbook.zip

The examples are complete in the sense you can run them when you are done.
The Servlet example configures a JDBC resource amongst other useful things.

I'd like to have the examples ship with the distribution if possible. I
think they would help the averagely motivated to get started with XDoclet.


It was neat meeting Kent Beck, and others in person. (Chet H. says he has a copy of our book Java Tools for Extreme Programming and that he uses it as a reference.)


Sunday, August 04, 2002

Response To Erik Hatcher for the Blog notes that I posted on the Tucson JUG on what floats my boat lately.
>
> Right on! I'm doing the same stuff in my apps.
>
> Out of curiosity - what Tomcat book?

I wrote two chapters for a Wiley Tomcat book.

Mastering Tomcat Development
Peter Harrison
ISBN: 0-471-23764-7
Paperback
464 Pages
September 2002

My buddy Tim Ryan asked me to do it.
It was a lot of fun.

I am also coauthoring a new book. I was hoping I could get some technical
feedback on the new book from this group.

>
>
>
> Here is where I draw the line with XDoclet. Its awesome - but where
> metadata should reside really needs to be though through.

Good point.

Action
> mappings in Struts are the "glue" between view/controller essentially
> and I do not feel they belong in the source code.

Makes sense to me. I agree with you.

I reuse forms in
> different action mappings and that should be independent from the source.

You can still reuse forms in various action mappings. The action mapping is
defined in the action class not the form. It was useful for this simple
example app, and I think it would be useful for a lot of the Struts I've
done in the past, but I agree that it would sometimes just not make sense.
(You could always use Ant filters and XDoclets to configure the config file
on a per application level.) I think the same is true with a lot of XDoclet
not just Struts XDoclet support for example CMP/CMR if the RDBMS tables are
different how do you map to both. I think it is the 80/20 rule.

>
> But.... you can generate action mappings with XDoclet. I don't recall
> the specifics of what you do to configure it with @tags or on what types
> of classes it processes to get them, but it is done and I've complained
> on the XDoclet e-mails lists that this is an abuse of metadata in the
> Java source code.

I think I would use it for most Forms and Actions except a few.

>
> The next phase of XDoclet is going to evolve it into using Velocity
> templating.

I heard/read this somewhere, but then I wondered when I saw the vDoclet
stuff I thought maybe this was related. Hmmm... sounds like vDoclet is a
branch, and I should probably just stick with the next version of XDoclet
that supports Velocity... unless I really need to create templates soon,
which I don't. I love code generation as you know. :o)

But custom templates are pretty easy in XDoclet with their
> very well done documentation handy.

you are probably right... it failed my fifteen minute test. If I can't
figure it out in fifteen minutes, I put it on my ever increasing TODO list
towards the bottom. :o) It is my triage system. Does your book have some
explanations of XDoclet templates?
I can 't wait to get a copy of your book.

Also, I highly recommend the CVS
> version over the latest release at the moment - its much faster and does
> much better dependency checking. I'm using in production as we speak.

I have a bad habit of waiting for the binary release. This is a corollary to
my fifteen minute rule. Bad Rick!

>
> > Speaking of Velocity templates, has anyone tried DVSL?
>
> I've no personal experience with it... but an Ant contributor added some
> slick DVSL stuff to the proposal/xdocs stuff I did to generate Ant
> documentation with XDoclet to turn it into snazzy HTML files and it
> works nicely... so nicely that I haven't looked under the covers of it
> yet. Have a look there for samples if you like.

Sounds cool. I don't like XSLT very much.

>
> > Oh yeah, I now use Eclipse instead of Netbean thanks to Nick from eBlox
> > who gave me a 1/2 hour lesson on using it. I really dig it. It is so
> > productive. I wish it had JSP support, but it probably does... I just
> > have not found it yet. I can't switch back to NetBeans.
>
> Oh, and IDEA supports JSP pages too! :))

I downloaded IDEA, but never installed it. It was highly reccommend by a few
people including you.

Eclipse is so snappy, and I hear there are plugins for Tomcat, Resin and
WebLogic.
I think I will use it for a while then try IDEA. It took me so long to let
go of NetBeans. When I find something I like, I hate to switch.

Have you tried Eclipse?

Another thing that floats my boat is ObJectRelationalBridge (OJB) by Jakarta. OJB is an Object/Relational mapping tool that allows transparent persistence for Java Objects against relational databases. It does not quite support JDO complety but it looks promising.


I am really into XDoclet. I had a lot of success with the EJB CMP/CMR and XDoclet. Erik Hatcher's enthusiam for XDoclet finally caught on... I hate it when he is right...it happens so often though. :o)

When I was asked to write an Ant chapter for a Tomcat book, I decided to use XDoclet to generate the web application deployment descriptor. Since XDoclet has a webdoclet ant task and the book was covering Tomcat and already covered web applications, XDoclet seemed like a perfect fit. It was so easy to use with Servlets that I decided to write a section on using XDoclet with Custom tags. This was also flawless and easy. Then I was asked to write an intro to Struts for the same Tomcat book. Again I used XDoclet it did not quite work. It did not generate the attribute for the ActionMapping, but it did generate everything else. Not perfect, but not bad. I used the last production release of XDoclet not the CVS head... I know what a coward.

I have used XDoclet, but I have not defined my own custom templates with XDoclet yet. I looked at some of the templates and they look scary complicated.... I know what a coward. I saw Vdoclet, which is similar to XDoclet but uses Velocity templates, which looks less convoluted than the XDoclet templates to me (opinion not based on fact just gut feeling). Has anyone tried VDoclets? (Warner enthusiam for Velocity is finally catching on....)

Speaking of Velocity templates, has anyone tried DVSL? DVSL is an XSLT replacement that uses Velocity templates instead of XSL based XML for XML transformations. I did not like Velocity as a replacement for JSP, but XML transformation and code generation seem like a good fit for it (opinion based on my fondness for JSP and custom tags just a gut feeling). I know XSLT, but I am not a fan if you know what I mean. Like XDoclet templates, XSLT seems a little convoluted and DVSL seems like a better fit.

Another thing that floats my boat is ObJectRelationalBridge (OJB) by Jakarta. OJB is an Object/Relational mapping tool that allows transparent persistence for Java Objects against relational databases. It does not quite support JDO complety but it looks promising. I've studied and played with JDO a lot lately, I am not 100% sold, I still really like CMP/CMR and EJB QL.


Oh yeah, I now use Eclipse instead of Netbean thanks to Nick from eBlox who gave me a 1/2 hour lesson on using it. I really dig it. It is so productive. I wish it had JSP support, but it probably does... I just have not found it yet. I can't switch back to NetBeans.


I tried the new Java Fundamentals test at BrainBench, and got the highest score in the USA (first try).
I want to take the new EJB 2.0 test.
I've been working a few chapters in the new Tomcat book.
After using Tomcat more fully, I really appreciate Resin!
Read the IBM tutorial on JDO. JDO is cool.
Why is IPlanet installation so hard?

Monday, July 08, 2002

Teaching Advanced EJB this week.
We got a real smart group that are asking me questions that are keeping me on my toes.
Update... Erik Hatcher said if I updated to Ant 1.5beta3 that this problem would go away....

as always Erik was right.... Got the Resin XDoclet to generate the Resin deployment descriptor.

Friday, July 05, 2002

I read the tutorial on Resin XDoclet. I got past the Null pointer exception by adding @ejb:home and @ejb:interface directives to each source file, but now I get another perplexing problem. Soon.


The Weblogic Bible is an enjoyable read. If you have been using WebLogic off and on since before EJB existed, you will still learn a bunch of new tricks. This is an excellent reference that can be read from cover to cover. The book focuses on small examples with an emphasis of deploying and configuring the examples in the WebLogic environment. Their are plenty of examples of setting up the configuration with an explanations of what the different parameters are and when to use them for Servlets, JSP, EJB, JMS, and more; just what you need when you are having those configuration problems and a great reference to have around when you get stuck. If you like going from concept to implementation, then this is the book for you.


In addition, unlike some other WebLogic centric books, the coverage of EJB CMP/CMR was good. Also, the coverage of performance monitoring was really well done. And, the ideas for optimization and the thought process behind it was also really well done. These are just a few examples of a really well written technical manual--the missing WebLogic Manual.


A couple areas of concern (some just nits):


1) A few times the examples were WebLogic centric when they could have been written them in a cross platform manner ( wrt J2EE ). (Note: A prerequisite of this book is a working knowledge of J2EE.)


2) The EJB examples hard coded the JNDI parameters instead of using the jndi.properites file in the classpath, which is the preferred approach for cross platform J2EE development.


Granted at times you have to write things WebLogic centric to utilize their extensions to J2EE, but the book also did this at times when it was not really necessary to do so. A J2EE veteran will catch the difference, and a J2EE novice will not. Bottom line: you should have a working knowledge of J2EE before reading this book and there will not be any problem.


Another problem with the book is that it covers WebLogic 6.1 and WebLogic 7.0 is already out. However, the material is still applicable to WebLogic 7.0. The book was released this year as was WebLogic 7.0. This in an unavoidable problem with books focused on such a target market. By the time they update the 1000 page book to WebLogic 7.0, WebLogic 8.0 will probably be out.


Also, in the next edition they should cover the Weblogic specific Ant tags in addition to the console and other means of deploying applicaitons. Ant is the de facto method for building, deploying and testing J2EE applications, and a book like this should reflect this reality.


If you are new to WebLogic, I suggest that you get this book. If you have been working with WebLogic since before the EJB .8 spec., I suggest that you get this book. This book is not a J2EE tutorial, but it covers the basics and focuses on WebLogic specific areas of concern.


Consider this book recommended.


Links of note:


Thursday, July 04, 2002

Good week. I read the WebLogic Bible and learned a bunch of new tricks. Earlier this week, I got Resin talking to WebLogic.... that was fun. (Servlet in Resin calling a Session Bean in WebLogic). I took the BrainBench EJB test, and scored Master Level at 4.44 (97 Percentile). I took the test a long time ago and just barely missed Master level.

I found a document explaining how to use XDoclet with Resin. Gee I could of used this earlier....

My Python book is being released July 5th! I got two copies in the mail already.

I created and submitted part 2 of the four part series on EJB CMP/CMR to EJB QL World!

Monday, July 01, 2002

Okay… giving it one more whirl…. It has been a long while… but I am back trying to get the Resin xdoclet support for ejb working….

I figured out that Resin has both and task and subtask called resinejb. I figured this out a few trips of New York ago, but did not have the time to test things out.

So now I run it with the subtask, and I get a nasty null pointer exception as follows:


resingen:
[resinejb] Generating Javadoc
[resinejb] Javadoc execution
[resinejb] Loading source file C:\ejbql\src\com\rickhightower\auth\GroupBean.java...
[resinejb] Loading source file C:\ejbql\src\com\rickhightower\auth\RoleBean.java...
[resinejb] Loading source file C:\ejbql\src\com\rickhightower\auth\UserBean.java...
[resinejb] Loading source file C:\ejbql\src\com\rickhightower\auth\UserInfoBean.java...
[resinejb] Loading source file C:\ejbql\src\com\rickhightower\auth\UserManagementBean.java...
[resinejb] Loading source file C:\ejbql\src\com\rickhightower\auth\UserValue.java...
[resinejb] Constructing Javadoc information...
[resinejb] Running


Well, on the one hand, this is not a good sign…. On the other hand now I have another excuse to dig into Xdoclet code, which will help me understand XDoclet better.

No build file with XDoclet src.... writing one.

Sunday, June 30, 2002

You too can hear me say "ahhh" and "ummmmh" on Syscon radio from WebServices Edge

http://www.sys-con.com/webservicesedge2002east/radio/trivera.mp3
.

I ask the important questions like "is this on?".

Sean Rhody ask questions about the XP book, the new Python book and IBM developerWork's articles on EJB CMP/CMR and EJB QL and of course Trivera Technologies.





I spoke at JDJEdge. It went much better than I thought it would... (One of the advantages of being a pessimist)
I had the early early scheduled time slot to speak, and yet the attendance was still very high.

Tuesday, June 25, 2002

Extreme Programming Explained: Embrace Change by Kent Beck

I love this book. The first time I heard of this book, I thought my buddy was joking. The title conjured up images of programmer's jumping off bridges with laptops. Needless to say, I did not read the book then. Later, I read it, and I really enjoyed it.

My feelings are that this is a good book, but it is not complete. It introduces XP, but it is hard to apply XP with just this book. In my opinion, you need the book "Planning Extreme Programming" by Kent Beck, and Martin Fowler and this book to start really implementing XP. Don't worry, they are both small books and you could read them both in a weekend.

My observation about XP:

Pair programming is a tough concept to get and sell, but it can really help a team quickly grow in leaps and bounds!

Continous Integration (CI) and automated testing go hand in hand with refactoring. Without CI and automated testing you loose liquidity in your code base, and it is hard to add new features. Your project becomes rigid, and brittle without CI and automated testing.

Of course if you want to apply XP to Java.... You know what book I suggest!
I am redoing UML diagrams for our OOA/OOD course.
Not fun!

Tomorrow I will be a JDJEdge!

I am taking the red eye tonight.

Monday, June 24, 2002

The CMP/CMR tutorials are on EJB QL World!
http://www.ejb-ql.com/tutorial.html
I finally gave in.... All of the peer pressure about Eclipse, and all of the articles.
I am in the process of downloading it.
(Actually I downloaded it a while back and installed it, but never used it. This was on my laptop. Now I am doing it on my desktop.)

Saturday, June 22, 2002

Still need to work on the Resin or JBoss port.... I did convert the first EJB 2.0 CMP/CMR tutorial to PDF and we are going to hand it out. I copied it from the IBM's PDF to OpenOffice. Then coverted it to Word. All of the text was screwed up so I had to reformat the code listing and add back cr/lf and stuff. Kim made it look nice, and converted it back to PDF.

EJB QL World agreed to host the first two parts of the tutorial on their site. Yeah! I just need to finish converting it to HTML. I used Word to convert it to HTML and it looked like crap so I need to make it look neat. I also used OpenOffice to convert it to HTML and it looked worse in some ways... better in others. I am starting to prefer OpenOffice to MS Office. I think MS should be scared of OpenOffice.... much more so than Linux.

On Friday, I finished the slides for Agile/XP Universe. I started with the slides for JDJEdge... took out the stuff about XP theory and add more stuff about the using the tools. I added JUnitPerf, JMeter, and HttpUnit slides. I also added some more slides on Ant and more about JUnit. I also beefed up the Cactus sections. I created a collaboration diagram for Cactus to explain how the test runs on both the client and the server.

Wednesday, June 19, 2002

I took the UML test today on BrainBench. I was shooting for master level.... I missed it by 0.02 points.
I needed a 4.0 to get master level and I got a 3.98. Strangely, it is the 12th highest score in the United States of more than 750 people, and still not master level. I will try again in a few months. I think I will read UML distilled by Martin Fowler first.

I found this site useful for studying for the test. I also used the Larman book as well, and the UML spec.

Tuesday, June 18, 2002

Where can I find good Swing people?


Someone recently asked a good question... and it seemed like a good blog.

"Our team is looking for a very strong SWING engineer and honestly, this
hasn't been the easiest thing to find. Our backend is mod_perl for our web
sites and we're building a complex rich-client based on SWING. We want to
bring in a permanent employee in this
role as a senior engineer."


Its hard to find good Swing people. Part of the reason is the lack of demand for Swing, since Swing was so buggy in the past. Thus, developers that learned it did other type of development instead, and since there was no demand, it left a bad taste in their mouth. However, Swing is a lot better than it use to be!

May I ask what type of swing development do you plan on doing? e.g., Applet or Application?

If Application, you may consider SWT from IBM. The Eclipse project is built on SWT. SWT is more performant since it runs against more native code. Swing is a resource hog (although it is a lot better than it use to be). There is an article in Info World that you should read on SWT article on SWT Swing has some advantages as well. Swing has a really well designed API and framework. (I like Swing.)

If you are sold on Swing, may I suggest an alternative to hiring someone new. I find that taking a known quantity like a known good Perl developer and training them on Java and Swing is better (less risky) than taking an unknown quantity like a new developer off the street who claims to be a Swing expert. Plus variety is the spice of life and some of your Perl developers may want to learn something new. Good OO developers are good OO developers regardless of syntax. (For Perl developers you may have to do some training on OOA, OOD and OOP as well before you do Java/Swing training.)

If you do decide to hire someone off the street, make them take the Java GUI brainbench test, and pass it at the master level. This will not prove that they are a good developer, but it will show that they at least know about Swing. Always get good references. And if you know anyone that knows swing and Java, have them help you with a tech interview questions. In the past, when I want a developer with a certain skillset, I would not even interview them until they passed the brainbench exams.... this saves time and weeds some people out straight away.

Also, let me know if you ever want to switch from the Perl Mod world to the JSP, TagLib, Servlet world. Resin's fast Servlet 2.3 and JSP 1.2 engine beats mod_perl, mod_php, and other servlet engines in performance benchmarks. I like LAMP. I helped an organization switch from LAMP to J2EE.

Triveratech specializes in J2EE training. We also have Java and Swing course that may help you out.
EJB QL + EJB Local + XDoclets = more EJB on more projects

I have recently read a lot of articles about whether or not developers should use EJB.


The argument against EJB tends to be that they are too complex. This is ironic since EJB's purpose was to simplify server-side development. Don't get me wrong... I agree EJB is too complex with for a lot of projects, and that a lot of project could have gotten away with just Servlets and JSP. Too many developer's were using EJB to add an extra bullet on their resume. While I agree that EJB is not for every project, I think recent advances in tools and techniques equate to EJB being more applicable to more projects.


Of particular interest in developer productivity with EJB is CMR, EJB QL and XDoclet (EJBDoclet). Basically, the productivity and utility of these tools have to exceed the inherent difficulties in using EJB in order for EJB to be considered on a project. These tools lower the bar while increasing the utility and make more projects candidates for EJB.


XDoclet, and open source project, simplifies EJB development by using JavaDoc API and some additional APIs as a code generator so that a developer only has to maintain one file instead of 5 or more files (,i.e., deployment descriptor, local interface and/or remote interface class files, local home and/or remote home class files, vendor deployment descriptors and/or conf files, bean implementation, primary key class files, value class files and more.)


There is a significant increase in productivity by using select methods and EJB QL. Code that use to take 10, 20, 30 lines of code can be written in just a few lines of code by mastering EJB QL.


When you combine XDoclet simplification with EJB-QL and CMR, you can use EJB on a lot more projects.


With CMR it is really easy to work with the standard collections API (which we all know and love) when dealing with one-to-many and many-to-many relationships between entities.


EJB 2.0 specification has been out for a while. Have you tried the new features like CMR and EJB QL? If so, what do you think?


My personal experience is that finder and select methods (written in EJB QL) are really productive and can save a lot time. Is EJB QL the killer tool?


If you have not tried CMR or EJB QL, I wrote a tutorial on CMP/CMR and EJB QL that I think you should check out. The tutorial is on IBM developerWorks. Please go to this link to find out more information on this tutorial series and related articles.


The free tutorial is broken up into four parts.


The first part describes basic EJB 2.x CMP with a simple finder method defined in EJB QL.


The second part describes defining EJB CMR relationships. Three types of relationships are covered:


  • Many to Many

  • One to Many

  • One to One



Both unidirectional and bidirectional relationships are covered.


The third part describes basic EJB QL. It mostly deals with joining cmr fields and working with IN and MEMBER OF.


The fourth and final part describes advanced EJB QL, and how to create select methods. The tutorial refactors code using the select methods and show a 10x reduction in code. (And gives directions how to rewrite a method from the earlier examples with a 20x reduction in code.)
Master select methods and you will love EJB QL!!


You can download the PDF files for the tutorial from developerWorks and view the tutorial offline. Or you can view it online. (see the links above to developerWorks)


Parts 3 and 4 are done. They should be out really soon. They have been bounced back and forth a few times between me and the editor. There is also an article in the works on XDoclet and EJBDoclet (more on this later).


The code in the first two parts works with Sun's RI for J2EE (RI is the reference implementation). Peter Luellen from West Side Widgets created the deployment descriptors to get final code from part 1 and 2 working for JBoss. (JBoss is an open source EJB application server.)


The code in the last two parts of the tutorial were done in WebLogic. The code will run on JBoss, Resin and more shortly. Check back at my site to see code updates to other app servers, and to see if the XDoclet article has been published. (Also if you would like to run the examples on your favorite app server, and send the configuration and/or code updates, I will glady accept them. Send them to rick_m_hightower@hotmail.com.)


The code in the last two parts uses XDoclet, and makes a good example of how to use XDoclet to setup CMR relationships and write finder and select methods in EJB QL.

Initial try to get Resin EJB to run against tutorial example


Okay, okay, okay, I have been waiting for the EJB Doclets for Resin. Now they are here… yeah…. I downloaded it last Wednesday, and now its Tuesday the next week. I’ve read through the docs but got so busy with the Python book I had to stop for a while.

Step1: Went to www.caucho.com and downloaded the EJB Doclet support.

Step2: After you download the jar; extract and read the notes.txt. The notes contain the names of all of the javadoc tags for the Resin EJB Doclets.

Step 3: Run the build script with ant. If you don’t have xdoclet.jar on classpath then you will have to set the xdoclet.jar=/usr/local/src/ejb/xdoclet/lib/xdoclet.jar to where you have xdoclet.jar. (It was on my classpath so it worked for me with no mods…).

Step 4: Next I copied the resin-xdoclet.jar to my ant lib:

copy c:\resinxdoc\dist\resin-xdoclet.jar c:\ant\lib

Step 5: I modified the build file for the example and added the following:
to the ejbdoclet target (). I added the within the body ejbdoclet task. Seems straight forward, but it did not work. It complained about this not being a subtask of ejbdoclet or some such. (Later I noticed that this was mentioned in the notes.txt.)


![CDATA[



classname="com.caucho.xdoclet.ResinEjbDocletTask" classpath="${xdoclet.path}"
/>


sourcepath="${src}"
destdir="${meta}/META-INF"
classpathref="classpath"
excludedtags="@version,@author"
ejbspec="2.0"
force="${xdoclet.force}"


>










]]


Note: I got to the beginning of step 5 and then my wife and kids came to town so they can see New York too. They cruised the city while I worked. Thus another 4 to 5 days my pet project sits on the shelf. On a lighter note, I did get to see the Bronx Zoo and the Empire State building, and spend some quality time with the family. You will notice the absence of blog entries that denote their arrival.

Now step 5 is not working, when I get back online (I am currently on a plane returning to Tucson from NY), I will send some emails, and see if anyone else got this to work and while I am waiting I will dig into the resin xdoclet source code. I wanted an excuse to learn more about xdoclet internals anyway; now is my excuse to dig in.

Step 6: Add the javadoc tag to the source code. For this step, I followed the notes in the notes.txt. The notes.txt file is in the root of the file that you extract. I performed this step but nothing happened. I got a big fat zilch. Worse yet, I did not get any error messages when I ran the resingen task. See the notes for step 5 for more detail.


What have I learned from looking into the source file….

First the DD that does the mapping will be in a file resin.ejb by default.
I am getting the gist, but still not sure about all of the details.
It seems like maybe… just maybe it can’t find the *.j files, which are class resources.
I put the resin xdoc jar on the classpath…. Still nothing.

set classpath=%classpath%;c:\ant/lib/xdoclet.jar;c:\ant/lib/log4j.jar;c:\ant/lib/ant.jar;c:\ant\lib\resin-xdoclet.jar

I think I figured it out while I was offline. I think I need to use the substask resinejb of resinejb. Anyone it was fun digging into the templates.

The folks at EJB QL world wrote back and said they would be interested in the first two parts of the EJB tutorial. Now it has another home.

I posted links to the tutorial page on my site on JavaLobby, JavaChannel, JavaRanch and SlashDot. I made posting on slash dot differnent to suit their unique style.

Rawn from IBM developerWorks wrote back and now they want a tutorial on XDoclets.

Wednesday, June 12, 2002

Last night I started working on testing the sample application for the EJB tutorial on Resin.
I started to use the XDoclets for Resin. I did not finish due to an unexpected visitor.
Hopefully, I can sneak some time in tonight. I want to port/test the sample application to Resin and
JBoss (part 1 and 2 already work on JBoss) so I can start on my next pet project jysp (Jython Server Pages).
More on tihs later.

Before I started working on testing the EJB example with Resin, I asked the folks at http://www.ejb-ql.com/ if they wanted to cohost the tutorial since they did not have one yet.
No word from them.

I want to create JYSP.... Jython Server Pages. I have been thinking about it a lot.
It would consist of two things:
1) An Ant task that takes *.jysp files and converts them into Jython based Servlets.
2) A Servlet that has *.jysp files associated with it. The Servlet (the JYSP engine), would check to see if the jysp file has
already been generated, if not it would generate the file and then compile it with jythonc.
This will be my next pet project after I finish the other.

Tuesday, June 11, 2002

This is my very first blog. I am in NY this week teaching an OO analysis and design course.

I got interested in blogging after reading the "Is Tomcat Crap?" blogs. We did similar benchmarks, and got similar results when I worked at eBlox, but never shared them with the world. Ahhhh.... the power of blogging.

While in class a student showed me Scott Ambler book "The Object Primer". I flipped through it. It looks really good.
I like his Agile Modeling book.

I spent a few minutes today working with Joshua Fruhlinger. He is a contract editor working for IBM developerWorks.
He had a few queries about part 3 and 4 of the four part tutorial on EJB 2.0 CMP/CMR and EJB QL that I wrote for developerWorks.

If I get sometime tonight, I am going to work on porting the code examples from part 3 and 4 to work with Resin enterprise. The code examples for part 1 and 2 has already been ported and tested with JBoss thanks to Peter at West Side Widgets.

Okay.... well this is my first blog so I will keep it short.