code: public JavaResource newEJB(DirectoryResource target,
              final String ejbName,
              final String ejbPackage,
              final EJBType ejbType,
              final boolean serializable)
     {
        JavaClassSource javaClass = createJavaClass(ejbName, ejbPackage, ejbType, serializable);
        JavaResource javaResource = getJavaResource(target, javaClass.getName());
        javaResource.setContents(javaClass);
        return javaResource;
     }
docs: Creates a new {@link JavaResource} in the specified target. If a project is available, use
  {@link EJBOperations#newEntity(Project, String, String, GenerationType)}
  
  @param target the target directory resource to create this class
  @param ejbName the name of the class
  @param ejbPackage the package of the class to be created
  @param ejbType the ID strategy chosen for this class
  @param serializable whether or not the EJB should be serializable
  @param destType JMS destination type
  @return the created java resource
  @throws FileNotFoundException if something wrong happens while saving the {@link JavaClass}