Let me recapture the code as the following;
| <?xml version="1.0" encoding="UTF-8"?> | <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd"> | | <ejb-jar > | | <description><![CDATA[No Description.]]></description> | <display-name>Generated by XDoclet</display-name> | | <enterprise-beans> | | <!-- Session Beans --> | <session > | <description><![CDATA[EJB that computes Fibonacci suite]]></description> | <display-name>Fibo EJB</display-name> | | <ejb-name>Fibo</ejb-name> | | <home>tutorial.interfaces.FiboHome</home> | <remote>tutorial.interfaces.Fibo</remote> | <ejb-class>tutorial.ejb.FiboBean</ejb-class> | <session-type>Stateless</session-type> | <transaction-type>Container</transaction-type> | | </session> | | <!-- | To add session beans that you have deployment descriptor info for, add | a file to your XDoclet merge directory called session-beans.xml that contains | the <session></session> markup for those beans. | --> | | <!-- Entity Beans --> | <!-- | To add entity beans that you have deployment descriptor info for, add | a file to your XDoclet merge directory called entity-beans.xml that contains | the <entity></entity> markup for those beans. | --> | | <!-- Message Driven Beans --> | <!-- | To add message driven beans that you have deployment descriptor info for, add | a file to your XDoclet merge directory called message-driven-beans.xml that contains | the <message-driven></message-driven> markup for those beans. | --> | | </enterprise-beans> | | <!-- Relationships --> | | <!-- Assembly Descriptor --> | <assembly-descriptor > | <!-- | To add additional assembly descriptor info here, add a file to your | XDoclet merge directory called assembly-descriptor.xml that contains | the <assembly-descriptor></assembly-descriptor> markup. | --> | | <!-- finder permissions --> | | <!-- transactions --> | | <!-- finder transactions --> | </assembly-descriptor> | | </ejb-jar> | | But this code should be autogenerated by JBoss-IDE. What I wrote myself are 1. FiboBean.java | /* | * Created on 2004/4/10 | * | * To change the template for this generated file go to | * Window>Preferences>Java>Code Generation>Code and Comments | */ | package tutorial.ejb; | | import java.rmi.RemoteException; | | import javax.ejb.CreateException; | import javax.ejb.EJBException; | import javax.ejb.SessionBean; | import javax.ejb.SessionContext; | | /** | * @author cs_cwt | * | * To change the template for this generated type comment go to | * Window>Preferences>Java>Code Generation>Code and Comments | * | * @ejb.bean name = "Fibo" | * display-name = "Fibo EJB" | * description = "EJB that computes Fibonacci suite" | * view-type = "remote" | * jndi-name = "ejb/tutorial/Fibo" | */ | public class FiboBean implements SessionBean { | | /** | * | */ | public FiboBean() { | super(); | // TODO Auto-generated constructor stub | } | | /** | * @author Teki Chan | * @name ejbCreate | * | * This method is without parameter as this EJB is stateless | * | * @throws CreateException | * @ejb.create-method | */ | public void ejbCreate() | throws CreateException { | } | | /* (non-Javadoc) | * @see javax.ejb.SessionBean#ejbActivate() | */ | public void ejbActivate() throws EJBException, RemoteException { | // TODO Auto-generated method stub | | } | | /* (non-Javadoc) | * @see javax.ejb.SessionBean#ejbPassivate() | */ | public void ejbPassivate() throws EJBException, RemoteException { | // TODO Auto-generated method stub | | } | | /* (non-Javadoc) | * @see javax.ejb.SessionBean#ejbRemove() | */ | public void ejbRemove() throws EJBException, RemoteException { | // TODO Auto-generated method stub | | } | | /* (non-Javadoc) | * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext) | */ | public void setSessionContext(SessionContext arg0) | throws EJBException, RemoteException { | // TODO Auto-generated method stub | | } | | /** | * @author Teki Chan | * @name compute | * @param number | * @return double[] | * @ejb.interface-method view-type = "remote" | * | * The business method of computing a Fibonacci suite | */ | public double[] compute(int number) { | if (number < 0) { | throw new EJBException("Argument should be positive"); | } | | double[] suite = new double[number+1]; | suite[0] = 0; | if (number == 0) { | return suite; | } | | suite[1] = 1; | for(int i=2; i<=number; i++) { | suite = suite[i-1] + suite[i-2]; | } | | return suite; | } | } | | 2. application.xml | <?xml version="1.0" encoding="UTF-8"?> | <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd"> | <application> | <display-name>Sum Application</display-name> | <module> | <ejb>FiboEJB.jar</ejb> | </module> | <module> | <web> | <web-uri>FiboWeb.war</web-uri> | <context-root>/fibo</context-root> | </web> | </module> | </application> | What's wrong? Please help. -stan View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3830200#3830200 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3830200 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
