Lookup for local interfaces.

Isn't lookup for local interfaces allowed from web client. I have defined a
ejb-reference for the bean in my web.xml. When I do a lookup as
TestBeanLocalHome home = (TestBeanLocalHome)
ic.lookup("java:comp/env/ejb/TestBeanLocal");
This statement result in an error
javax.naming.NameNotFoundException: Unable to resolve
comp/env/ejb/TestSLSBeanLocal/ Resolved: 'comp/env/ejb'
Unresolved:'TestBeanLocal' ; remaining name ''
at
weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingN
ode.java:887)
at
weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:219)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:183)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:339)
at
weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWr
apper.java:36)
at
weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:124
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at jsp_servlet.__client._jspService(__client.java:108)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2495)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
The same thing works when lookup is done for remote interface.
Regards,
Rupesh.

You need to use "ejb-local-ref" to refer to local interfaces. I meant
"ejb-local-ref" element was not available in web.xml in Servlet 2.2. They
were added in Servlet 2.3 specification. So unless your app server is
Servlet 2.3 compliant it does not need to support references to local
interfaces in web components (servlets or jsps). Weblogic 6.1 did not seem
to support them last time I tried.
-- Anand
"Rupesh" <[email protected]> wrote in message
news:[email protected]...
what do u mean by local interface in web component? its ejb's local
interfaces and lookups are any way being
done using ejb-ref and ref mapping are given in weblogic.xml.
Where does Servlet spec come into the picture?
Do you mean to say that you can not lookup for local home from a jsp in
WL6.1?
Regards,
Rupesh.
Anand Byrappagari <[email protected]> wrote in message
news:[email protected]...
Are you using Weblogic 6.1? Then local interfaces in web components arenot
supported. Local interfaces were added only in Servlet 2.3 I think.Weblogic
6.1 is not completely compliant with Servlet 2.3.
-- Anand
"Rupesh" <[email protected]> wrote in message
news:[email protected]...
Isn't lookup for local interfaces allowed from web client. I have
defined
a
ejb-reference for the bean in my web.xml. When I do a lookup as
TestBeanLocalHome home = (TestBeanLocalHome)
ic.lookup("java:comp/env/ejb/TestBeanLocal");
This statement result in an error
javax.naming.NameNotFoundException: Unable to resolve
comp/env/ejb/TestSLSBeanLocal/ Resolved: 'comp/env/ejb'
Unresolved:'TestBeanLocal' ; remaining name ''
at
weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingN
ode.java:887)
at
weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:219)
atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:183)
atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
atweblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:339)
at
weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWr
apper.java:36)
at
weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:124
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at jsp_servlet.__client._jspService(__client.java:108)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2495)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
The same thing works when lookup is done for remote interface.
Regards,
Rupesh.

Similar Messages

  • Lookup for local home interface

    Hi!
    I am using the j2eesdk and there is a thing I cannot find anywhere:
    When I use a local interface for a bean and define an EJB Ref on that bean in the 'deploytool', I cannot specify a JNDI name (only a bean name). Therefore I cannot map the coded name in my Context-lookup() call in the code to any JNDI name on the applications 'JNDI Names' tab.
    My question is:
    - how do I lookup local home interfaces?
    - if this is done via JNDI, how do I do this in the deploytool?
    Kind Regards
    Ralf

    Hi
    The point u all should understand is you use a jndi name in your programs
    say
    public static void main(String[] args)
    InitalContext ctx = new IntialContext();
    ctx=(Context)ctx.lookup("java:comp/env");
    DemoLocalHome home = ctx.lookup("ejb/DemoBean");
    in the above program you use "ejb/DemoBean" as a reference name, but actually there won't be a Bean registered with that name. so, when u deploy the appclient u should map the reference name with the actual JNDI name ( if it's a remote interface) or with the class name (Local interface)
    so, when u deploy the appclient in the "ejb ref " tab, u specify that it uses Local interfaces and in the end u don't map the refernce name to a JNDI name( because it's a local interface) and rather u speciy the class name.
    that's how u map the references for Remote and Local home interfaces.....
    thank's for listening to that......
    for more suggestions mail me at [email protected]

  • Naming Exception: Name not found for local interface in 8.1

    Hi,
    I am trying to use local interfaces for my ejbs to call from my web application
    as both are running on the same server. I am migrating from 6.1 to 8.1 and with
    6.1, I was using the remote interfaces. Now, I am planning to use local interfaces
    from my web application, which is deployed as part of an EAR which has my ejbs
    also.
    Here is my ejb-jar.xml:
    <session>
         <ejb-name>TestService</ejb-name>
         <local-home>com.test.ejb.home.PrefsServiceHome</local-home>
         <local>com.test.ejb.TestService</local>
         <ejb-class>com.test.ejb.impl.PrefsServiceBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Bean</transaction-type>
         <resource-ref>
         <res-ref-name>jdbc/DataSource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
         </resource-ref>
    </session>
    and my weblogic.xml looks like:
    <weblogic-enterprise-bean>
    <ejb-name>TestService</ejb-name>
    <stateless-session-descriptor>
    <pool>
         <max-beans-in-free-pool>20</max-beans-in-free-pool>
         <initial-beans-in-free-pool>20</initial-beans-in-free-pool>
    </pool>
    </stateless-session-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/DataSource</res-ref-name>
    <jndi-name>jdbc.DataSource</jndi-name>
    </resource-description>
    </reference-descriptor>
    <jndi-name>ejb.PrefsService</jndi-name>
    </weblogic-enterprise-bean>
    I used the following code to get home interface:
    InitialContext initCtx = new InitialContext();
    Object objRef=null;
    objRef=initCtx.lookup("java:comp/env/ejb/TestService");
    return (EJBLocalHome)(objRef);
    I tried several combination for lookup.. but none of them worked. When i tried
    testing this particular ejb from administration console, I got "The EJB TestService
    has not been tested succesfully" message.
    lookup names I used:
    java:comp/env/ejb/TestService:not found
    java:comp/env/ejb/TestServiceHome:not found
    java:comp/env/ejb/ejb.TestServiceHome:not found
    java:comp/env/ejb/ejb.TestService:not found
    java:comp/env/ejb.TestServiceHome:not found
    java:comp/env/ejb.TestService:not found
    java:comp/env/TestServiceHome:not found
    java:comp/env/TestService:not found
    ejb.TestService:not found
    TestService:not found
    Please let me know... where I am going wrong..
    Thanks
    Raj

    There's 2 ways to lookup local EJBs
    1) Specify an ejb-link in your ejb-jar.xml. Specify an ejb-link in your
    web.xml and lookup java:/comp/env/<link-name>
    2) Specify a <local-jndi-name> in your weblogic-ejb-jar.xml and lookup
    that name.
    -- Rob
    Raj wrote:
    Hi,
    I am trying to use local interfaces for my ejbs to call from my web application
    as both are running on the same server. I am migrating from 6.1 to 8.1 and with
    6.1, I was using the remote interfaces. Now, I am planning to use local interfaces
    from my web application, which is deployed as part of an EAR which has my ejbs
    also.
    Here is my ejb-jar.xml:
    <session>
         <ejb-name>TestService</ejb-name>
         <local-home>com.test.ejb.home.PrefsServiceHome</local-home>
         <local>com.test.ejb.TestService</local>
         <ejb-class>com.test.ejb.impl.PrefsServiceBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Bean</transaction-type>
         <resource-ref>
         <res-ref-name>jdbc/DataSource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
         </resource-ref>
    </session>
    and my weblogic.xml looks like:
    <weblogic-enterprise-bean>
    <ejb-name>TestService</ejb-name>
    <stateless-session-descriptor>
    <pool>
         <max-beans-in-free-pool>20</max-beans-in-free-pool>
         <initial-beans-in-free-pool>20</initial-beans-in-free-pool>
    </pool>
    </stateless-session-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/DataSource</res-ref-name>
    <jndi-name>jdbc.DataSource</jndi-name>
    </resource-description>
    </reference-descriptor>
    <jndi-name>ejb.PrefsService</jndi-name>
    </weblogic-enterprise-bean>
    I used the following code to get home interface:
    InitialContext initCtx = new InitialContext();
    Object objRef=null;
    objRef=initCtx.lookup("java:comp/env/ejb/TestService");
    return (EJBLocalHome)(objRef);
    I tried several combination for lookup.. but none of them worked. When i tried
    testing this particular ejb from administration console, I got "The EJB TestService
    has not been tested succesfully" message.
    lookup names I used:
    java:comp/env/ejb/TestService:not found
    java:comp/env/ejb/TestServiceHome:not found
    java:comp/env/ejb/ejb.TestServiceHome:not found
    java:comp/env/ejb/ejb.TestService:not found
    java:comp/env/ejb.TestServiceHome:not found
    java:comp/env/ejb.TestService:not found
    java:comp/env/TestServiceHome:not found
    java:comp/env/TestService:not found
    ejb.TestService:not found
    TestService:not found
    Please let me know... where I am going wrong..
    Thanks
    Raj

  • GWIA doing DNS lookup for local address

    Hello,
    I am running GW8.0.2 on Netware 6.5sp8. I have a server that our recreation department uses to send out confirmation emails when a customer signs up for a class. The recreation server and the GWIA are on the same subnet.
    Here's the problem: When the Rec server sends out the first email confirmation, it gets sent out successfully. Subsequent emails after that fail. After about twenty minutes the next email will go out OK again but subsequent emails will fail.
    The verbose logs on the GWIA don't tell me much but the diagnostic logs show what looks like a reverse DNS lookup happening at the GWIA for my local IP address of 10.0.0.3 (the Rec server). This reverse DNS lookup fails (probably a timeout) and subsequent emails from this local Rec server get dropped by the GWIA without the DNS lookup.
    DNS is being done by DNS proxy on Bordermanager 9.2. I've bypassed the Bordermanager DNS and the same thing happens. I've made entries for the local Rec server into a route.cfg file but the GWIA seems to want to ignore these entries and keeps doing the DNS lookup.
    The wierdest part of the puzzle is that if I restart the proxy on the Bordermanager the next email will go out with, of course, subsequent emails failing. I've looked at the proxy dns cache and can't even find an entry for my Rec server.
    Attached are the entries from the Diagnostic logs of the GWIA. Novell tech support has assured me that the GWIA and the BM are working fine. I am also having this problem with a scanner that scans then emails but all other email and Bordermanager are functioning fine. This server and scanner were not having this problem before upgrading to GW8.0.2.
    I don't understand why GWIA is doing DNS lookups for a local address and I don't know what I can do to stop it. Any help would be greatly appreciated.
    This is a successful transfer right after restarting the proxy: 10.0.0.3 is the Rec server, 10.0.0.130 is the GWIA and 10.0.0.1 is the Bordermanager.
    16:04:13 D15 NgwResQuery(3.0.0.10.in-addr.arpa, 1, 12)
    16:04:13 D15 Querying server (# 1) address = 10.0.0.1
    16:04:13 D15 HEADER:
    16:04:13 D15 opcode = QUERY, id = 17615, rcode = SERVFAIL, flags: qr aa rd
    16:04:13 D15 query = 1, answer = 0, authority = 0, additional = 0
    16:04:13 D15
    16:04:13 D15 QUESTIONS:
    16:04:13 D15 3.0.0.10.in-addr.arpa, type = PTR, class = IN
    16:04:13 D15
    16:04:13 D15 rcode = 2, ancount=0
    16:04:13 D15 NgwResQuery failed
    16:04:13 D15 DMN: MSG 2000909 Accepted connection: [10.0.0.3] ()
    16:04:13 D15 Successful login with client/server access: 10.0.0.130:1677
    16:04:13 D15 DMN: MSG 2000909 Receiving file: ECMAIL/SYS:\PROGRAMS\GRPWISE\WPGATE\GWIA\3RD\receive\df30 fad4.221
    16:04:13 D15 DMN: MSG 2000909 SMTP session ended: [10.0.0.3] ()
    This is an unsuccessful transfer:
    16:06:08 D04 timeout
    16:06:08 D04 NgwResQuery: send error
    16:06:08 D04 NgwResQuery failed
    16:06:08 D04 DMN: MSG 2000933 Accepted connection: [10.0.0.3] ()
    16:06:08 D04 DMN: MSG 2000933 SMTP session ended: [10.0.0.3] ()
    Then the successful email comes back into the system:
    16:06:26 AA8 MSG 2000909 Processing inbound message: ECMAIL/SYS:\PROGRAMS\GRPWISE\WPGATE\GWIA\receive\DF30FAD4 .221
    16:06:26 AA8 MSG 2000909 Sender: [email protected]
    16:06:26 AA8 MSG 2000909 Recipient: [email protected]
    16:06:26 AA8 MSG 2000909 Queuing to MTA
    16:06:26 AA8 MSG 2000909 File: ECMAIL/SYS:\PROGRAMS\GRPWISE\WPGATE\GWIA\wpcsin\4\4daf048 2.8m1 Message Id: (4DAF66F2.B67:244:35687) Size: 163.3 Kb

    Thanks Massimo. I could have swore I already did that but when I did it again just to make sure it solved the problem. Appreciate the help. Have a good one.
    Originally Posted by mrosen
    On 02.05.2011 21:06, avanrav wrote:
    >
    > Hello,
    >
    > I am running GW8.0.2 on Netware 6.5sp8. I have a server that our
    > recreation department uses to send out confirmation emails when a
    > customer signs up for a class. The recreation server and the GWIA are on
    > the same subnet.
    >
    > Here's the problem: When the Rec server sends out the first email
    > confirmation, it gets sent out successfully. Subsequent emails after
    > that fail. After about twenty minutes the next email will go out OK
    > again but subsequent emails will fail.
    >
    > The verbose logs on the GWIA don't tell me much but the diagnostic logs
    > show what looks like a reverse DNS lookup happening at the GWIA for my
    > local IP address of 10.0.0.3 (the Rec server). This reverse DNS lookup
    > fails (probably a timeout) and subsequent emails from this local Rec
    > server get dropped by the GWIA without the DNS lookup.
    >
    > DNS is being done by DNS proxy on Bordermanager 9.2. I've bypassed the
    > Bordermanager DNS and the same thing happens. I've made entries for the
    > local Rec server into a route.cfg file but the GWIA seems to want to
    > ignore these entries and keeps doing the DNS lookup.
    >
    > The wierdest part of the puzzle is that if I restart the proxy on the
    > Bordermanager the next email will go out with, of course, subsequent
    > emails failing. I've looked at the proxy dns cache and can't even find
    > an entry for my Rec server.
    The reverse DNS done by GWIA is normal, and can't be stopped or tricked.
    That it fails in such odd ways must be a bug with the reverse DNS proxy
    of Bordermanager though. Apparently on the second lookups, it doesn't
    answer in a timely manner (the type of answer is irrelevant, just it
    *has* to answer). Use a different, "real" DNS server for your GWIA.
    CU,
    Massimo Rosen
    Novell Product Support Forum Sysop
    No emails please!
    Untitled Document

  • ASA9.1 how to use route-lookup instead of "NAT-lookup" for egress interface on non-identity NAT

    Hi,
    I have an ASA firewall with three interfaces, inside, outside and Link.
    I have a situation where I need the ASA to perform the following nat rules:
    from "Inside" to "Link" - any source to destination 192.168.51.0/24 - translate source to 10.0.0.19
    from "inside" to "outside" - any source to any destination - translate source to "interface" (internet navigation)
    from "inside" to "outside" any source to 192.168.51.0/24 - translete source to 10.0.0.17
    This is what I am trying to get working:
    nat (any,TEF) source dynamic any 130.130.0.19_nat destination static obj_192.168.51.0 obj_192.168.51.0
    nat (any,outside) source dynamic any 130.130.0.17_nat destination static obj_192.168.51.0 obj_192.168.51.0
    The problem is that the "outside" route to 192.168.51.0 is an alternative route over a VPN tunnel. I'm using sla monitor, so when the "Link" interface is out, the route table changes the network 192.168.51.0/24 to be reachable over the outside interface. but ASA is using the NAT rule to perform "egress interface lookup" instead of route-lookup.
    I know about the command route-lookup on the NAT configuration, but I need to translate the source address and when I try to use the route-lookup command I get an error message:
    ERROR: Option route-lookup is only allowed for static identity case
    Anybody has some suggestion?
    Thanks

    Hi Julio,
    Thank you for the reply.
    It didn't work either.
    Here are the options I get when I use the specific interfaces (using "source dynamic"):
    configure mode commands/options:
      description  Specify NAT rule description
      inactive     Disable a NAT rule
      net-to-net   Net to net mapping of IPv4 to IPv6
      service      NAT service parameters
    If I try to use source static:
     nat (inside,TEF) source static inside_nat 130.130.0.19_nat destination static obj_192.168.51.0 obj_192.168.51.0 route-lookup
    ERROR: Option route-lookup is only allowed for static identity case

  • Problems while performing lookup for Local EJBs

    Can anybody tell me how can i perform local ejb lookup in Sun app Server 8.0/8.1 ?
    I have following entries in ejb-jar.xml.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar >
    <enterprise-beans>
    <session >
    <ejb-name>TeamLeaderBean</ejb-name>
    <local-home>spring.ejb.example.TeamLeaderLocalHome
    </local- home>
    <local>spring.ejb.example.TeamLeaderLocal</local>
    <ejb-class>spring.ejb.example.TeamLeaderBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor></assembly-descriptor>
    </ejb-jar>
    In sun-ejb-jar.xml I have
    <sun-ejb-jar>
    <enterprise-beans>
    <ejb>
    <ejb-name>TeamLeaderBean</ejb-name>
    <jndi-name>TeamLeaderBeanLocal</jndi-name>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>
    In the client EJBs code I have used following ways of performing lookup...
    ctx.lookup("java:comp/env//TeamLeaderBeanLocal");
    ctx.lookup("java:comp/env/ejb/local/TeamLeaderBeanLocal");
    ctx.lookup("ejb/TeamLeaderBeanLocal");
    Unfortunately none of these performs a successful lookup...???
    Can anybody solve my problem?

    In order to look up a local EJB from an EJB client you have to add an <ejb-local-ref> element for client EJB. So:
    <session>
    <ejb-name>MyClientEJB</ejb-name>
    <ejb-local-ref>
    <ejb-ref-name>ejb/TeamLeaderBeanLocal</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <ejb-link>TeamLeaderBeanLocal</ejb-link>
    </ejb-local-ref>
    </session>
    fil
    Can anybody tell me how can i perform local ejb
    lookup in Sun app Server 8.0/8.1 ?
    I have following entries in ejb-jar.xml.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems,
    Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar >
    <enterprise-beans>
    <session >
    <ejb-name>TeamLeaderBean</ejb-name>
    <local-home>spring.ejb.example.TeamLeaderLocalHome
    </local- home>
    <local>spring.ejb.example.TeamLeaderLocal</local>
    <ejb-class>spring.ejb.example.TeamLeaderBean</ejb-clas
    s>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor></assembly-descriptor>
    </ejb-jar>
    In sun-ejb-jar.xml I have
    <sun-ejb-jar>
    <enterprise-beans>
    <ejb>
    <ejb-name>TeamLeaderBean</ejb-name>
    <jndi-name>TeamLeaderBeanLocal</jndi-name>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>
    In the client EJBs code I have used following ways of
    performing lookup...
    ctx.lookup("java:comp/env//TeamLeaderBeanLocal");
    ctx.lookup("java:comp/env/ejb/local/TeamLeaderBeanLoca
    l");
    ctx.lookup("ejb/TeamLeaderBeanLocal");
    Unfortunately none of these performs a successful
    lookup...???
    Can anybody solve my problem?

  • How to get Initial context of Local Interface in weblogic 8.1

    I have developed a local entity bean but i wouldnt able to initial context of that bean
    CAN ANYBODY HELP ME
    bean deployment descriptor
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <!--
    ** This file was automatically generated by EJBGen 2.16
    ** Build: 20031001-1049
    -->
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>CabinBean</ejb-name>
    <home>my.CabinRemoteHome</home>
    <remote>my.CabinRemote</remote>
    <ejb-class>my.CabinBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>True</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CabinBean</abstract-schema-name>
    <cmp-field>
    <field-name>bedCount</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>deckLevel</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>shipId</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </entity>
    <entity>
    <ejb-name>CabinLocal</ejb-name>
    <local-home>my.CabinLocalHome</local-home>
    <local>my.CabinLocalLocal</local>
    <ejb-class>my.CabinLocal</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>True</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CabinLocal</abstract-schema-name>
    <cmp-field>
    <field-name>bedCount</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>deckLevel</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>shipId</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <ejb-local-ref>
    <ejb-ref-name>LocalCabin</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>CabinLocalHome</local-home>
    <local>CabinLocal</local>
    <ejb-link>LocalCabin</ejb-link>
    </ejb-local-ref>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>CabinLocal</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>CabinBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    <ejb-client-jar>EjbClient</ejb-client-jar>
    </ejb-jar>
    ************************************** Client Code****************
    package com;
    import my.CabinBean;
    import my.CabinRemoteHome;
    import my.CabinRemote;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import java.rmi.RemoteException;
    import java.util.Properties;
    import javax.rmi.PortableRemoteObject;
    import weblogic.jndi.Environment;
    public class Test
        public static void main(String args[])
            try{
                 Context context = getInitialContext();
                          Object cab = context.lookup("CabinLocalHome");
                ///**********-- Exception is thrown at this point -******************
                System.out.println("============ done====");
                Context ct = getInitialContext();
                Object ref = ct.lookup("CabinHomeRemote");
                CabinRemoteHome home = (CabinRemoteHome)PortableRemoteObject.narrow(ref,CabinRemoteHome.class);
                //CabinRemote cab = home.create(new Integer(1));
                //cab.setName("Master Suite");
                //cab.setDeckLevel(new Integer(1));
                //cab.setShipId(new Integer(1));
                //cab.setBedCount(new Integer(1));
                Integer pk = new Integer(1);
                CabinRemote cab1 = home.findByPrimaryKey(pk);
                System.out.println("--->>>>>>>> "+cab1.getName());
                System.out.println("--->>>>>>>>  "+cab1.getShipId());
                System.out.println("--->>>>>>>>"+cab1.getBedCount());
                System.out.println("--->>>>>>>>"+cab1.getDeckLevel());
                System.out.println("---");  
          }catch(java.rmi.RemoteException e){e.printStackTrace();}
           catch(javax.naming.NamingException e){e.printStackTrace();}
           //catch(javax.ejb.CreateException e){e.printStackTrace();}
           catch(javax.ejb.FinderException e){e.printStackTrace();}
        public static Context getInitialContext() throws javax.naming.NamingException
           Properties p = new Properties();
           p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
           p.put(Context.PROVIDER_URL,"t3://localhost:7001");
           return new javax.naming.InitialContext(p);
    } ************************************** Error ***********************
    javax.naming.LinkException: [Root exception is javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home]; Link Remaining Name: 'null']; Link Remaining Name: 'java:app/ejb/myejb.jar#CabinLocal/local-home'
         at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
         at weblogic.jndi.internal.ServerNamingNode_813_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:369)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:357)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.Test.main(Test.java:27)
    Caused by: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home]; Link Remaining Name: 'null'
         at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:98)
         at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:292)
         at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:771)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home
         at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)
         at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)
         at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:57)
         at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:62)
         at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
         at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)

    Hi,
    from what I gather, u have two jars
    1. EJBClient - this will have remote and home interfaces and will be used by the client
    2. myEJB - this iwll have all the classes - remote & home interfaces, the bean class and all the other classes required by the bean.
    Now, the question is, who is acting as the client of your EJB ? There are 3 possibilities
    1. A servlet
    2. Another EJB
    3. a simple java program.
    In the first 2 cases, you can go for Local Interfaces (more so in the second case than the first). The reason being that the the client and server will be in the same JVM. Thus, in the first case, if the Web container and the ejb container are in the same app server, EJBs can be local.
    However, in the third case, it is unlikey that you will have the client runnng and the same jvm as the server, because the server is using the jvm provided by weblogic.
    Thus, you cannot use local interfaces in this 3rd case. I have a feeling that this is what you are doing. If so, change the local interfaces to remote.
    See if this helps. Else, I will mail you some sample code. But I am afraid, sample code wont be of much help bcoz this seems to be a design problem.
    regards

  • EXTREMELY URGENT!!  Last question on Local Interfaces

    Using Oracle9iAS 9.0.3
    Running on RedHat 8.0
    Trying to implement local interfaces to my entity bean. (Oracle9iAS Containers for J2EE for 9.0.3) provides an example for writing local interfaces.
    pg. 2-10 states:
    //The variable is specified in the assembly descriptor (META-INF/ejb-jar.xml)
    Object homeObject = context.lookup("java:comp/env/EmployeeLocalBean");
    but, if you look at the ejb-jar.xml they reference, it's as follows (pg. 2-12):
    <ejb-jar>
    <enterprise-beans>
    <session>
    <description>Session Bean Employee Example</description>
    <ejb-name>EmployeeBean</ejb-name>
    <home>employee.EmployeeHome</home>
    <remote>employee.Employee</remote>
    <local-home>employee.EmployeeLocalHome</local-home>
    <local>employee.EmployeeLocal</local>
    <ejb-class>employee.EmployeeBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    Where does the EmployeeLocalBean name come from for the lookup?!
    Also, do I NEED to deploy BOTH remote and local interfaces to get my local interfaces to work? Another post on this forum had a problem where they couldn't view the configurations of the EJB because there were not remote interfaces available, but then later they said it was just a problem with the web-based Enterprise Manager.
    Please, can someone let me know if these questions are not interesting enough to the forum? Has nobody here ever implemented Local Interfaces on 9.0.3? Do I need to be posting these questions to a different forum? Please advise and I will take care to get my answers elsewhere if necessary.
    It's just that every resource I've looked at for Local Interfaces (which 9.0.3 CAN implement...right?!) has conflicting information and seems to have buggy implementations. Please....help!
    Thanks in advance!

    Strangely enough, I'm not aware of troubles with enviroment variables and JNDI lookup. There are some misunderstandings - compared to WLS, JNDI tree is different.
    Here is an example of Session EJB settings:
    <session>
    <description>Session Bean ( Stateless )</description>
    <display-name>XSLTransformerEJB</display-name>
    <ejb-name>XSLTransformerEJB</ejb-name>
    <local-home>com.ness.europe.integration.transformer.XSLTransformerEJBLocalHome</local-home>
    <local>com.ness.europe.integration.transformer.XSLTransformerEJBLocal</local>
    <ejb-class>com.ness.europe.integration.transformer.impl.XSLTransformerEJBBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    <env-entry>
    <description>path to root transformatin file</description>
    <env-entry-name>config/RootTransformFile</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>/oracle/product/IAS903/j2ee/MwCezPassport/xslt/passport.xslt</env-entry-value>
    </env-entry>
    </session>
    Next, there is an MDB with reference to it:
    <message-driven>
    <description>Message Driven Bean</description>
    <display-name>PassportMDB</display-name>
    <ejb-name>PassportMDB</ejb-name>
    <ejb-class>com.ness.europe.integration.inbound.mdb.InboundMDBBean</ejb-class>
    <transaction-type>Bean</transaction-type>
    <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
    <message-driven-destination>
    <destination-type>javax.jms.Queue</destination-type>
    <subscription-durability>Durable</subscription-durability>
    </message-driven-destination>
    <ejb-local-ref>
    <ejb-ref-name>ejb/XSLTransformerEJB</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.ness.europe.integration.transformer.XSLTransformerEJBLocalHome</local-home>
    <local>com.ness.europe.integration.transformer.XSLTransformerEJBLocal</local>
    <ejb-link>XSLTransformerEJB</ejb-link>
    </ejb-local-ref>
    There is basically this piece of code to do lookup environment variable:
    String toRet = (String)this.initCtx.lookup("java:comp/env/config/" + paramName);
    (of course, the config prefix is our syntax)
    As for EJB lookup, this is used:
    final InitialContext context = new InitialContext();
    return (XSLTransformerEJBLocalHome)context.lookup("java:comp/env/ejb/XSLTransformerEJB");
    I didn't created those beans but I asked mate from my team and answer as to troubles was "no".
    Is the problem lies in "not hard coded" names of beans in lookup? We are not trying to get "env/ejb" but just straighforwardly EJB using its name.
    Myrra

  • Local interfaces and WLS 7

    Hi *,
    does anybody know if localinterfaces work in WLS7 SP1?
    thanx,
    Yauheni

    Yes. my classes were inclueded in system CLASSPATH. but Sun spec says nothing about
    that local interfaces could work only in the application context. it says that restriction
    is that it could work only on the same JVM. so it looks very strange, isn't it? i
    will try to pack everything in ear and try it again.
    Thanx,
    Yauheni
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Yes, it looks like this is a problem. Your application used to work on 6
    because you
    added all your classes to the system classpath, right? And it sounds like
    in 7, local
    calls also depend on the application environment being set.
    Yauheni Prykhodzka <[email protected]> wrote:
    actually, may be that is the problem, we have no ear. we have a set ofjars with
    ejbs and a set of web applications, whci are not packed in war. couldit be a problem,
    when i use local interfaces?
    but spec says that local interface could be used inside a JVM. i thinkit should
    not play a role, if classloadres of ejb and component that use ejb aredifferent.
    is it true?
    Yauheni
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Do you mean that servlet, which is a part of a .war which is deployed
    in
    the
    same .ear with the EJB components fails to invoke EJB's using local interfaces?
    Yauheni Prykhodzka <[email protected]> wrote:
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Interesting. I guess that the problem will go away if you stop using
    startup
    classes
    (for example, use load-on-startup servlet instead to perform initialization
    steps).
    No. I get the same problem after weblogic started. If i try to use localinterfaces
    from another bean o servlet i get the same exception.
    Yauheni
    Yauheni Prykhodzka <[email protected]> wrote:
    Here is the exception, which i'm getting:
    <10.07.2002 11:43:55 CEST> <Emergency> <WebLogicServer> <000342> <Unableto init
    ialize the server: Fatal initialization exception
    Throwable: weblogic.t3.srvr.FatalStartupException: Can't start serverdue to sta
    rtup class failure IdGeneratorStartUp - with nested exception:
    [javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundExcept
    ion: remaining name: /app/ejb/dox.comp.IdGenerator.jar#IdGenerator/local-home];
    Link Remaining Name: 'java:app/ejb/dox.comp.IdGenerator.jar#IdGenerator/local-ho
    me']
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundExcept
    ion: remaining name: /app/ejb/dox.comp.IdGenerator.jar#IdGenerator/local-home
    <<no stack trace available>>
    --------------- nested within: ------------------
    weblogic.t3.srvr.FatalStartupException: Can't start server due to
    startup
    class
    failure IdGeneratorStartUp - with nested exception:
    [javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundExcept
    ion: remaining name: /app/ejb/dox.comp.IdGenerator.jar#IdGenerator/local-home];
    Link Remaining Name: 'java:app/ejb/dox.comp.IdGenerator.jar#IdGenerator/local-ho
    me']
    at weblogic.t3.srvr.StartupClassRunner$1.run(StartupClassRunner.java:95)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
    eManager.java:721)
    at weblogic.t3.srvr.StartupClassRunner.run(StartupClassRunner.java:71)
    at java.lang.Thread.run(Thread.java:484)
    >
    The WebLogic Server did not start up properly.
    the JNDI name for local interface is IdGeneratorLocalHome. i use thisname for lookup.
    Thanx,
    Yauheni--
    Dimitri--
    Dimitri
    Dimitri

  • Local Interfaces Support in 9.0.2 Release 2?

    Does Oracle9iAS 9.0.2 Release 2 support Local Interfaces? The reference I found is as follows:
    from http://otn.oracle.com/tech/java/oc4j/htdocs/oc4j-how-to.html:
    Please note that some of the How-To's only work with later versions of Oracle9iAS Containers for J2EE. For example Oracle9iAS Containers for J2EE (9.0.2) does not support some aspects of the EJB 2.0 specification, so the Local Interfaces How-To will not work on version 9.0.3. However, do not take the list below as as a list of what features are supported in what version of Oracle9iAS Containers for J2EE. This is simply a list of which How-To has been built and tested with which version of Oracle9iAS Containers for J2EE.
    I assume first of all that they really mean to state "so the Local Interfaces How-To will not work on version 9.0.2". But the next sentence states that I should not use this list to show which features are supported and which are not. Does anyone have a definitive answer as this portion of the Oracle website does not seem to provide one?
    Thanks in advance as always!!!

    Never mind. Sorry for wastin' all your time. Further searching has verified that there is no support for local interfaces in Oracle 9iAS 9.0.2 Release 2.

  • Accessing bean using its Local interface

    Hi,
    I have a problem accessing a bean using its local interface in J2EE1.3 environment on J2EE test server. I have two beans, one trying to access other, residing in two different ears. During deployment, after I select "Local" interface option in EJB-refs tag of the standard deployment tool of J2ee, it does not show me the bean-name in the "Enterprise Bean Name" combo-box. When I put the name of the actual bean in the box and try to deploy it, gives the null-pointer exception for the above tag as it does not find the corresponding ejb to be referred.
    Is it necessary to have a client bean and actual bean to be in the same ear for local interface access? The specifications says that both the beans must be in the same container that does not mean same ear, right????
    Thanks

    i am having the exact same problem now.
    did anyone solve this.(you can email [email protected])

  • Accessing the local interface of an EJB

    Hello.
    I am using Jdeveloper 11G and it's integrated application server. Using the Jdeveloper wizards, i created a simple stateless session EJB which has both a local and a remote interface (code listed below). I then used the "Create test client" option to create a simple test client.
    The way these classes and interfaces are set up by the wizards, i am using the remote interface. However, i would like to lookup the local interface and use that instead. But i just can't figure out how to lookup the local interface of the EJB. I have tried pretty much every variation i can think of but still no success. Is there anyone out there who can give me a hand? Is there a way to see the lookup name in the integrated WLS server?
    My remote interface looks like this:
    @Remote
    public interface SessionEJB {
    and the remote one:
    @Local
    public interface SessionEJBLocal {
    And my EJB class:
    @Stateless(name = "SessionEJB", mappedName = "NewTestApplication-SessionEJB")
    public class SessionEJBBean implements SessionEJBLocal, SessionEJB {
    My test client does this lookup that works fine:
    public class SessionEJBClient1 {
    public static void main(String [] args) {
    try {
    final Context context = getInitialContext();
    SessionEJB sessionEJB = (SessionEJB)context.lookup("NewTestApplication-SessionEJB#model.SessionEJB");
    }

    Hi,
    Your lookup in your client would look something like
    SessionEJBLocal sessionEJB = (SessionEJBLocal)context.lookup("NewTestApplication-SessionEJB#SessionEJBLocal ");
    The part before the # in the lookup is your mapped name from your session facade, and after the # you have your package, like com.oracle. and ending it with your local interface name.
    Just remember that if your client is not actually running inside the application server container (which with the generated test client it wouldn't be, its a java standalone app with a main method), you will not be able to use the local interface, and you would have to look up remote interface. This can be done in exactly the same way as the above line of code, just replacing the local interface parts with the remote interface's. Hope this helps.
    Drikus
    Edited by: Drikus Britz on Jun 3, 2009 8:46 PM
    Edited by: Drikus Britz on Jun 3, 2009 8:50 PM

  • Creating local interfaces with JDeveloper (release 2)

    Hi
    Maybe I'm missing something here, but how does one create a local- and a local-home interface with JDeveloper? It only seems to give me the option to create a remote- and a home interface.
    I've tried creating the local interfaces by hand and then adding them as <ejb-local-ref> references in the ejb-jar.xml deployment descriptor, but I get the message "local/local-home tag not supported in this version" when trying to test the code with the Embedded OC4J Server.
    Now, I've managed to create EJB 2.0-style CMP entity beans by modifying the code and deployment descriptors a little, which made me believe that EJB 2.0 is supported, but that seems to be where it stops.
    Am I doing something wrong, or is EJB 2.0 not fully implemented in the Embedded OC4J Server yet?
    Hope you can help
    Christof

    JDeveloper 9.0.2 doesn't have support for local interfaces or any EJB 2.0 features.
    Next release of JDeveloper (9.0.3) will have complete support of J2EE 1.3 features including EJB 2.0.
    This release is slated for this summer (2002)
    raghu
    JDev Team

  • Lookup Local Interface from client app

    I have had an entity bean running using the remote interface.
    When I convert over to using a local interface I have problems
    with the jndi lookup. My environment is JDK 1.4, J2EE 1.3.1, Win 2k.
    The deployment using the J2EE RI works fine.
    I need to know what changes to the client code I need to make
    to locate the bean using lookup().
    I have tried two versions of the lookup:
    // same as the version which workds for the remote interface
    Properties p = new java.util.Properties();
    Context ctx = null;
    p.put (javax.naming.Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.cosnaming.CNCtxFactory");
    p.put(javax.naming.Context.PROVIDER_URL,
    "iiop://localhost:1050");
    ctx = new InitialContext(p);
    Object objref = ctx.lookup("LocalSPIConnector");
    cat.debug ("GOT THE OBJ REF");
    spiHome = (ServiceProviderBeanLocalHome)
    javax.rmi.PortableRemoteObject.narrow (objref,
    ServiceProviderBeanLocalHome.class);
    cat.debug ("AFTER NARROW");
    I get the following exception;
    javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosN
    aming/NamingContext/NotFound:1.0
    In the J2EE RI I can see that this JNDI is associated with the bean.
    Is there a different context factory to be used?
    I have tried to use the initialContext and then lookup
    various forms of the JNDi name:
    a. LocalSPIConnector
    b. java:comp/env/ejb/LocalSPIConnector
    c. java:comp/env/LocalSPIConnector
    d. the classpath to the home interface
    All these fail as the name has not been bound

    Thanks for the reply.
    I have simpliefied the lookup to the following:
    Context ctx = new InitialContext();
    spiHome = (ServiceProviderBeanLocalHome) ctx.lookup ("ServiceProviderBeanEJB");
    I still get the following exception:
    javax.naming.NameNotFoundException: ServiceProviderBeanEJB not found
    at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:174)
    I looked up the deployment descriptor from J2EE RI and took the name
    to lookup from the ejb-name:
    <ejb-jar>
    <display-name>localSPIJAR</display-name>
    <enterprise-beans>
         <entity>
              <display-name>ServiceProviderBeanEJB</display-name>
              <ejb-name>ServiceProviderBeanEJB</ejb-name>
    I presume that this is the correct name to use.

  • Creating a simple java client for a session EJB local interface

    Hi all
    Is it possible to create a simple java client for a session ejb local interface with JDeveloper.
    The problem is that it creates a test client for a remote interface only...
    i.e.
    MySessionEJB sessionEJB = context.lookup("MySessionEJB")
    and once i try to adjust it manually for the local interface...
    MySessionEJBLocal sessionEJB = (MySessionEJBLocal) context.lookup("MySessionEJBLocal") (MySessionEJBLocal - is the name of my local interface)
    it generates the exception:
    javax.naming.NotFoundException: SessionEJBLocal not found
    at...........................(RMIClientContext.java:52)
    There is still no problem with accessing the local interface object from the jsf project where i've added <ejb-local-ref> tag into the web.xml file.
    but i need the possibility of testing the simple java client for the local interface to test business methods wich should return objects without indirect properties
    Thanks in advance.
    Alex.

    Pedja thanks for reply.
    I still dont understand what is wrong with my example.
    The first peace of the code i wrote (getting the reference to the remote interface object) works pretty well, and even more it is produced automatically by JDeveloper, so why we cant get a reference to the local interface object the same way?
    Certanly we should use the local interface for getting access to the resource functioning under the same local jvm and i think it doesnt metter wich app server we really use wls or oas or others
    Thanks. Alex.

Maybe you are looking for

  • IPod Touch Update 1.1.1 - Unknown error occurred, Wiped my iPod

    I attempted the iPod Touch Update 1.1.1. The software downloaded completely, then the progress dialog appeared that it was preparing my iPod for the update. After a lengthy delay I received an error dialog saying that an unknown error had occurred(16

  • Using a current Time Capsule with Airport Extreme and Airport Express Older generation

    I am looking to achieve a fast local network that allows streaming of music and video. I have bought a Time Capsule to replace the Telstra router (Thomson Router) by linking it using ethernet cable and then set up a network that also uses and older a

  • What is the pin out for your PXI-2503?

    Hello, I have purchased a PXI-2503 analog switch, and I have been unable to find the pinouts for this device anywhere. I have connecting directly from the PXI-2503 into my board.

  • Problem launching SQL Developer in Mac

    Hi, I downloaded SQL developer latest version and tried to launch, but it's not launching. My java version: 1.5.0_13-121 I tried replacing my ojdbc14.jar with ojdbc15.jar, still it's not launching. Q1: Can somebody give some pointer on this. Which I

  • Difference in payment terms

    Hi thr, I am looking for a txn or a report which when executed gives the customer nos. that have different payment terms in company code data and sales data. Is there any such txn or is thr a way to acheive it? Thanks so much !!