g'day dim,
thanks mate - the <session/> fixed it up.
(note that the table of contents frame in
the docs doesn't have a link to the session
subtask)
however all my session beans are now getting verifier
warnings like those below and these were ok before
the upgrade...
[Verifier]
Bean : ProductControllerEJB
Section: 6.5.5
Warning: Session bean does not define the required ejbCreate method.
[Verifier]
Bean : ProductControllerEJB
Section: 6.10.2
Warning: Session bean class must not be abstract.
[Verifier]
Bean : ProductControllerEJB
Section: 6.10.2
Warning: Session bean class must have a public constructor that takes no
parameters.
[Verifier]
Bean : ProductControllerEJB
Method : public abstract ProductControllerEJB create() throws
CreateException, RemoteException
Section: 6.10.6
Warning: Each create(...) method in the session bean's home interface must
have a matching ejbCreate(...) method in the session bean's class.
here is ProductController....
package au.com.ucw.cop.ejb;
import au.com.ucw.cop.interfaces.ProductEJBLocal;
import au.com.ucw.cop.interfaces.ProductEJBUtil;
import au.com.ucw.cop.model.ProductModel;
import au.com.ucw.cop.util.Debug;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.rmi.RemoteException;
import java.security.Principal;
/**
* This is a product controller bean.
*
* @ejb:bean
* name="ProductControllerEJB"
* type="Stateless"
* jndi-name="ejb/ProductControllerHome"
* view-type="remote"
*
* @ejb:transaction-type
* type="Container"
*
* @ejb:transaction
* type="NotSupported"
*
* @ejb:ejb-ref
* ejb-name="ProductEJB"
* view-type="local"
* ref-name="ProductEJBLocal"
*
* @ejb:resource-ref
* res-name="jdbc/SculptorDS"
* res-type="javax.sql.DataSource"
* res-auth="Container"
*/
public abstract class ProductControllerBean implements SessionBean
{
private SessionContext sessionContext;
/**
* Get the product data for the specified product
*
* @ejb:interface-method
*/
public ProductModel get(String theSku) throws RemoteException
{
Debug.println("ProductControllerBean.get");
// Principal p = sessionContext.getCallerPrincipal();
// System.out.println("caller is " + p);
try {
ProductEJBLocal product =
ProductEJBUtil.getLocalHome().findByPrimaryKey(theSku);
//return new ProductModel(product.getData());
return new ProductModel(
product.getSku(),
product.getCatalogNumber(),
product.getName(),
product.getColour(),
product.getSize(),
product.getPrice(),
product.getLocation(),
product.getHeld());
} catch (Exception ex) {
throw new RemoteException("Error getting product[" + theSku +
"]", ex);
}
}
public void setSessionContext(SessionContext theSessionContext)
{
this.sessionContext = theSessionContext;
}
}
On Fri, 14 Dec 2001 22:36, Dmitri Colebatch wrote:
> Have you got the <session /> subtask included? recently the session
> subtask became optional, so if you dont have it explicitly in your
> build.xml they wont be generated.
>
> hth
> dim
>
> On Fri, 14 Dec 2001, Ara Abrahamian wrote:
> > What do you mean by "My session beans are not getting created"? You mean
> > the subclasses blablaSession class? AFAICS the samples are ok.
> >
> > Ara.
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:xdoclet-user-
> > > [EMAIL PROTECTED]] On Behalf Of Colin Daly
> > > Sent: Friday, December 14, 2001 5:41 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [Xdoclet-user] session beans not getting created
> > >
> > >
> > > Hi guys,
> > >
> > > i just got the latest from CVS and did a build.
> > > My session beans are not getting created -
> > > the entities are but not the sessions - this was
> > > working with my previous version which was
> > > a few weeks old. I'll start tracking this down
> > > but was hoping someone might have experienced
> > > this already.
> > >
> > > Colin.
> > >
> > > _______________________________________________
> > > Xdoclet-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > _______________________________________________
> > Xdoclet-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user