Hi all !

I have a problem driving me crazy for some time now. OK, first I describe
the environment :

JBuilder 4, with Inprise AppServer, EJB 1.1, jdk 1.3, on Windows 2000.

OK, now here is what I am trying to do :

I have an entity bean called TestmaximeBean (with TestmaximeHome and
Testmaxime). This bean was deployed on the server and I can access it from a
application client (which was actually generated by JBuilder).

I also have a stateless session bean, called ABCSessionTestBean. I can also
deploy the bean on the server and call it from an application client. Now,
what I wish to do is have this session bean create a new TestmaximeBean.

But I have a very big problem : it just does not work. I have a lot of
problem with the naming and all... Anyways, I managed to get a little
further but it still does not work...

Here is a very small sample of code and a section of the deployment
descriptor for the session bean. (The code is from the session bean) :

        try
        {
            javax.naming.Context jndiContext = new InitialContext();
            Object obj =
jndiContext.lookup("java:comp/env/ejb/TestmaximeHome");
            TestmaximeHome home = (TestmaximeHome)
javax.rmi.PortableRemoteObject.narrow(obj, TestmaximeHome.class);
            Testmaxime max = home.create("22", "vingt deux");
            return max.getName();
        }
        catch(Exception e)
        {
            e.printStackTrace();
            return "bad news.";
        }
This is fairly simple, and should really work !

Now here is the XML :

<ejb-jar>
  <enterprise-beans>
    <session>
      <ejb-name>ABCSessionTestBean</ejb-name>
      <home>sessionabc.ABCSessionTestHome</home>
      <remote>sessionabc.ABCSessionTest</remote>
      <ejb-class>sessionabc.ABCSessionTestBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <ejb-ref>
        <ejb-ref-name>ejb/TestmaximeHome</ejb-ref-name>
        <ejb-ref-type>Entity</ejb-ref-type>
        <home>entityabc.TestmaximeHome</home>
        <remote>entityabc.Testmaxime</remote>
      </ejb-ref>
    </session>
  </enterprise-beans>
.....

As you see, the reference is in the descriptor, everything seems to be
normal...

Now when I have the XML verified, it tells me that
"You have not resolved the EJB Reference:
    ejb/TestmaximeHome
  to a JNDI name
"

Could someone help me through this, I am arrrrgggghhhhhh getting crazy !

Thank you very much !!!

Max.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to