I passed the remote home interface, TestHome here.
Here is the code

RemoteHome Code

  | package TestBean1;
  | 
  | import javax.ejb.*;
  | import java.rmi.*;
  | 
  | public interface TestHome extends EJBHome
  | {
  |     public TestBean1.Test create() throws RemoteException,CreateException;
  | 
  | }
  | 

Remote Interface Code


  | package TestBean1;
  | 
  | import javax.ejb.*;
  | import java.rmi.*;
  | 
  | public interface Test extends EJBObject
  | {
  |     public String getValue()throws RemoteException;
  |      
  | }
  | 

EJB Bean Class

  | package TestBean1;
  | 
  | import javax.ejb.*;
  | import javax.sql.*;
  | import javax.naming.*;
  | import javax.rmi.PortableRemoteObject;
  | import java.sql.*;
  | public class TestEJB implements SessionBean
  | {
  |     public void ejbCreate()throws CreateException {
  | 
  |     }
  | 
  |     public String getValue(){
  |                     System.out.println("################## INSIDE 
#######################");
  | 
  |                     return "TEST BEAN123 from testEJB";
  |     }
  | 
  |     public void ejbRemove()throws EJBException{}
  |     public void ejbActivate()throws EJBException{}
  |     public void ejbPassivate()throws EJBException{}
  |     public void setSessionContext(SessionContext sc)throws EJBException{}
  | }
  | 

Here is the ejb-jar.xml
<?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>
         Test Bean Jar 
        <display-name>Test jar </display-name>
        <enterprise-beans>
                
                <display-name>TestEJB</display-name>
                <ejb-name>TestEJB</ejb-name>
                TestBean1.TestHome
                TestBean1.Test
                <ejb-class>TestBean1.TestEJB</ejb-class>
                <session-type>Stateless</session-type>
                <transaction-type>Container</transaction-type>
                 
                
                
                <assembly-descriptor>
                
                </assembly-descriptor>

        </enterprise-beans>
</ejb-jar> 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975707#3975707

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975707
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to