1.*_Stub.class,和*_Skel.class是你的app server产生的,都是自动的,不用你自己来做。

解决方案 »

  1.   

    2.*_Stub.class,和*_Skel.class本来就应该放在ejb的jar包中,然后再deploy到容器里,具体放在哪,你不用管!如果是一个jsp调用ejb,只要你的ejb的jar包deploy到容器里,然后用jndi name 来调用不就行了,stub文件你也不用管啊!
      

  2.   

    2.*_Stub.class,和*_Skel.class本来就应该放在ejb的jar包中,然后再deploy到容器中,*_Stub.class,和*_Skel.class放在哪里你也不用管!如果是一个jsp调用ejb,只要ejb的jar包deploy到容器中,然后用jndi name调用ejb就行了,*_stub文件应该放在哪里你也不用管啊!
      

  3.   

    我以前解答过这样的问题,我对这里有过一点研究。但是时间有限,我这里提供一篇英文文献给你参考,对于你的文件基本上可以解决。同时j2ee提供布局工具(在你的j2ee目录下面的bin目录下面运行deploytool.bat),他基本上可以帮你完成打包程序。文献原文:
    Deployment: Behind the Scenes 
    If you're an advanced user, you may want to know what happens inside the J2EE server when you deploy an application. Here's the story:1. The server transfers the application JAR file from the deploytool process to the j2ee process.After this step, the server uses the transferred copy of the application JAR file to do its work, and the JAR file that was manipulated by the deployment tool is left unchanged.2. The j2ee process saves the application JAR file in its repository at this directory:
    install-dir/repository/hostname/applications
    3. The j2ee process opens the application JAR file, reads the deployment descriptors, and generates the home interface and EJBObject implementation for each Bean. These Java files are placed in the following directory:install-dir/repository/hostname/gnrtrTMP
    4. The j2ee process compiles the home interface and the EJBObject implementations and then runs the rmic command on the class files.
    This step creates the stubs and skeletons for the home and remote objects. The server sends the client JAR file to the deployer and saves the file with the name chosen at the start of the deployment process.5. The server packages the generated classes into a server JAR file and stores the JAR file in the repository.6. The server creates a client JAR file that contains the home and remote interfaces and the stubs for the home and remote objects.The server sends the client JAR file to the deployer and saves the file according to the name chosen at the start of the deployment process.The location of the client JAR file is added to the CLASSPATH environment variable on any client that calls the application. Then, at runtime, the appropriate stub classes can be loaded so that the client can successfully locate objects, for example, the home object for an enterprise bean in the application.If the JAR file has any Web components, the EJB server copies the components to and installs them on the Web server.7. If you started j2ee with the -singleVM option (the default), the j2ee process hosts the enterprise beans in its process and creates containers for them.If you started the j2ee process with the -multiVM option, the server starts a process which loads the server JAR file and creates containers for the enterprise beans.8. At this point, the deployment process is complete.
      

  4.   

    “*_Stub.class,和*_Skel.class本来就应该放在ejb的jar包中”
    你的意思是在用jbuilder打包成jar时产生了*_Stub.class,和*_Skel.class吗?
    而jsp调用ejb的时候,stub被自动下载到jsp的容器中?可我也看到有的做法是编译生成stub和skel,然后把stub和客户程序放在客户端,是不是这二种做法都可以?
      

  5.   

    zosatapo(隆杰@宗山太保) ,你的文章对我很有帮助,太感谢你了。
    我再仔细看一下!!谢谢!