title: shared ejb 3 for multiple web project with glassfish
body: <p>I currently have a J2EE project containing an EJB and a WAR. Everything goes fine while I have only one WAR and one EJB module bundled in the final EAR. I now need to develop an other WAR using the same EJB module.</p>
  
  <p>So, I added the EJB module in the library of the new WAR. The problem is when I try to deploy the EAR bundled with the two WAR and the shared EJB, I get the following exception :</p>
  
  <p><code>Caused by: java.lang.RuntimeException: Error while binding JNDI name com.alex.ejb.MyBeanRemote__3_x_Internal_RemoteBusinessHome__ for EJB : MyBean</code></p>
  
  <p>As I remove the EJB from the library of the second WAR, everything work again.</p>
  
  <p>Is there something I missed ?</p>
  
  <p>Finally, the real question is "how to share an EJB within multiple web applications ?"</p>
  
  <p>Thanks for help</p>