|
From: <tri...@tr...> - 2003-08-05 16:32:45
|
All, I am extending the com.interface21.ejb.support.AbstractStatelessSessionBean class for my SLSB. I'm also trying to use XDoclet, but the home/remote interfaces that are generated insists on extending some phantom Spring interfaces and I can not figure out how to get XDoclet to extend the regular javax.ejb.EJBHome and javax.ejb.EJBObject. This is what I have: public class MyServiceBean extends com.interface21.ejb.support.AbstractStatelessSessionBean This is what I get: public interface MyServiceHome extends com.interface21.ejb.support.AbstractStatelessSessionHome public interface MyService extends com.interface21.ejb.support.AbstractStatelessSession Anybody using XDOclet together with Spring? Any ideas? Thomas |
|
From: Timo V. <sic...@gm...> - 2003-08-05 16:52:21
|
Hi!
I had the very same problem. Solved it as follows:
/*
* HelloWorldBean.java
*
* Created on 23. Juli 2003, 17:43
*/
package helloworldapp.ejb;
/**
* A simple HelloWorld SLSB.
*
* @author Timo Verhoeven
*
* @ejb.bean
* type="Stateless"
* view-type="both"
* name="HelloWorld"
* @ejb.transaction
* type="Required"
* @ejb.interface
* extends="javax.ejb.EJBObject"
* local-extends="javax.ejb.EJBLocalObject"
* @ejb.home
* extends="javax.ejb.EJBHome"
* local-extends="javax.ejb.EJBLocalHome"
*/
public class HelloWorldEJB extends
com.interface21.ejb.support.AbstractStatelessSessionBean {
/**
* @ejb.interface-method
*/
public String sayHello(String name) {
return "Hello, " + name + "!";
}
/**
* @ejb.create-method
*/
public void ejbCreate() throws javax.ejb.CreateException {
}
}
Hope it helps,
Timo
Am Dienstag, 5. August 2003 18:33 schrieb tri...@tr...:
> All,
>
> I am extending the
> com.interface21.ejb.support.AbstractStatelessSessionBean class for my
> SLSB. I'm also trying to use XDoclet, but the home/remote interfaces
> that are generated insists on extending some phantom Spring
> interfaces and I can not figure out how to get XDoclet to extend the
> regular javax.ejb.EJBHome and javax.ejb.EJBObject.
>
> This is what I have:
>
> public class MyServiceBean
> extends com.interface21.ejb.support.AbstractStatelessSessionBean
>
>
> This is what I get:
>
> public interface MyServiceHome
> extends com.interface21.ejb.support.AbstractStatelessSessionHome
>
> public interface MyService
> extends com.interface21.ejb.support.AbstractStatelessSession
>
>
> Anybody using XDOclet together with Spring? Any ideas?
>
> Thomas
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites
> including Data Reports, E-commerce, Portals, and Forums are available
> now. Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303
>_01/01 _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-develope
>r
|
|
From: <tri...@tr...> - 2003-08-05 17:14:22
|
Timo,
Brilliant. This solved my problem.
Thanks a lot.
Thomas
> Hi!
>
> I had the very same problem. Solved it as follows:
>
> /*
> * HelloWorldBean.java
> *
> * Created on 23. Juli 2003, 17:43
> */
>
> package helloworldapp.ejb;
>
> /**
> * A simple HelloWorld SLSB.
> *
> * @author Timo Verhoeven
> *
> * @ejb.bean
> * type="Stateless"
> * view-type="both"
> * name="HelloWorld"
> * @ejb.transaction
> * type="Required"
> * @ejb.interface
> * extends="javax.ejb.EJBObject"
> * local-extends="javax.ejb.EJBLocalObject"
> * @ejb.home
> * extends="javax.ejb.EJBHome"
> * local-extends="javax.ejb.EJBLocalHome"
> */
> public class HelloWorldEJB extends
> com.interface21.ejb.support.AbstractStatelessSessionBean {
>
> /**
> * @ejb.interface-method
> */
> public String sayHello(String name) {
> return "Hello, " + name + "!";
> }
>
> /**
> * @ejb.create-method
> */
> public void ejbCreate() throws javax.ejb.CreateException {
> }
>
> }
>
> Hope it helps,
>
> Timo
>
> Am Dienstag, 5. August 2003 18:33 schrieb tri...@tr...:
> > All,
> >
> > I am extending the
> > com.interface21.ejb.support.AbstractStatelessSessionBean class for my
> > SLSB. I'm also trying to use XDoclet, but the home/remote interfaces
> > that are generated insists on extending some phantom Spring
> > interfaces and I can not figure out how to get XDoclet to extend the
> > regular javax.ejb.EJBHome and javax.ejb.EJBObject.
> >
> > This is what I have:
> >
> > public class MyServiceBean
> > extends com.interface21.ejb.support.AbstractStatelessSessionBean
> >
> >
> > This is what I get:
> >
> > public interface MyServiceHome
> > extends com.interface21.ejb.support.AbstractStatelessSessionHome
> >
> > public interface MyService
> > extends com.interface21.ejb.support.AbstractStatelessSession
> >
> >
> > Anybody using XDOclet together with Spring? Any ideas?
> >
> > Thomas
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email sponsored by: Free pre-built ASP.NET sites
> > including Data Reports, E-commerce, Portals, and Forums are available
> > now. Download today and enter to win an XBOX or Visual Studio .NET.
> > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303
> >_01/01 _______________________________________________
> > Springframework-developer mailing list
> > Spr...@li...
> > https://lists.sourceforge.net/lists/listinfo/springframework-develope
> >r
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
|
|
From: <tri...@tr...> - 2003-08-05 21:08:21
|
All, Now for the next question - where do you put the ejb-context.xml file on WebLogic 8.1? I have tried at the root of my EJB class directory and I have also tried APP-INF/classes. No luck so far. I am deploying in an exploded directory structure with an enterprise app directory that includes a directory for my EJB. I keep getting this error: javax.ejb.CreateException: Cannot load bean factory path 'my-service-context.xml' This file exists as C:\bea\user_projects\domains\mydomain\applications\MyApp\MyEJB\my-service-context.xml as well as C:\bea\user_projects\domains\mydomain\applications\MyApp\APP-INF\classes\my-service-context.xml Any ideas? Thomas |
|
From: <tri...@tr...> - 2003-08-05 22:37:40
|
It just dawned on me that I should probably specify the name as '/my-service-context.xml' - not the first time I've made this mistake, and probably not the last :-) Thomas > All, > > Now for the next question - where do you put the ejb-context.xml file on > WebLogic 8.1? > > I have tried at the root of my EJB class directory and I have also tried > APP-INF/classes. No luck so far. > > I am deploying in an exploded directory structure with an enterprise app > directory that includes a directory for my EJB. > > I keep getting this error: > > javax.ejb.CreateException: Cannot load bean factory path > 'my-service-context.xml' > > This file exists as > C:\bea\user_projects\domains\mydomain\applications\MyApp\MyEJB\my-service-context.xml > > as well as > > C:\bea\user_projects\domains\mydomain\applications\MyApp\APP-INF\classes\my-service-context.xml > > Any ideas? > > > Thomas > |