RE: Fun with compound primary keys

2001-05-10 Thread Kemp Randy-W18971

Can someone explain this question to me?

-Original Message-
From: Tin Hoc Pt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 10, 2000 1:25 PM
To: Orion-Interest
Subject: RE: Fun with compound primary keys



mkgjfkgjfkgnjkjgfgrfg




RE: Fun with compound primary keys

2001-05-10 Thread Dan North

I think it will become clearer when someone removes the gaffa tape from his 
mouth  Something to do with EJB deployment is my guess.


At 07:39 10/05/2001 -0500, you wrote:
Can someone explain this question to me?

-Original Message-
From: Tin Hoc Pt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 10, 2000 1:25 PM
To: Orion-Interest
Subject: RE: Fun with compound primary keys



mkgjfkgjfkgnjkjgfgrfg

--
Dan North
Development Team  -  Cadrion Consulting Ltd  -  +44 (0)20 7440 9550

CONFIDENTIALITY
This e-mail and any attachments are confidential
and may also be privileged. If you are not the named recipient,
please notify the sender immediately and do not disclose the
contents to another person, use it for any purpose, or store
or copy the information in any medium





RE: Fun with compound primary keys

2001-05-10 Thread Lauren Commons

Clearly this is a cryptography problem.  I have
applied advanced cryptographic techniques to this
message (a character shifting algorythm, actually) and
decoded the message as follows:

CIPHERTEXT
 mkgjfkgjfkgnjkjgfgrfg

PLAIN TEXT:
 omilhjilhjipljlihithi

Obviously.


--- Dan North [EMAIL PROTECTED] wrote:
 I think it will become clearer when someone removes
 the gaffa tape from his 
 mouth  Something to do with EJB deployment is my
 guess.
 
 
 At 07:39 10/05/2001 -0500, you wrote:
 Can someone explain this question to me?
 
 -Original Message-
 From: Tin Hoc Pt [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 10, 2000 1:25 PM
 To: Orion-Interest
 Subject: RE: Fun with compound primary keys
 
 
 
 mkgjfkgjfkgnjkjgfgrfg
 


=
-
Mr Lauren Commons
A person of moderate zeal

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/




RE: Fun with compound primary keys

2001-05-09 Thread Frank Eggink

Yep, if you don't make things serializable you get null as a 'value'. 
That applies to return values crossing the wire as well :-).

Note that, to prevent yourself from having more fun!

FE

On Tuesday, May 08, 2001 2:43 AM, Michael Jara 
[SMTP:[EMAIL PROTECTED]] wrote:
 It took me a while to figure this out, so I thought I'd post it.

 If you are using a compound primary key class in your CMP entity bean, 
and you forget to make it implement java.io.Serializable, Orion may do some 
really strange things.

 In my case, I have an entity bean which represents a many to many mapping 
of other entity beans, called TypeDescriptionPair.  This entity bean's 
create method took two other entity beans as parameters, EventType and 
EventDescription.  The create method would simply extract the primary key 
from each of these and store it.  So, I was doing something like this to 
test the implementation:

 ...
 eventTypes[0] = eventTypeHome.create(0, eventType0);
 eventTypes[1] = eventTypeHome.create(1, eventType1);
 ...
 eventDescription[0] = eventTypeHome.create(0, eventDescription0);
 eventDescription[1] = eventTypeHome.create(1, eventDescription1);
 ...
 typeDescriptionPairHome.create(eventTypes[0], eventDescription[0]);
 typeDescriptionPairHome.create(eventTypes[1], eventDescription[1]);

 The very last statement would throw a CreateException, because all 
EventType and EventDescription remote objects had mysteriously been 
nullified!  After hours of debugging, I realized that 
TypeDescriptionPairs primary key class did not implement 
java.io.Serializable.  As soon as I added implements java.io.Serailzable 
to the primary key class, everything was magically fixed.

 Mike
   File: ATT3.html  




RE: Fun with compound primary keys

2001-05-09 Thread Jeff Schnitzer

There have been official comments on this list to the effect that
unintuitive error messages should be considered bugs.  You should file
a bugzilla report :-)

Jeff

 -Original Message-
 From: Michael Jara [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 09, 2001 9:36 AM
 To: Orion-Interest
 Subject: Re: Fun with compound primary keys
 
 
 Unfortunately, it wasn't quite that simple.  Since I was using CMP, my
 ejbCreate was returning 'null' anyway.  If Orion, internally 
 somewhere, was
 trying to serialize the primary key class, you would expect 
 that it would
 throw an exception or at least kill the entity bean on which it was
 performing operations.  In my case, it was killing all 
 references to the
 entity beans passed in as parameters!  And it was doing so 
 only after the
 first creation of the faulty entity bean (e.g. one was 
 successfully created,
 the next one had problems.)
 
 This is, of course, not a bug in Orion.  It's just counter-intuitive
 behavior which occurs when the bean developer (me) does 
 something stupid. :)
 
 Mike
 
 - Original Message -
 From: Frank Eggink [EMAIL PROTECTED]
 To: Orion-Interest [EMAIL PROTECTED]
 Sent: Tuesday, May 08, 2001 2:20 PM
 Subject: RE: Fun with compound primary keys
 
 
  Yep, if you don't make things serializable you get null 
 as a 'value'.
  That applies to return values crossing the wire as well :-).
 
  Note that, to prevent yourself from having more fun!
 
  FE
 
  On Tuesday, May 08, 2001 2:43 AM, Michael Jara
  [SMTP:[EMAIL PROTECTED]] wrote:
   It took me a while to figure this out, so I thought I'd post it.
  
   If you are using a compound primary key class in your CMP 
 entity bean,
  and you forget to make it implement java.io.Serializable, 
 Orion may do
 some
  really strange things.
  
   In my case, I have an entity bean which represents a many to many
 mapping
  of other entity beans, called TypeDescriptionPair.  This 
 entity bean's
  create method took two other entity beans as parameters, 
 EventType and
  EventDescription.  The create method would simply extract 
 the primary
 key
  from each of these and store it.  So, I was doing something 
 like this to
  test the implementation:
  
   ...
   eventTypes[0] = eventTypeHome.create(0, eventType0);
   eventTypes[1] = eventTypeHome.create(1, eventType1);
   ...
   eventDescription[0] = eventTypeHome.create(0, 
 eventDescription0);
   eventDescription[1] = eventTypeHome.create(1, 
 eventDescription1);
   ...
   typeDescriptionPairHome.create(eventTypes[0], 
 eventDescription[0]);
   typeDescriptionPairHome.create(eventTypes[1], 
 eventDescription[1]);
  
   The very last statement would throw a CreateException, because all
  EventType and EventDescription remote objects had mysteriously been
  nullified!  After hours of debugging, I realized that
  TypeDescriptionPairs primary key class did not implement
  java.io.Serializable.  As soon as I added implements 
 java.io.Serailzable
  to the primary key class, everything was magically fixed.
  
   Mike
 File: ATT3.html 
 
 
 
 




RE: Fun with compound primary keys

2001-05-09 Thread Tin Hoc Pt


mkgjfkgjfkgnjkjgfgrfg