Advertisement

07.04.2005 at 11:20PM PDT, ID: 21480151
[x]
Attachment Details

Problem in deploying EJB to weblogic 8.1 from eclipse

Asked by imation3m in BEA WebLogic Application Server, Extensible HTML (XHTML)

Tags: weblogic, ejb

hi,
i have developed an EJB as mentioned in the tutorial of eclipse EJB Development section. I have created a TraderBean and generated the rest of the classes and interface classes and deployment descriptor through XDoclet and deployed the bean through eclipse on bea weblogic, but the problem is, it doesnt deploy the bean with the JNDI name i assigned it in the deployment descriptor, bea weblogic assigns the JNDI name by itself.

I have also developed my client which calls my ejb bean but it couldnt lookup my EJB because it isnt deployed with the JNDI name i gave it.

How can i make the ejb deployed to bea with the my JNDI name?? Below i am attaching the weblogic-ejb-jar.xml and my client lookup methods.

Please reply ASAP

Thanks
Mak

**********weblogic-ejb-jar.xml**************
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN" "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd">

<weblogic-ejb-jar>
 <description><![CDATA[Generated by XDoclet]]></description>
   <weblogic-enterprise-bean>
      <ejb-name>Trader</ejb-name>
      <stateless-session-descriptor>
      </stateless-session-descriptor>
      <reference-descriptor>
      </reference-descriptor>

      <jndi-name>firstEJB</jndi-name>
   </weblogic-enterprise-bean>
<!--
To add enterprise beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called weblogic-enterprise-beans.xml that contains
the <weblogic-enterprise-bean></weblogic-enterprise-bean> markup for those beans.
-->

</weblogic-ejb-jar>
********************************************

********** lookuphome***********************
//url is "t3://localhost:7001"

private TraderHome lookupHome() throws NamingException {
        Context ctx = getInitialContext();
        try {
           
          Object home = (TraderHome) ctx.lookup("firstEJB");
          // also tried ctx.lookup("ejb/firstEJB")
        
          return (TraderHome) PortableRemoteObject.narrow(home, TraderHome.class);
          //return (TraderHome) narrow(home, TraderHome.class);
         
        } catch (NamingException ne) {
          log("The client was unable to lookup the EJBHome.  Please make sure ");
          log("that you have deployed the ejb with the JNDI name "+
            JNDI_NAME+" on the WebLogic server at "+url);
          throw ne;
        }
    }


private Context getInitialContext() throws NamingException {
        try {
            // Get an InitialContext
            Hashtable h = new Hashtable();
            h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
            h.put(Context.PROVIDER_URL, url);
            return new InitialContext(h);
          } catch (NamingException ne) {
            log("We were unable to get a connection to the WebLogic server at "+url);
            log("Please make sure that the server is running.");
            throw ne;
          }
    }
   
*******************************Start Free Trial
 
Loading Advertisement...
 
[+][-]07.06.2005 at 01:02AM PDT, ID: 14375553

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.06.2005 at 01:58AM PDT, ID: 14375848

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.06.2005 at 03:15AM PDT, ID: 14376222

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.06.2005 at 08:46PM PDT, ID: 14384495

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 12:03AM PDT, ID: 14385106

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 12:19AM PDT, ID: 14385178

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 12:30AM PDT, ID: 14385218

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 12:51AM PDT, ID: 14385307

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 01:14AM PDT, ID: 14385432

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 01:48AM PDT, ID: 14385586

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 02:09AM PDT, ID: 14385665

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 02:32AM PDT, ID: 14385753

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 02:36AM PDT, ID: 14385779

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 02:44AM PDT, ID: 14385809

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: BEA WebLogic Application Server, Extensible HTML (XHTML)
Tags: weblogic, ejb
Sign Up Now!
Solution Provided By: ECollin
Participating Experts: 1
Solution Grade: B
 
 
[+][-]07.07.2005 at 02:45AM PDT, ID: 14385812

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 03:04AM PDT, ID: 14385870

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 03:12AM PDT, ID: 14385893

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 03:15AM PDT, ID: 14385902

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.07.2005 at 03:17AM PDT, ID: 14385909

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.07.2005 at 03:21AM PDT, ID: 14385925

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32