Hi mario202,

Yes I tried with Jboss.xml too. Still the problem is same. Here what I am doing.

Microsoft Windows XP [Version 5.1.2600]
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.


C:\>javac -classpath C:\jboss-4.0.1\server\default\lib\jboss-j2ee.jar 
Simple.java

C:\>javac -classpath C:\jboss-4.0.1\server\default\lib\jboss-j2ee.jar;. 
SimpleHome.java

C:\>javac -classpath C:\jboss-4.0.1\server\default\lib\jboss-j2ee.jar;. 
SimpleBean.java

C:\>jar cfv Simple.jar \META-INF\

C:\>jar cfv Simple.jar Simple.class SimpleHome.class SimpleBean.class 
C:\META-INF\
added manifest
adding: Simple.class(in = 217) (out= 171)(deflated 21%)
adding: SimpleHome.class(in = 242) (out= 177)(deflated 26%)
adding: SimpleBean.class(in = 1096) (out= 566)(deflated 48%)
adding: C:/META-INF/(in = 0) (out= 0)(stored 0%)
adding: C:/META-INF/ejb-jar.xml(in = 489) (out= 226)(deflated 53%)

C:\>jar tf simple.jar
META-INF/
META-INF/MANIFEST.MF
Simple.class
SimpleHome.class
SimpleBean.class
C:/META-INF/
C:/META-INF/ejb-jar.xml

After compiling and Jaring The directory and files looks like this

C:\>dir Simple*.*
 Volume in drive C has no label.
 Volume Serial Number is 148B-EBDE

 Directory of C:\

01/28/2005  04:53 AM               217 Simple.class
01/28/2005  04:56 AM             2,087 Simple.jar
01/27/2005  11:25 PM               144 Simple.java
01/28/2005  04:53 AM             1,096 SimpleBean.class
01/27/2005  11:25 PM               848 SimpleBean.java
01/28/2005  04:53 AM               242 SimpleHome.class
01/27/2005  11:25 PM               221 SimpleHome.java
               7 File(s)          4,855 bytes
               0 Dir(s)  13,099,388,928 bytes free

C:\>cd meta-inf

C:\META-INF>dir /p
 Volume in drive C has no label.
 Volume Serial Number is 148B-EBDE

 Directory of C:\META-INF

01/27/2005  11:27 PM              .
01/27/2005  11:27 PM              ..
01/27/2005  11:27 PM               489 ejb-jar.xml
01/28/2005  10:02 AM               291 jboss.xml
               2 File(s)            780 bytes
               2 Dir(s)  13,095,940,096 bytes free

C:\META-INF>


Souce Code Listings

Simple.java looks like this

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import java.rmi.*;
import javax.ejb.*;

public interface Simple extends EJBObject {
        public String getMessage() throws RemoteException;
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




SimpleBean.java looks like this

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import java.rmi.*;
import javax.ejb.*;

public class SimpleBean implements SessionBean {
        private SessionContext context;
        private int SaidCount = 0;
        // This is the business method.
        public String getMessage() throws RemoteException {
                String thisMessage = ++SaidCount + ": EJB SimpleBean - Yahoo!";
            return thisMessage;
        }
        // These are the callback methods, which come from the
        // SessionBean interface.
        public void ejbCreate()  throws RemoteException, CreateException {
        }
        public void ejbRemove()  throws RemoteException {
        }
        public void ejbActivate()  throws RemoteException {
        }
        public void ejbPassivate()  throws RemoteException {
        }

        // Set the context variable
        public void setSessionContext(SessionContext context) throws 
RemoteException {
                this.context = context;
        }
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



SimpleHome.java code looks like this

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import java.rmi.*;
import javax.ejb.*;

public interface SimpleHome extends EJBHome {
        //       create returns Simple, which is the remote interface.
        public Simple create() throws RemoteException, CreateException;

}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




ejb-jar.xml looks like this

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<?xml version="1.0" encoding="UTF-8"?>

<ejb-jar>
    MPs First EJB
    <display-name>SimpleEJB</display-name>
    <enterprise-beans>
      
        <ejb-name>Simple</ejb-name>
        SimpleHome
        Simple
        <ejb-class>SimpleBean</ejb-class>
        <session-type>Stateless</session-type>
        <transaction-type>Container</transaction-type>
      
    </enterprise-beans>
</ejb-jar>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



jboss.xml looks like this

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN"
        "http://www.jboss.org/j2ee/dtd/jboss.dtd";>

        <enterprise-beans>
                
                        <ejb-name>Simple</ejb-name>
                        <jndi-name>Simple</jndi-name>
                
        </enterprise-beans>


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3864273


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to