How create EJB 2.1 Stateful Session Bean in a EJB 3.0 Session Bean

Hi All,

We have been developing on EJB 2.1. We are now adding a module on EJB 3.0.

How can we "create" a stateful session bean with create method signature similar tocreate(String id)?

We have tried

// this is the remote interface

@EJB AddressBean abean;

But not working

Any help will be appreciated.

[365 byte] By [c.m.mwungua] at [2007-11-26 17:19:00]
# 1

There is no explicit create() call for EJB 3.0 session beans. It doesn't really matter though

since you can accomplish the same thing by defining your own business method to act

as an initializer for whatever state you'd like.E.g.

@Remote

public interface FooInterface {

public void initialize(String id);

// ... other business methods

}

@EJB FooInterface fooRef;

...

fooRef.initialize("foo");

--ken

ksaksa at 2007-7-8 23:46:59 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...