J2EE RI 1.2.1 (but not for much longer!)

-----Original Message-----
From: Dave Wolf [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 01, 2000 6:56 PM
To: [EMAIL PROTECTED]
Subject: Re: CMP EJB Debugging using J2EE RI 1.2.1


You are right, the super classes break point should have hit. Whose
implementation is this?

Dave Wolf
Internet Applications Division
Sybase

----- Original Message -----
From: "Richard Landon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 01, 2000 2:34 PM
Subject: Re: CMP EJB Debugging using J2EE RI 1.2.1


> Thus, I'm very confused as to why the debugger does not break! (SEE 1).
>
> Is this some possible JTS thing?. Our ENTITY CMP EJB are being called
> from a stateless session bean and the transaction description used at
> deployment
> time is required (universally). We call this session bean "the event
> manager" as it coordinates
> a number of CMP EJB. The event manager bean (in this case) is called from
> another
> stateless session bean that receives XML content and converts it into
> persistence
> storage by parsing it and making the appropriate calls into the event
> manager (which
> in turn makes the calls to the CMP EJB). This so-called content handler
bean
> using
> a single business method for handling content and is passed a XML element.
> This
> method has a deployment descriptor for the method as requires new. (Each
XML
> element
> is then treated as a separate transaction). Currently, in our unit test
case
> (using JUNIT)
> the initial EJB client has no inherit transaction context, althought we
> could very well
> create one using the JTA if that's appropriate.
>
> Thanks for all the information, perhaps we'll figure it out soon.
>
> -----Original Message-----
> From: Jonathan K. Weedon [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 01, 2000 10:03 AM
> To: [EMAIL PROTECTED]
> Subject: Re: CMP EJB Debugging using J2EE RI 1.2.1
>
>
> Dave,
>
> Two thoughts:
>
> 1) Your ejbLoad and ejbStore must be called, as per the spec.
> So setting break-points in your bean should still work.  The
> fact that the "actual" class is a subclass does not change
> this fact.
>
> 2) For products which use this technique to implement CMP, it
> is generally possible to figure out the name of the BMP subclass.
> Therefore, you should be able to set a breakpoint in the subclass
> if you want.
>
> <vendor>
>
> Although this is not how IAS implements CMP (we do it in the
> container, not using BMP subclassing) if you used a third party
> O/R product which did use this technique (such as CocoBase),
> it would be quite straightforward to do the requisite debugging
> in JBuilder4.
>
> </vendor>
>
> -jkw
>
> Dave Wolf wrote:
> >
> > Richard.
> >
> > One method that some CMP implementations use is to subclass the CMP bean
> > with a code gernated BMP bean.  That BMP bean will then super() to its
> > parent as part of the work it does.  For instance, imagin you write an
> > entity bean called
> >
> > CMPEntity
> >
> > Which is implemented in
> >
> > foo.bar.CMPEntityBean.class
> >
> > When you deploy, you mape CMP fields to O:R maps.  The container would
> then
> > on its own generate a totall new class, possible called say
> >
> > CMPEntity_Generated
> >
> > That class would then extend yours, so
> >
> > public class foo.bar.CMPEntity_Generated extends foo.bat.CMPEntityBean
> >
> > At runtime, your class CMPENtity is never ever called.  The container
> > instead would call CMPEntity_Generated.  Every method call in that class
> as
> > part of its work will super up the your class.
> >
> > For this reason if you set a debugger up to debug foo.bar.CMPEntityBean
in
> > its ejbLoad() method, you never hit the break point.  As your class is
> never
> > ever loaded.  Instead the subclass is loaded.  Yes, you see your logging
> > outputs as the subclass supers to its parent, causing your messages to
> > print.  But your class is never ever loaded.
> >
> > This may be why you are unsable to debug a CMP bean, and the bean class
> > itself is never used, except as a super class in an inheritence system.
> >
> > You can indeed do work in ejbLoad() and ejbStore() such as encyrpting or
> > decrypting a field, and that work will indeed occur due to the super()
> > calls.
> >
> > Does that make more sense?
> >
> > Dave Wolf
> > Internet Applications Division
> >
> > ----- Original Message -----
> > From: "Richard Landon" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, October 31, 2000 7:33 PM
> > Subject: Re: CMP EJB Debugging using J2EE RI 1.2.1
> >
> > > I have given this some further thought. Suppose for example I have a
CMP
> > > bean that I encrypt before
> > > writing it to the DBMS. Does this response imply that I can not
actually
> > use
> > > the ejbStore() and ejbLoad()
> > > mechanisms for CMP Entity EJB? From my understanding of the J2EE
> > > specifications, this would make little
> > > sense (but I could not understand the specification).
> > >
> > > At any rate, I know my CMP entity container is in fact calling my
> methods,
> > > as I have special code in there
> > > and I see the output of these codes, nonethless, the debug breakpoint
is
> > not
> > > being reached.
> > >
> > > -----Original Message-----
> > > From: Dave Wolf [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, October 30, 2000 7:55 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: CMP EJB Debugging using J2EE RI 1.2.1
> > >
> > >
> > > Richard,
> > >
> > > How do you know what class to set the stop in?  Since many CMP
> > > implementations work by subclassing your CMP bean with a code
generated
> > BMP
> > > bean, how do you know the class name of the BMP bean the CMP layer
> > created?
> > > Since the BMP subclasses your CMP you will stiull see your debug
> > statements,
> > > although the subclass generated them from a call to super.*
> > >
> > > I doubt this is possible to do in many cases.
> > >
> > > Dave Wolf
> > > Internet Applications Division
> > > Sybase
> > >
> > > ----- Original Message -----
> > > From: "Richard Landon" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Monday, October 30, 2000 10:13 PM
> > > Subject: Re: CMP EJB Debugging using J2EE RI 1.2.1
> > >
> > >
> > > > -----Original Message-----
> > > > From: Richard Landon
> > > > Sent: Monday, October 30, 2000 7:06 PM
> > > > To: 'A mailing list for Enterprise JavaBeans development'
> > > > Cc: '[EMAIL PROTECTED]'
> > > > Subject: CMP EJB Debugging using J2EE RI 1.2.1
> > > >
> > > >
> > > > I am trying to debug a CMP Entity EJB using the J2EE RI 1.2.1 under
> NT.
> > > > I have managed to be able to debug SESSION (stateless or stateful)
EJB
> > > > within the
> > > > J2EE 1.2.1 RI using the JPDA interfaces and a suitable debugger.
> > However,
> > > > when I set a break-point in any CMP Entity EJB code (including
> > > > setInitialContent!)
> > > > the breakpoint is never hit!? I switched from a UI Debugger to jdb,
> and
> > > the
> > > > same thing.
> > > > I inserted some "trace statements" so I know for a fact the code is
> > > > executing, but the
> > > > debugger will not break.
> > > >
> > > > This is most annoying, any suggestions?
>
>
===========================================================================
> 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".

===========================================================================
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".

Reply via email to