Hi I'm reposting this issue again as nobody has reflected on this issue raised earlier.
I'm trying to use Sateful bean with DAO .
Issue is that when i genarate the bean using Xdoclet tags then the attribute in bean
is not generated in the generated bean class which extends the abstract bean class.
And this attribute is passed through ejbCreate(String xxxx), and this attribute is
beans attribute and its value come from after invoking the business method using DAO.
/**
* @ejb.bean name="MyState"
* jndi-name="MyStateBean"
* type="Stateful"
*
* @ejb.transaction type="Required"
*
* @ejb.dao class="MyStateDAO"
* impl-class="MyDAOImpl"
*
* @ejb.resource-ref res-ref-name="jdbc/DefaultDS"
* res-type="javax.sql.Datasource"
* res-auth="Container"
*
* @jboss.resource-ref res-ref-name="jdbc/DefaultDS"
* jndi-name="java:/DefaultDS"
*
**/
public abstract class MyStateBean implements SessionBean {
protected String userID;
protected SessionContext ctx;
/**
* Sets the session context
* @param javax.ejb.SessionContext the new ctx value
*
**/
public void setSessionContext(javax.ejb.SessionContext ctx) {
this.ctx = ctx ;
}
/**
* Unsets the session context
*
*
**/
public void unsetSessionContext() {
this.ctx = null;
}
/**
* The ejbCreate method.
* @ejb.create-method
*
**/
public void ejbCreate (String userID ) throws javax.ejb.CreateException {
this.userID = userID;
}
/**
* @ejb.interface-method
* view-type="remote"
*
* @ejb.transaction type="Required"
* @dao.call name="login"
**/
public String login(String username, String password ) {
return userID;
}
public void ejbActivate() {
}
public void ejbPassivate() {
}
/**
* @ejb.interface-method
* view-type="remote"
* @return String userID
*/
public String getUserID() {
return userID;
}
}
I haven't been able to generate the userID in the generated class and its accesmor
method, also DAO's login method should fill the userID atribute..
Any clues what i'm wrong doing here.
Vishal.
.
---
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from us may be monitored.
Internet communications cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. Therefore, we do not accept
responsibility for any errors or omissions that are present in this
message, or any attachment, that have arisen as a result of e-mail
transmission. If verification is required, please request a hard-copy
version. Any views or opinions presented are solely those of the author
and do not necessarily represent those of the company.
TUSC Computer Systems, ABN 44 005 815 752
N¬HY޵隊X¬²š'²ŠÞu¼’w+Þm§$>º
©’¢êÜxZ+?éÞ¶,¶Ê/z¾ôÓM¥éÒ¢êÜxúè?ç-±'ž¶©zŠe{h…«ÞBÏ5¦º/‰×›zÛ^®Ç«¾'°)brH^èm¶Ÿÿ²‹«qçè®§zß캚h®×«²˜iÅÚ•ën±êæj)bž
b²Ü]¡É^¶ë®X¬¶Ë(º·~Šàzw†Ûi³ÿåŠËl²‹«qçè®§zßåŠËlþX¬¶)ߣü]¡É^¶ë