-
1. Re: Examples from Richard Monson-Haefel JavaEnterpriseBeans3
colinthorburn Nov 7, 2001 10:24 AM (in response to saint1)Richard, post more detail please - ejbCreate etc
-
2. Re: Examples from Richard Monson-Haefel JavaEnterpriseBeans3
saint1 Nov 7, 2001 10:30 AM (in response to saint1)I use the EJB2.0 standard. The Bean class is defined as abstract. Here is the Bean code
public abstract class CabinBean implements EntityBean {
public Integer ejbCreate(Integer id) {
this.setId(id);
return null;
}
public void ejbPostCreate(Integer id) {}
public abstract void setId(Integer id);
public abstract int getId();
public abstract void setShipId(int ship);
public abstract int getShipId();
public abstract void setName(String name);
public abstract String getName();
public abstract void setBedCount(int bc);
public abstract int getBedCount();
as jndi Name i used the ejb-name. In this case it is CabinEJB. In the book he used CabinHomeRemote.
Pierre -
3. Re: Examples from Richard Monson-Haefel JavaEnterpriseBeans3
colinthorburn Nov 7, 2001 10:41 AM (in response to saint1)Hmm, not familiar with EJB2.0 (yet!) or this book. I think CMP definition for the bean is out of whack with the table you are trying to insert into.
-
4. Re: Examples from Richard Monson-Haefel JavaEnterpriseBeans3
saint1 Nov 7, 2001 10:51 AM (in response to saint1)i try to instanstiate the bean. But he cant nest it.
Perhaps jboss doesnt support EJB2.0 yet.
I got some other messages from Jboss
[Verifier]
Bean : CabinEJB
Section: 9.2.2
Warning: The entity bean class must not be defined as abstract.
[Verifier]
Bean : CabinEJB
Section: 9.2.2
Warning: The entity bean class must define a public constructor that takes no ar
guments.
[Verifier]
Bean : CabinEJB
Section: 9.4.7.1
Warning: The primkey-field element must name a public field in the bean implemen
tation class.
[Container factory] Deploying CabinEJB
[JAWS] Table 'CabinEJB' already exists
[ContainerManagement] Initializing
[ContainerManagement] Initialized
[ContainerManagement] Starting
[ContainerManagement] Started
Pierre -
5. Re: Examples from Richard Monson-Haefel JavaEnterpriseBeans3
lafr Nov 7, 2001 3:20 PM (in response to saint1)which version of jboss are you running on ?
Seems to be a version which is not able to run ejb2.0 beans.
I use the current cvs-version which works fine so far. -
6. Re: Examples from Richard Monson-Haefel JavaEnterpriseBeans3
tom Nov 8, 2001 5:01 AM (in response to saint1)Hi,
you can deploy the examples, but only the 1.1 version as long as you are running the "normal" distribution.
I don't have any experience with the developer version which seems to be able to run the EJB 2.0 examples.
Thomas