This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 63607

Summary: EJB session bean create method must return void
Product: javaee Reporter: psecheresse <psecheresse>
Component: EJBAssignee: Martin Adamek <madamek>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description psecheresse 2005-09-03 21:01:08 UTC
The generated code in a BEAN (javax.ejb.SessionBean) isn't correct, see result
below when I use the contextual menu to add a create method:
    public CartRemote ejbCreate(String person, String id) throws
javax.ejb.CreateException {
        //TODO implement 
    }

No error message windows and nothing in the log.

In EJB Specif 2.1 --> 7.11.3 ejbCreate<METHOD> Methods 
The session bean class must define one or more ejbCreate<METHOD> methods whose
signatures must follow these rules:
- The return type must be void.

I think there is a confusion with HOME interface wich conversely need a return
type :
In EJB Specif 2.1 --> 7.11.6 Session Bean’s Remote Home Interface : 
- The return type for a create<METHOD> method must be the session bean’s remote
interface type.

I was working with NetBeans 4.2 200508311800, I did a session bean as described
in the J2EE 1.4 Tutorial with NB 4.1, The CartBean Example Application (Page
file:<INSTALL>/j2eetutorial14%20NB4.1/docs/Session2.html ).
I was at the chapter : The ejbCreate Methods, step 5
Comment 1 Martin Adamek 2005-09-05 12:22:36 UTC

*** This issue has been marked as a duplicate of 61518 ***