return type of ejbCreate


EJB design: return type of ejbCreate

  1. return type of ejbCreate (3 messages)

    Hi there,

    Can I define an ejbCreate that the return type is other than the type of primary key?

    Thanks and regards,

    Threaded Messages (3)

  2. return type of ejbCreate[ Go to top ]


    I think we can't write

  3. return type of ejbCreate[ Go to top ]

    Why would you want to return anything other than the primary key?

  4. return type of ejbCreate[ Go to top ]

    Yes, you can. You need not define a custom primary key class, you can just use appropriate wrapper classes. For example, String, Byte, Boolean, Integer, etc. you can also use StringBuffer, Date, Hashtable ... You can use any class as long as it's serializable. For example if you String as return type in ejbCreate, you need not have your custom Primary key class.
    You can specify in your dd like this

    Hope this helps you