Yes sure it is declared:

public interface VirtualCallCenterHome extends EJBHome 
{
   
   public VirtualCallCenter create(String inVCCName, 
                                   String inDescription) 
                            throws RemoteException,
                                   CreateException,
                                   DuplicateVCCNameException;
....
}

/**
Implementation
I throw DuplicateVCCNameException just in the start of ejbCreate function
And still getting TRANSACTION ROLLBACK EXCEPTION instdead of DuplicateVCCNameException
*/
public VirtualCallCenterPK ejbCreate( String inVCCName, 
                                         String inNotes
                                        ) 
                               throws CreateException,
                                      DuplicateVCCNameException
                                      
{
       log("VCCBean::ejbCreate(...)",theLogLevel );
       String error = "VCCBean::ejbCreate: TEst";
       throw new DuplicateVCCNameException (error);
}

On Thu, 9 Nov 2000 18:43:05 +1030 (CST), Tom Cook wrote:

>Darius Davidavicius writes:
> > Hi all,
> > 
> > I using beta prod3 (the same problem was and with prod2)
> > 
> > I have EntiryBean ejbCreate function where i inserting data into oracle by name 
>(inVCCName)
> > I have constraint on the table and it allows just unique names
> > Currently running version (Weblogic) thows SQLException where i can check if not 
>unique name i was trying to insert.
> > first function call ::ejbCreate ("XXX", "Notes1") works fine
> > 
> > second call of ::ejbCreate ("XXX", "Notes2") works strange:
> > I catch java.sql.SQLException and i want to throw my DuplicateVCCNameException but 
>instead of it i do getting TRANSACTION ROLLBACK EXCEPTION
> > 
> > Why it is so?
>
>This is what the EJB spec specifies should happen in the case of a
>bean implementation throwing a runtime exception (I don't recall the
>section exactly).  Is your exception declared in the throws clause of
>the create method of the home interface?
>
>Tom
>
>
>--
>--------------------------------------------------------------
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>Problems?:           [EMAIL PROTECTED]
>





--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to