Advertisement

07.04.2005 at 11:20PM PDT, ID: 21480151
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Problem in deploying EJB to weblogic 8.1 from eclipse

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 your free trial to view this solution
Question Stats
Zone: Software
Question Asked By: imation3m
Solution Provided By: ECollin
Participating Experts: 1
Solution Grade: B
Views: 184
Translate:
Loading Advertisement...
07.06.2005 at 01:02AM PDT, ID: 14375553

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.06.2005 at 01:58AM PDT, ID: 14375848

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.06.2005 at 03:15AM PDT, ID: 14376222

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.06.2005 at 08:46PM PDT, ID: 14384495

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 12:03AM PDT, ID: 14385106

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 12:19AM PDT, ID: 14385178

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 12:30AM PDT, ID: 14385218

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 12:51AM PDT, ID: 14385307

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 01:14AM PDT, ID: 14385432

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 01:48AM PDT, ID: 14385586

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 02:09AM PDT, ID: 14385665

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 02:32AM PDT, ID: 14385753

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 02:36AM PDT, ID: 14385779

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 02:44AM PDT, ID: 14385809

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 02:45AM PDT, ID: 14385812

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 03:04AM PDT, ID: 14385870

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 03:12AM PDT, ID: 14385893

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 03:15AM PDT, ID: 14385902

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 03:17AM PDT, ID: 14385909

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
07.07.2005 at 03:21AM PDT, ID: 14385925

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29