Sivakumar,

I can tell you how it works in my case.

I use WebLogic 5.0.

I deploy EJBs using Jar files which I place under proper directory in WL
installation
(for instance c:\weblogic\myserver).

EJB Jar's do not contain *Exception.class files.

Instead, I deploy *Exception.class files under another directory in WL
installation
which is known to weblogic.classpath and can be
(for instance c:\weblogic\myserver\serverclasses).

WebLogic expects to find EJB classes under one directory
and all other classes ubder another directory.

In your EJB, where methods declare throwing My*Exception,
import A.b.c.d.*;
where A.b.c.d. is a package to which My*Exception belongs, so that
A.b.c.d.My*Exception
is fully qualified class name.

Your EJB belongs to another package, let's say G.f.d.g.h.

Viktor


----- Original Message -----
From: Sivakumar_Subramanian <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 18, 2000 11:35 PM
Subject: Re: Exception Handling..


> Hi Viktor,
>         It's fine. But i have something like 200 beans in my project. And
of
> course i have some 4-5 exceptions(defined by me) . My question is whether
i
> have to include all the exception class in my jar file while making it.
hope
> u might have got my question? will it won't be duplication of code if i
> include all the exception class files in all my jar file. kindly help .
>
> sivakumar
>
>
> > ----------
> > From:         Gritsenko[SMTP:[EMAIL PROTECTED]]
> > Reply To:     Gritsenko
> > Sent:         Tuesday, July 18, 2000 7:27 PM
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: Exception Handling..
> >
> > Sivakumar,
> >
> > The way I do Exception handling is:
> >
> > I have custom MyProperyException class which represents a problem with
any
> > of
> > many instance variables of any given Entity EJB. This problem can occur
> > while
> > values are assigned to instance vars of Ent. EJB. The problem can be
wrong
> > type of the
> > value being assigned, or value assigned can be out of range, or
something
> > else.
> >
> > Also, I have MyBusinessException class which represents a problem with
> > relationship between
> > more than one different EntityEJBs. The problem can occur when a
business
> > method is invoked, which involves more than one Entity EJBs.
> >
> > Business methods are ones of a Session Bean. It is also known as
wrapping
> > Entity EJBs with Session EJB.
> >
> > MyPropertyException is declared as being "thrown" by such methods of
Enity
> > EJB as "create" of EntEJBs
> > Remote interface and any methods added to this interface by developer
> > (a.k.a. Business Methods, even though I consider them Persistence
Related
> > Custom Methods of Ent. EJB - I consider methods of the Session EJB to be
> > ultimate Business Methods.)
> >
> >
> > MyBusinessException is declared as being "thrown" by (ultimate) Business
> > methods of Session EJB.
> > Session EJB is stateless and each method represents one whole
transaction.
> > In other words, there
> > is no transaction which completion requires invocation of more than one
> > method of Session EJB.
> >
> > I do have a Servlet which plays a role of a Controller, in other words,
it
> > mediates between View (GUI, which I implement as JSP) and Model (which
is
> > my
> > Session Beans - the ultimate governers of the Business Oikumen - they
can
> > execute steps which pertain to Business Rules - and the steps they
execute
> > are the ultimate Business Methods).
> >
> > Now, imagine an attempt to enter some property values in HTML form and
> > submit it to Controller.
> > Also, lets' assume that some values are of wrong format (wrong
properties,
> > 1-WP), some are of wright format but do not make a business sense
> > (business
> > problem, 2-BP).
> >
> >
> > 1-WP will cause throwing of MyPropertyException by some methods of
Remote
> > interface of Entity EJB.
> >
> > We know, that Session EJB wraps Entity EJb, which means that there is a
> > method AA in Ses. EJB which calls method A of Ent. EJB.
> >
> > Remember, A throws MyPropertException, AA does not.
> >
> > AA catches MyPropertException, interprets it in terms of Business Rules
> > and
> > throws appropriate MyBusinessException.
> >
> > Controller catches MyBusinessException and informs GUI about it. In my
> > case,
> > Controller-servlet
> > redirects to URL of proper JSP which visualizes MyBusinessException. Of
> > course, MyBusinessException instance is passed to that JSP (I use
> > HTTPSession object to do that). MyBusinessException instance contains my
> > custom info about what happend in terms of Business Rule violated.
> >
> >
> > Viktor Gritsenko,
> > the Generic Semantic Associations guy
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: Sivakumar_Subramanian <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, July 18, 2000 8:51 AM
> > Subject: Exception Handling..
> >
> >
> > > Hi,
> > >         How do i handle my own / user-defined exception for all the
> > > exceptions like Create exception, Remote Exception in EJB. If so,
> > whether
> > i
> > > need to include that exception class in all the deployable jar files?
is
> > it
> > > not ringing?? pls let me know.
> > >
> > > I don't want any third party tools also.
> > >
> > > help will be greatly appreciated.
> > >
> > > with regards,
> > > sivakumar
> > >
> > >
> >
==========================================================================
> > =
> > > 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