Overloading Constructors with XDoclet 1.2?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   allan_tan
Posted On:   Monday, February 10, 2003 02:46 PM

hi, I am currently having problems trying to get XDoclet to generate my home file properly. i.e. i have a Bean with the following code: public class ESTBean implements SessionBean { /** * Default Constructor for EST * * @param name EST Name. * @param database Name of the Database. * @ejb:home-method */ public void ejbCreate(String n, String d){ this.name = name; this.database = database; }//end ejbCreate . . . I can get this to compile but cannot access it in my main mehtod properly. Do i need to include the original create() method as well? Do i keep   More>>

hi,

I am currently having problems trying to get XDoclet to

generate my home file properly.


i.e. i have a Bean with the following code:


			
public class ESTBean implements SessionBean
{
/**
* Default Constructor for EST
*
* @param name EST Name.
* @param database Name of the Database.
* @ejb:home-method
*/
public void ejbCreate(String n, String d){
this.name = name;
this.database = database;
}//end ejbCreate
.
.
.


I can get this to compile but cannot access it in my main mehtod properly. Do i need to include the original create() method as well? Do i keep both? Now with an ordinary create() method with no parameters i could do something like:


			
EST myEST = home.create();


But now i try to supply strings such as :

			
EST myEST = home.create("name","database");



now the program doesn't allow me to this, saying that home.create(java.lang.String, java.lang.String) doesn't have a return value as it is void. I've tried several things to no avail.



Anybody with some tips regarding overloading constructors? I'm using EJBSpec2.0 and Xdoclet1.2.



Thanks in advance,

allan    <<Less
About | Sitemap | Contact