Why do we need weblogic.ejbc even if compiled with javac


EJB programming & troubleshooting: Why do we need weblogic.ejbc even if compiled with javac

  1. I have complied all the ejbs with javac and copied the folder to applications directory and when i started the console i found ejb is deployed under ejb directory.Now i don't understand for what purpose should i use weblogic.ejbc as from the documentation i found that weblogic.ejbc is required to compile the container classes.
    When my ejb is deployed then what does it mean by compliing container classes.Do i always need to compile all the classes again by executing weblogic.ejbc.Is it necessary for every ejb to be deployed on server.what exactly does it do and when to use it.Is there any alternative of generating container classes.Is it also be used for session beans and bmps.
    Can anybody explain me about weblogic.ejbc and where so i find this weblogic.ejbc as it is giving class not found error
    Thanks in advance.

  2. Hi,
       After compiling your for java source files using "javac"
    you need to put yr class files and deployment descriptor in a jar file, which now contains a valid bean. Here you need to use the weblogic.ejbc to compile and deploy yr Jar file into the container. This weblogic.ejbc checks your jar file
    for valid class files, your deployment descriptor and notifies in case of error or deploys it if everything is OK.
    Your javac is just to compile yr java source files.Got it???
  3. Thanks for ur information.
    i'm getting an error while running ejbc.
    >java weblogic.ejbc testEjb.jar applications/Ejb/TestEjb.jar
    error: meta-inf/ejb-jar.xml not found
    I had the three ejb classes(remote,home,implementation) and ejb-jar.xml nad weblogic-ejb-jar.xml in my jar file.
    Can u tell me then why is it giving an error that ejb-jar.xml not found.

  4. This one should be easy. If you are doing this under NT, then NT is not case sensitive with files (not properly any way). JAR is. Make sure it's in the JAR file as META-INF and not some other upper / lower case version.

    Also, ejbc doesn't deploy the bean, it checks it, and generates all the vendors supporting classes the bean needs.


  5. Thanks for the showing light on weblogic.ejbc.I got it and was able to run it sucessfully.