1 Reply Latest reply on Sep 26, 2003 6:49 AM by submarin

    Web Services usign EJB2.1

    damiano.altomare

      At the momnet, Can I deploy a web service (stateless session bean) using JBoss?

        • 1. Re: Web Services usign EJB2.1
          submarin

          i arrived to produce a web service(following the examples) from a stateless session bean . Bean may be the spec 1.x the code is below :

          regards
          submarin@gsu.linux.org.tr

          --- cut here ---

          package net.glassPrison.ejb;

          import javax.ejb.CreateException;
          import javax.ejb.SessionBean;
          import javax.ejb.SessionContext;

          import org.apache.log4j.Category;


          /**
          * @ejb:bean name="glassPrison"
          * jndi-name="glassPrison"
          * type="Stateless"
          * view-type="local"
          * @ejb:ejb-ref ejb-name="glassPrison"
          * view-type="local"
          * ref-name="glassPrison"
          * @ejb:transaction type="Required"
          * @ejb:transaction-type type="Container"
          *
          * @jboss-net:web-service urn="glassPrison"
          * expose-all="true"
          * @author SubmariN
          * @version $Revision: 1.2 $
          */
          public class glassPrisonBean implements SessionBean
          {
          protected transient Category log = Category.getInstance( getClass() );


          /**
          * @ejb:interface-method view-type="local"
          */
          public String zerogunner( String name )
          {
          return "zerogunner " + name;
          }

          /**
          * @ejb:interface-method view-type="local"
          */
          public String cleric( String name )
          {
          return "cleric " + name;
          }

          public void ejbCreate() throws CreateException {}

          public void setSessionContext( SessionContext sessionContext ) {}

          public void ejbActivate() {}

          public void ejbPassivate() {}

          public void ejbRemove() {}

          } // of class HelloBean