-
1. Re: Problem only with ENtity Bean!!!
juha Sep 10, 2002 9:47 AM (in response to muradhak)make sure for each create method in your home interface you have implemented corresponding ejbCreate and ejbPostCreate methods in your entity bean implementation
-
2. Re: Problem only with ENtity Bean!!!
muradhak Sep 11, 2002 10:27 AM (in response to muradhak)Hi Juha,
Thanks....:)
But do I need to have ejbPostCreate for EACH create in home interface.
can you please give me an outline of code. -
3. Re: Problem only with ENtity Bean!!!
alexb Sep 11, 2002 10:36 AM (in response to muradhak)Hi,
To answer your question on ejbPostCreate. You need to match every ejbCreate with a ejbPostCreate a small example
public Integer ejbCreate(Integer id) throws CreateException
{
this.setId(id);
return null;
}
public void ejbPostCreate(Integer id){
}
hope this helps
Alex -
4. Re: Problem only with ENtity Bean!!!
muradhak Sep 12, 2002 11:44 AM (in response to muradhak)Hi Alex
EJB
===
public MyPK ejbCreate(MyValueObject vlan) throws RemoteException, CreateException {
// My Code.
}
public void ejbPostCreate(BaseValueObject baseData) throws RemoteException, CreateException{
logger.debug("SourceDestPairBean: ejbPostCreate( baseData ) called.");
}
Error
=====
ERROR 12/Sep/2002 20:21:39 [main] (Logger.java:185): plugins.BMPPersistenceManager - Home Method public abstract com.MyRemote com.MyHome.create(com.MyValueObject) throws java.rmi.RemoteException,javax.ejb.CreateException not implemented in bean class class com.MtBean looking for method named: ejbCreate
What is happening here???!!! -
5. Re: Problem only with ENtity Bean!!!
muradhak Sep 12, 2002 11:46 AM (in response to muradhak)Hi Alex
EJB
===
public MyPK ejbCreate(MyValueObject vlan) throws RemoteException, CreateException {
// My Code.
}
public void ejbPostCreate(BaseValueObject baseData) throws RemoteException, CreateException{
logger.debug("SourceDestPairBean: ejbPostCreate( baseData ) called.");
}
Error
=====
ERROR 12/Sep/2002 20:21:39 [main] (Logger.java:185): plugins.BMPPersistenceManager - Home Method public abstract com.MyRemote com.MyHome.create(com.MyValueObject) throws java.rmi.RemoteException,javax.ejb.CreateException not implemented in bean class class com.MtBean looking for method named: ejbCreate
What is happening here???!!! -
6. Re: Problem only with ENtity Bean!!!
muradhak Sep 12, 2002 11:46 AM (in response to muradhak)Hi Alex
EJB
===
public MyPK ejbCreate(MyValueObject vlan) throws RemoteException, CreateException {
// My Code.
}
public void ejbPostCreate(BaseValueObject baseData) throws RemoteException, CreateException{
logger.debug("SourceDestPairBean: ejbPostCreate( baseData ) called.");
}
Error
=====
ERROR 12/Sep/2002 20:21:39 [main] (Logger.java:185): plugins.BMPPersistenceManager - Home Method public abstract com.MyRemote com.MyHome.create(com.MyValueObject) throws java.rmi.RemoteException,javax.ejb.CreateException not implemented in bean class class com.MtBean looking for method named: ejbCreate
What is happening here???!!! -
7. Re: Problem only with ENtity Bean!!!
muradhak Sep 12, 2002 11:48 AM (in response to muradhak)Hi Alex
EJB
===
public MyPK ejbCreate(MyValueObject vlan) throws RemoteException, CreateException {
// My Code.
}
public void ejbPostCreate(MyObject baseData) throws RemoteException, CreateException{
// My Code.
}
Error
=====
ERROR 12/Sep/2002 20:21:39 [main] (Logger.java:185): plugins.BMPPersistenceManager - Home Method public abstract com.MyRemote com.MyHome.create(com.MyValueObject) throws java.rmi.RemoteException,javax.ejb.CreateException not implemented in bean class class com.MyBean looking for method named: ejbCreate
What is happening here???!!! -
8. Re: Problem only with ENtity Bean!!!
muradhak Sep 13, 2002 1:19 AM (in response to muradhak)Hi,
Sorry for the continous thread....
When I pasted it I got the error page....
SO I had to try 3-4 times...
I never thought all would have got updated...
Regards
Muraly -
9. Re: Problem only with ENtity Bean!!!
alexb Sep 13, 2002 8:08 AM (in response to muradhak)Muraly,
Look at this example
public Integer ejbCreate(Integer id) throws CreateException
{
this.setId(id);
return null;
}
public void ejbPostCreate(Integer id)
{
}
This is in the bean class so try losing the RemoteException and keep the ejbPostCreate just like this example No createException or Remote exception can you also post your xml files i will try to look at them
hope this helps -
10. Re: Problem only with ENtity Bean!!!
muradhak Sep 16, 2002 1:01 AM (in response to muradhak)Hi Alex,
Thanks a ton...
The code snippet was really helpfulll. Problem with my bean was the argument was not of same type. ie in the bean I had the recieving argument as the parent class(e.g. Object). But I think JBoss doesn't allow this. But this works fine with JOnAs.
Anyway now the prob is solved....:)
Cheers
Muraly