Richard,
First off I think you should be a bit more careful in proclaiming this
to be some limitation in a tool or server (where the server aspect came
I don't know). I have used JBuilder since EJB 1.1 prior to joining
Borland and found it to be quite a productive EJB environment unlike
the rest of the tools on the market. Note I have worked with WebLogic,
Websphere, Silverstream and NetDynamics earlier on in my career.
I have never encountered a problem with PKs used with ints or Integers
within this environment. In fact Borland AppServer supports beans with
primitives as PK's as do the deployment tools. JBuilder does not
restrict the bean provider but maybe the db-to-ejb wizard does not
always get it right especially when you use a PK which is simply
wrapping a int. Possibly the wizard was simply saying why bother with
this silly little pk class when you can have a Integer which already
has a correct hashcode and equals implementation. It could be many
things especially when its a wizard and the user is providing the input
into the steps.
Its good to see that you have moved away from this in your current book
especially when they were not warranted in most cases though I do
understand your motives, or was it a limitation in the tools and server
you were using to write and test the examples with....... ;-)
regards,
William
----- Original Message -----
From: Richard Monson-Haefel <[EMAIL PROTECTED]>
Date: Tuesday, July 10, 2001 2:32 pm
Subject: Re: Not 'int' but 'Integer' in Cabin example by Richard Monson-
Haefel
> Hi,
>
> Literally tens of thousands of people have run the examples in the
> book with
> out a problem. It must be a limitation of your tools and or
> server. You can
> change your examples to use Integer if that works better with your
> tool.
> Note: In the 3rd Edition of the book (http://oreilly.techrev.org/)
> I also use
> single-field primary keys a lot since that seems to be easier for
> people new to
> EJB. However, compound primary keys are still valuable in many cases.
>
> Thanks!
>
> Richard
> --
> Richard Monson-Haefel
> Author of Enterprise JavaBeans, 2nd Edition (O'Reilly 2000)
> Co-Author of Java Message Service (O'Reilly 2000)
> http://www.jMiddleware.com
>
> Darya Said-Akbari wrote:
>
> > Hi,
> >
> > I wonder that anybody could run the Cabin example from
> > chapter 4 of Richard Monson-Haefel EJB book.
> >
> > In the CabinPK class he use 'int' instead of 'Integer'
> > for declaration. Shouldn't it be 'Integer' since
> > CabinPK implements the Serializable interface?
> >
> > When you try it opposite, to model your Cabin EJB
> > begining with your Database table CABIN, then the
> > JBuilder4 wizard only use Integer instead of int.
> >
> > If anyone could run the example like given in the
> > book,
> > please let me know.
> >
> > Best regards,
> > Darya
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> >
> >
>
========================================================================
===> To unsubscribe, send email to [EMAIL PROTECTED] and include in
the body
> > of the message "signoff EJB-INTEREST". For general help, send
> email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
>
>
========================================================================
===
> To unsubscribe, send email to [EMAIL PROTECTED] and include in
> the body
> of the message "signoff EJB-INTEREST". For general help, send
> email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".