Does mapping to JNDI for ejb-refs have a performance impact?

Does mapping to JNDI names for ejb-refs have a performance impact for
WLS6.1?
In the ejb-jar.xml deployment descriptor, you can define an ejb reference as
follows:
<ejb-ref>
<ejb-ref-name>ejb/AccountHomeRemote</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.package structure.AccountHomeRemote</home>
<remote>com.package structure.AccountRemote</remote>
<!-- <ejb-link>AccountBean</ejb-link>-->
</ejb-ref>
Now, optionally, you can use the ejb-link element - or - you can, in the
weblogic DD, specify a JNDI name that the ejb-ref maps to.
Using a JNDI name buys you some flexibility. If, for some reason, the jar is
divided, you dont have to convert ejb-link's to JNDI names. The question is:
Is there a performance cost in doing this?
Cheers

Hi Aashish,
Thanks for your quick reply. it was helpful, but i am not using RFC's. Correct me if i am wrong, but i have explained the scenarios in detail below.
Scenario 1. Synchronous
1) PI Picks file from a common folder.
2) PI does a data mapping and sends the data to ECC.
3) ECC contains an inbound interface which receives the data and in which abap proxy code is written.
4) The abap proxy code executes a function module and sends the response as an internal table back to PI.
5) PI receives the response and places it in a text/csv file and places it back to another folder.
I assume that the above would be possible only using BPM. What i understand is that in order for an interface to receive and send data, abstract mappings are to be used, and for this BPM is required. We do not have any conversions etc. its just a simple matter of receiving an internal table from ECC and creating a file to place in the folder.
I also understand that BPM could have bottlenecks due to queue and cache issues, messages might be pending, or lost etc.
Scenario 2. Asynchronous
1) PI Picks file from a common folder.
2) PI does a data mapping and sends the data to ECC.
3) ECC contains an inbound interface which receives the data and in which abap proxy code is written.
4) ABAP Proxy code executes the same function module and calls a seperate outbound interface and passes the values to it. This would be used in sending the response back.
5)  PI receives the response from the second interface and places it in a text/csv file and places it back to another folder.
I would like to know which would be the better approach. Documentation/references to support your claims would be much appreciated.
Cheers,
Mz

Similar Messages

  • Does the Imovie Application for Ipad 2 have the same trailers loaded that the Imovie for Mac has?

    Does the Imovie Application for Ipad 2 have the same trailers loaded as the Imovie Application for Mac regular computers

    They are 2 separate apps, there are no trailers for the IOS version.
    http://www.apple.com/ipad/from-the-app-store/imovie.html

  • Does a text box for an ebook have to be the exact size?

    I'm using Indesign to create an ebook. The usable, non-bordered area of each page is 800 x 600.
    For each page I use the Type Tool button to allow me to create a text box that fills the page area of 800 x600 pixels. I go to great effort to make sure it is aligned perfectly and exactly the right size. I have slight muscular problems in my hands which makes them unsteady so I sometimes don't draw the box exactly the same size and have to undo it and start again a few times. It would be easier for me if I didn't have to be so precise.
    My question is if I used the Type Tool to draw a Text box that is bigger than the 800x600 page would this have repurcussions in how the ebook functions or displays or does it not make any difference?

    I've not been using Master Pages.
    I'm using Indesign to create an ebook which I will output an epub file.
    I set the page dimensions then I have been adding a page as I progress and then using the Type Tool to create a text box for each new page.
    So when you say 'ePub has no exact size predefined by the layouter it is like xhtml.' does this mean the text box size doesn't matter?

  • What is the remote JNDI for EJB 3.0 in Weblogic 10

    I search the whole site, cant find any stuff about the Remote Business interface for a EJB 3.0,
    I also try several string, only get a NameNotFoundException.
    this is the thing I tried.
    PackEARPack_jarEnterSvrBean_EnterSvr and EnterSvrBean#net.xxxx can get a object, but useless.
    package net.xxxx;
    import java.util.Hashtable;
    import java.util.ResourceBundle;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import org.junit.Before;
    import org.junit.Test;
    public class TestA{
         @Test
         public void test() {
              ResourceBundle rb = ResourceBundle.getBundle("jndi");
              Hashtable<String, String> table = new Hashtable<String, String>();
              table.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");;
              table.put(Context.PROVIDER_URL, "t3://localhost:7001");
              table.put(Context.SECURITY_PRINCIPAL, "weblogic");
              table.put(Context.SECURITY_CREDENTIALS, "weblogic");
              Context context = null;
              try {
                   context = new InitialContext(table);
              } catch (NamingException e) {
                   e.printStackTrace();
              //print all result
              find(context, "net.xxxx.EnterSvrLocal");
              find(context, "net.xxxx.EnterSvr");
              find(context, "net.xxxx.EnterSvrBean");
              find(context, "net.xxxx.EnterSvrBean/remote");
              find(context, "net.xxxx.EnterSvrBean/local");
              find(context, "PackEAR/net.xxxx.EnterSvr");
              find(context, "PackEAR/net.xxxx.EnterSvrLocal");
              find(context, "PackEAR/net.xxxx.EnterSvrBean");
              find(context, "PackEAR/net.xxxx.EnterSvrBean/remote");
              find(context, "PackEAR/net.xxxx.EnterSvrBean/local");
              find(context, "PackEAR/Pack/net.xxxx.EnterSvr");
              find(context, "PackEAR/Pack/net.xxxx.EnterSvrLocal");
              find(context, "PackEAR/Pack/net.xxxx.EnterSvrBean");
              find(context, "PackEAR/Pack/net.xxxx.EnterSvrBean/remote");
              find(context, "PackEAR/Pack/net.xxxx.EnterSvrBean/local");
              find(context, "PackEAR/Pack.jar/net.xxxx.EnterSvr");
              find(context, "PackEAR/Pack.jar/net.xxxx.EnterSvrLocal");
              find(context, "PackEAR/Pack.jar/net.xxxx.EnterSvrBean");
              find(context, "PackEAR/Pack.jar/net.xxxx.EnterSvrBean/remote");
              find(context, "PackEAR/Pack.jar/net.xxxx.EnterSvrBean/local");
              find(context, "EnterSvr");
              find(context, "EnterSvrLocal");
              find(context, "EnterSvrBean");
              find(context, "EnterSvrBean/local");
              find(context, "EnterSvrBean/remote");
              find(context, "PackEAR/EnterSvr");
              find(context, "PackEAR/EnterSvrLocal");
              find(context, "PackEAR/EnterSvrBean");
              find(context, "PackEAR/EnterSvrBean/local");
              find(context, "PackEAR/EnterSvrBean/remote");
              find(context, "PackEAR/Pack/EnterSvr");
              find(context, "PackEAR/Pack/EnterSvrLocal");
              find(context, "PackEAR/Pack/EnterSvrBean");
              find(context, "PackEAR/Pack/EnterSvrBean/local");
              find(context, "PackEAR/Pack/EnterSvrBean/remote");
              find(context, "PackEAR/Pack.jar/EnterSvr");
              find(context, "PackEAR/Pack.jar/EnterSvrLocal");
              find(context, "PackEAR/Pack.jar/EnterSvrBean");
              find(context, "PackEAR/Pack.jar/EnterSvrBean/local");
              find(context, "PackEAR/Pack.jar/EnterSvrBean/remote");
              find(context, "EnterSvrBean#net.xxxx");
              find(context, "EnterSvrBean#net.xxxx.EnterSvr");
              find(context, "EnterSvrBean#net.xxxx.EnterSvrLocal");
              find(context, "EnterSvrBean#net.xxxx.EnterSvrBean");
              find(context, "EnterSvrBean#net.xxxx.EnterSvrBean/remote");
              find(context, "EnterSvrBean#net.xxxx.EnterSvrBean/local");
              find(context, "PackEARPack_jarEnterSvrBean_EnterSvr");
         private static void find(Context context, String str){
              try {
                   Object o = context.lookup(str);
                   System.out.println("success:"+str+", is class:"+o.getClass());
              } catch (NamingException e) {
                   System.out.println("failed:"+str);
    ##################################################

    I am having the same problem. Note what the API spec says
    about mappedName at http://java.sun.com/javaee/5/docs/api/
    If I take the default, which should be supported, and which seems to deploy normally, then there seems to be something missing from the JNDI tree (e.g. having the class: $Proxy126).
    Can't the deployment generate a default object for the lookup?

  • EJB Refs ( coded name and JNDI name )

    Hi
    I am just starting to develop EJBs . I can't get to work the EJB refs as expected . In a session bean I have a lookup for an Entity bean . Both beans are in separate JAR files , but in the same ear .
    The lookup from session bean to entity bean only works when
    the coded name in EJB ref is defined exactly the same as JNDI name for enity bean , also the name in lookup method must be the same in session bean .
    To my surprise , the JNDI name for the target EJB , defined in EJB ref for session bean , does not mater at all . Even if I change it to a non existant name , the bean lookup works .
    Theoritacally I understand that EJB ref is there to provide a mapping between the name of bean mentioned in code to the actual JNDI name of another bean , at the time of deployment .
    The above is happening in J2EE 1.4 envoirment .
    Please let me know , what am I doing here that is wrong .
    ( All examples and tutorials , usually give coded name same as JNDI name ) .
    Thanks
    Tarun

    Hi Tarun,
    The ejb-ref-name lives in a different namespace than the global JNDI names. Any names of ejb-refs, ejb-local-refs, resource-refs, etc. are scoped within a particular component's private namespace. All environment references are accessed via the java:comp/env namespace at runtime. So, if your ejb-ref-name(a.k.a "coded name") is ejb/foo in the deployment descriptor, you would access it from the code as follows :
    initialContext.lookup("java:comp/env/ejb/foo");
    This way, neither the standard deployment descriptor nor the code has any dependency on the global JNDI name. That's a good thing since the decision about which target EJB should be linked to is often not made until deployment time rather than development time. Furthermore, it means if you want to change the linking you can always do it without recompiling your code.
    As for the global JNDI names, the first thing to note is that they are completely vendor-specific. That's why they don't appear in the standard deployment descriptor. In the J2EE SDK, each EJB that exposes a Remote view is assigned a global JNDI name in sun-ejb-jar.xml. This JNDI name is assigned from the global namespace of the application server. There's nothing stopping it from also being "ejb/foo", but it refers to a different thing than the "ejb/foo" above.
    Now we have an ejb-ref called ejb/foo and an ejb whose JNDI name is ejb/foo, but we haven't linked the two. When it comes to linking, you have two choices:
    1. If the target ejb is in the same .ear as the client component, you can use the ejb-link mechanism. This allows you to specify the target ejb by referring to its ejb-name. Since ejb-name is only guaranteed to be unique within an ejb-jar, the syntax allows for you to give the uri of the containing ejb-jar, followed by #, followed by ejb-name.
    2. Alternatively, you can specify the global JNDI name of the target ejb using sun-ejb-jar.xml Note that this will work whether the target ejb is in the same .ear or not. However, it's the only option if the target ejb is in a different .ear. In this case, you would create an ejb-ref entry for the client component within the sun-ejb-jar.xml. e.g. :
    <ejb>
    <ejb-name>MyClientBean</ejb-name>
    <ejb-ref>
    <ejb-ref-name>ejb/foo</ejb-ref-name>
    <jndi-name>ejb/foo</jndi-name>
    </ejb-ref>
    </ejb>
    Again, it's just a coincidence that both names happen to be ejb/foo. They refer to different things.
    When you do a global lookup from your code, initialContext.lookup('ejb/foo"), it will work in some environments because you're simply bypassing the level of indirection provided by your component environment and going straight to the global namespace. This is non-portable and not a good idea, since you've now tightly coupled the name of the target ejb to your client component. That means if it changes you need to recompile your code. Hope this helps.
    --ken

  • Ejb-ref and ejb-local-ref tags

    Hi everyone,
    Can someone please tell me
    1) Is it necessary for me to define ejb-ref or ejb-local-ref tags if I am referering one ejb from other ejb? I mean to say is it mandatory that I should have these deployment descriptor tags?
    2) What is purpose of ejb-link tag ?

    Hi everyone,
    Can someone please tell me
    1) Is it necessary for me to define ejb-ref or
    ejb-local-ref tags if I am referering one ejb from
    other ejb? I mean to say is it mandatory that I should
    have these deployment descriptor tags?Yes, to write portable J2EE components, every time you have a dependency on an ejb, you need to declare an ejb-ref (for a Remote EJB client) or ejb-local-ref (for a Local EJB client). This is true no matter what kind of J2EE component is accessing the ejb (Application Client, JSP, Servlet, or another ejb).
    Think of the ejb-ref or ejb-local-ref as a pointer. It's different from the thing that is pointed to. Instead, it represents a dependency between a client component and a target ejb.
    2) What is purpose of ejb-link tag ?Every ejb-ref or ejb-local-ref must be resolved to unambiguously point to the target ejb. The ejb-link tag is one way to resolve this dependency for the case where the target ejb lives in the same .ear as the referring component. The ejb-link tag is the ejb-name (or <ejb-jar uri>#<ejb-name>) of the target ejb.
    Note that this means ejb-link is the ONLY way to resolve an ejb-local-ref, since by definition Local EJB access can only take place between two ejbs within the same .ear or a web component/ejb that live within the same .ear.
    For ejb-refs, you can use ejb-link if the target ejb is within the same .ear. If not, the ejb specification does not prescribe how the dependency is resolved. It's left up to the J2EE implementation. The most common approach is for the vendor to provide a product-specific runtime .xml element that resolves the ejb-ref by associating it with the global JNDI name of the target EJB. That's the approach used in the J2EE SDK and Sun Java System Application Server.
    Kenneth Saks
    J2EE SDK Team
    SUN Microsystems

  • Ejb-ref in oc4j 10.1.3.2.0 standalone

    Hi,
    i asked this before, but i didnt receive any answers. So i looked in more deeply to be more precise.
    I developed and deployed a Webservice with JDEV 10.1.3 which looks up EJBs in a remote oc4j. I configured the ejb-references in web.xml and orion-web.xml like shown in the documentation by using ejb-ref-mapping attribute jndi-properties-file and remote-server-ref=true. That works fine in embedded oc4j 10.1.3.2.0.
    If i deploy the same application to standalone oc4j 10.1.3.2.0 the application fails wih a naming exception. If i hardcode the jndi-properties again all works fine, so it seems to be a problem of configuration.
    So i let print out some information about the InitialContext constructed im the ServiceLocator-Class i use:
    ctx = new InitialContext( );
    Hashtable ha = ResourceManager.getInitialEnvironment(null);
    logger.debug("" + ha.get(InitialContext.PROVIDER_URL));
    NamingEnumeration nenum = ctx.listBindings("java:comp/env");
    There are indeed some differences between the standalone and the embedded as listed below:
    embedded:
    07/09/17 17:53:36 ormi://remote-IP: javax.naming.Reference:Reference Class Name: javax.ejb.EJBHome
    Type: location
    Content: MyBeanFacade
    Type: remote-server-ref
    Content: true
    Type: jndi-properties-file
    Content: jndi.properties
    07/09/17 17:53:36 ejb: javax.naming.Context:[Context TestWS-org-webapp: {MyBeanFacade=Reference Class Name: javax.ejb.EJBHome
    Type: location
    Content: MyBeanFacade
    Type: remote-server-ref
    Content: true
    Type: jndi-properties-file
    Content: jndi.properties
    , ejb/MBeanServerUserEjb=Reference Class Name: javax.ejb.EJBHome
    Type: location
    Content: MBeanServerUserEjb
    standalone:
    07/09/17 18:14:06 ormi://IP-ofTheHostOfOC4J:23791/default
    07/09/17 18:14:06 MyBeanFacade: javax.naming.Reference:Reference Class Na
    me: javax.ejb.EJBHome
    Type: location
    Content: MyBeanFacade
    07/09/17 18:14:06 ejb: javax.naming.Context:[Context webapp: {MyBeanFacad
    e=Reference Class Name: javax.ejb.EJBHome
    Type: location
    Content: MyBeanFacade
    , ejb/MBeanServerUserEjb=Reference Class Name: javax.ejb.EJBHome
    Type: location
    Content: MBeanServerUserEjb
    The difference is obvious.
    Interestingly http://www.oracle.com/technology/oracleas/schema/orion-web-10_0.xsd
    dosnt neither define jndi-properties-file nor remote-server-ref for ejb-ref-mapping. On the other hand, thats what one finds in the documentation.
    Another problem is, that originally the oc4j tried to lookup with protocol ormis.
    So i had first to delete ssl-port = "23943" from rmi.xml to see ormi.
    Now on the first call of the Web Service after start of the server in fact the lookup goes to the remote-IP not to the IP-ofTheHostOfOC4J as written before. But the lookup fails with a namingexception anyway. After the second call the lookup goes to IP-ofTheHostOfOC4J again, even though the application is restarted or redeployed.
    Its not very funny to go through this configuration issues with every new revision of the software. Perhaps the lack of feedback in this forum is a hint to open more often a tar than to post herein.
    Regards chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Thank u both for your answers.
    First of all this is not a Web Service specific issue at all, its about configuring ejb-references for web-components.
    The difference was between embedded and standalone.
    The reason for this behavior is a bug in 10.1.3.1 standalone.
    I think this could be fixed in this 1/2 GB patch from july 2007, so why not upgrading to 10.1.3.3 for which i assume that it includes the fix as Olaf proposed following my proposal ;-)
    Anyway you can work around it quite simple:
    The reason is that during the deployment the contents of the custom (contained in the ear-file) orion-web.xml is not properly added to the generated orion-web.xml in applications-deployments.
    The ejb-remote attrbiute is discarded.
    So just add it to the generated orion-web.xml after the deployment and restart the oc4j. Dont redeploy or restart the application cause a redopleyment would overwrite your changes.
    Thanks for my help :-)
    Chris

  • Ejb-ref-mapping in orion-ejb.jar missing location attribute after deployment

    I have noticed that on several of my entity beans that after deployment the <ebj-ref-mapping location="JNDIName" name="LocalName"/> is missing the location attribute. This causes any attempts to lookup the EJBHome for that EJB to fail because the path to the EJBHome in JNDI cannot be found (obviously!). The problem is that this causes me to manually edit the application-deployment/<app>/<ejb.jar>/orion-ejb.zml after each deployment via the admin.jar. This seems like a bug with OC4J and I am wondering if Oracle is aware/doing something to fix this?
    I have noticed that the same problem exists for session beans, however, for some strange reason the EJBHomes can still be resolved in JNDI. In all cases the location in JNDI is different then the <ejb-ref-name> I used in the client EJB.
    Example being I have an entity bean at com.foo.Foo and the session bean uses lookup("java:comp/env/ejb/Foo") it is still able to find the EJB even though the orion-ejb.xml looses the location attribute. If the case is an entity bean referencing another entity bean in the same fashion I get an error because the location attribute is missing.

    If the 'location' value is same as the 'name' value, then even though the location attribute is missing, it is ok and should work. If they are not the same, then you should have defined the ejb-link element in your ejb-jar.xml when defining this ejb-ref and that would make the location attribute appear in the generated orion-ejb-jar.xml.
    If the referenced bean is from a different application (EAR), then you should have used the -parent option when deploying the application.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Kris Trujillo ([email protected]):
    I have noticed that on several of my entity beans that after deployment the <ebj-ref-mapping location="JNDIName" name="LocalName"/> is missing the location attribute. This causes any attempts to lookup the EJBHome for that EJB to fail because the path to the EJBHome in JNDI cannot be found (obviously!). The problem is that this causes me to manually edit the application-deployment/<app>/<ejb.jar>/orion-ejb.zml after each deployment via the admin.jar. This seems like a bug with OC4J and I am wondering if Oracle is aware/doing something to fix this?
    I have noticed that the same problem exists for session beans, however, for some strange reason the EJBHomes can still be resolved in JNDI. In all cases the location in JNDI is different then the <ejb-ref-name> I used in the client EJB.
    Example being I have an entity bean at com.foo.Foo and the session bean uses lookup("java:comp/env/ejb/Foo") it is still able to find the EJB even though the orion-ejb.xml looses the location attribute. If the case is an entity bean referencing another entity bean in the same fashion I get an error because the location attribute is missing.<HR></BLOCKQUOTE>
    null

  • Multiple JNDI names for EJB?

    If I'm deploying a webapp that references an EJB, do I have to use the same JNDI
    name that is configured in the EJB descriptor?
    Why can't I reference the EJB using a seperate name (as in some J2EE examples)?
    Thanks,
    Darren

    darren <[email protected]> wrote:
    If I use a new JNDI name, rather than the one defined in weblogic-ejb-jar.xml,
    it does not show up in the JNDI tree.
    Does the JNDI name referenced in weblogic.xml need to be the same as that defined
    in weblogic-ejb-jar.xml? No. ejb-ref mechanism allows you to map an actual ejb jndi name to one used by your
    application - so, in theory, system administrator can change jndi names without
    touching your application code. You do not see it in the global JNDI tree because
    this mapping exists only in the context of your application.
    <[email protected]> wrote:
    That's what ejb-ref in web.xml is for - you can create an ejb-ref in
    web.xml
    and map it to an actual jndi name in weblogic.xml ejb-reference-description.
    Darren <[email protected]> wrote:
    If I'm deploying a webapp that references an EJB, do I have to usethe same JNDI
    name that is configured in the EJB descriptor?
    Why can't I reference the EJB using a seperate name (as in some J2EEexamples)?
    Thanks,
    Darren--
    Dimitri
    Dimitri

  • Ejb-ref, ejb-link or JNDI lookup

    If I have an application in which one EJB is using another EJB in the SAME application,
    what is the best of way of accessing the other EJB?
    Why would I use ejb-ref / ejb-link instead of just looking it up in the JNDI?
    Just curious.
    Thanks.
    Dan

    ejb-ref/ejb-link were introduced in the ejb spec to allow bean developers to
    develop beans without any knowledge of the environment into which they would
    be deployed. If you can live with hard coded jndi names then that is fine or
    you can use the mechanism define below but using ejb-ref/ejb-link makes your
    beans more reuseable and less dependent on the final environement.
    If both the ejbs are in the same application I would recommend using ejb-ref
    and ejb-link.
    -- Anand
    "Chad McDaniel" <[email protected]> wrote in message
    news:[email protected]..
    "Dan Baumbach" <[email protected]> writes:
    If I have an application in which one EJB is using another EJB in the
    SAME application,
    what is the best of way of accessing the other EJB?
    Why would I use ejb-ref / ejb-link instead of just looking it up in theJNDI?
    >>
    >
    I believe that ejb-ref/link is not useful in most systems and causes
    another level of complexity to maintain. Since EJBs are complex enough
    I think that using the basic JNDI lookup is preferable. Also, this
    frees you to move the beans to a remote server if you ever want to.
    The simplest and most flexible technique, I believe, is to use a
    utility class that handles all EJB lookups for you and use a simple
    EJB and JNDI name mapping that this class can generate the JNDI name
    with a simply manipulation of the bean name. If you ever change the
    reference technique you will then only have one class to modify.
    This is also a good place to cache home references.

  • JNDI Lookup in JSP fails for EJB 3.0

    I am new to Java technology. I read the EJB FAQ, NetBeans docs and may forum discussions and I am still confused with the error I am having.
    Background:
    I have developed a persistance bean and related sessions beans (similar to the customer-cmp-ear application in the Java App Server samples). Now I am trying to access this bean using a JSP. After deploying the war file in the App Server and try to access the page, I get the following error.
    javax.naming.NameNotFoundException: No object bound to name java:comp/env/ConsumerSessionLocal
    After reading many articles, I understood that I dont have to prepare any descriptors, or JAR files for EJB 3.0.
    Environment Details:
    Java App Server Ver 9.0
    NetBeans 5.5
    I normally build the war files using NetBeans.
    I use App Server Admin console to deploy the web applications using the above war file.
    EJB details:
    Persistance EJB : person.java
    Session Objects
    Consumer.java (this implements ConsumerSessionLocal, ConsumerSessionRemote). This Stateless bean accesses the methods in person.java.
    ConsumerSessionLocal.java - local interface
    ConsumerSessionRemote.java - remote interface
    SearchConsumer.jsp
    This JSP page is calling the ConsumerSessionLocal using the JNDI lookup through InitialContext.
    Here is the Code snippet:
    try {
    InitialContext ic = new InitialContext();
    Object o = ic.lookup("java:comp/env/ConsumerSessionLocal");
    ConsumerSessionLocal consSession = (ConsumerSessionLocal) o;
    I am able to see the jsp page in the browser, however, after a submit action, I get the Java Naming Exception error.
    javax.naming.NameNotFoundException: No object bound for java:comp/env/ConsumerSessionLocal
    I would appreciate your help/any of your thoughts.
    Thanks in advance.
    -Ram

    I did not really solve it. Instead I used some of the tutorials that used JNDI lookup and modified those as my way forward. I did not really find out exactly what I was doing wrong.
    /Anders

  • Do i have to use JNDI with EJBS?

    Hi
    I want to use JNDI to lookup a system which i will send messages to using JMS. I would like to have some java classes on Tomcat to do the job. But...whenever i hear about JNDI it is always in relation to EJBs. Can i only use JNDI with EJBS?
    If i can use JNDI is there anything important i need to know about.
    Thanks in advance!
    San H.

    You can definitely use JNDI outside of EJB's - in particular, it's a great interface for dealing with LDAP servers, even securely, and can also be used for DNS interfacing, COS, RMI registries, etc.
    While JNDI was chosen as the method by which J2EE components can locate other components in a distributed environment, it's by no means limited to that task :) It's a wonderful API, and in terms of things you need to know, most everything is covered fairly well at the JNDI tutorial in the various trails that are mapped out there.
    http://java.sun.com/products/jndi/tutorial/
    Good luck!
    James
    James Manning | Principal Engineer
    Porivo Technologies, Inc.
    919.806.0566 | [email protected]
    http://www.porivo.com/
    Measuring end-to-end Web performance.
    Register for a FREE Performance appraisal:
    http://www.porivo.com/peerReview/eval.html

  • How to lookup EJB3 beans using JNDI names without defining ejb-ref in DD?

    Hi Kenneth,
    I am just continuing the topic:
    How Lookup SLSB from other SLSB? <HELP>
    http://forum.java.sun.com/thread.jspa?threadID=5117484&tstart=0
    (my original forums account failed, so I am using new one)
    if I am not seeking portability I should be able to lookup a bean directly through JNDI without using the ejb-ref. (I just want to see how it can be done)
    http://forum.java.sun.com/thread.jspa?forumID=13&threadID=751907
    http://www.theserverside.com/discussions/thread.tss?thread_id=16402
    I am using SJSAS PE 9.0 I am failing to lookup my beans from other beans directly without ejb-ref.
    Is there some sample code to look at?
    Thanks!

    Global JNDI names are vendor-specific and not known until deployment time. That is one
    of the main reasons the Java EE component environment model defines a level of
    indirection for accessing component dependencies. It is best to use either an ejb-ref
    or @EJB annotation when accessing EJBs from a Java EE component.
    If you choose not to, you just have to make sure the global JNDI name you use matches
    the one assigned to the target EJB. We have a lot of information on how this works
    in our EJB FAQ.
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
    If you're still encountering an error, please provide more specifics about your application,
    the code you're using for the lookup, and the error message you're receiving. Just
    saying "my looking fails" doesn't help us diagnose the problem :-)
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Have to ask again:when to use ejb-ref ?

    hi, I asked this last week but nobody answered it.
    i am really curious about it and i checked some docs it said " it is useful
    coz beans can look each other up without needing to initialize JNDI to any
    particular driver".
    i wonder what means particular driver and when there will be great
    difference between using and not using.
    thanx in advance
    Ciao,
    zhxt

    In WLS you can have either global JNDI names that are visible throughout
    the server or JNDI names that are local to your application.
    The recommended best practice these days is to use ejb-refs and/or
    ejb-links to lookup your EJBs. For local EJBs, you don't need to have a
    global JNDI name since they are not visible to other applications.
    -- Rob
    scratchback wrote:
    hi, I asked this last week but nobody answered it.
    i am really curious about it and i checked some docs it said " it is useful
    coz beans can look each other up without needing to initialize JNDI to any
    particular driver".
    i wonder what means particular driver and when there will be great
    difference between using and not using.
    thanx in advance
    Ciao,
    zhxt

  • Using ejb-ref tag for EJB toEJB reference

    Hello all respected members,
    I am using weblogic 5.1 (sp 9).
    I have two Session EJBs - a client and another is the referenced by
    the client.
    The client is using services of the referenced EJB.
    The two EJBs are in two very different packages.
    Now say I am trying to deploy the client EJB first, without deploying
    the referenced EJB.
    What I expect (rather, want)is, when the client EJB is being deloyed,
    it should give a notification somehow (let's say, by throwing an
    exception) that the referenced EJB is not yet deployed.
    First of all, is this possible ?
    Secondly, I am aware of the of the <ejb-ref> tag. In order to meet my
    requirement, I have added the same tag in the client's ejb-jar.xml and
    corresponding <ejb-reference-description> tag in the
    weblogic-ejb-jar.xml file.
    When I start the weblogic server, I can see that the referenced EJB is
    not deployed. But the client EJB is being deployed, it does not give
    any notification that the referenced EJB is not yet deployed and gets
    deployed successfully.
    In other words, I expect <ejb-ref> tag to let me know that the
    referenced EJB is not yet deployed. Is my understanding of <ejb-ref>
    tag correct ?
    It is clear to me that when the client EJB tries to instantiate the
    referenced EJB to use its services, it would throw an exception
    (during the lookup) since the referenced EJB is not deployed. But I
    want to avoid this exception at this stage. I want to get a
    notification of this, much before i.e. when the weblogic is deploying
    my client EJB. I think the <ejb-ref> tag does this. Hence I am using
    it.
    If I am going in wrong direction, is there any other way to fulfil my
    requirement ?
    Please advise.
    Neelesh.

    The <ejb-ref> element is used at deployment to map the bean references.
    The beans referred to should already be deployed.
    Neelesh wrote:
    Hello all respected members,
    I am using weblogic 5.1 (sp 9).
    I have two Session EJBs - a client and another is the referenced by
    the client.
    The client is using services of the referenced EJB.
    The two EJBs are in two very different packages.
    Now say I am trying to deploy the client EJB first, without deploying
    the referenced EJB.
    What I expect (rather, want)is, when the client EJB is being deloyed,
    it should give a notification somehow (let's say, by throwing an
    exception) that the referenced EJB is not yet deployed.
    First of all, is this possible ?
    Secondly, I am aware of the of the <ejb-ref> tag. In order to meet my
    requirement, I have added the same tag in the client's ejb-jar.xml and
    corresponding <ejb-reference-description> tag in the
    weblogic-ejb-jar.xml file.
    When I start the weblogic server, I can see that the referenced EJB is
    not deployed. But the client EJB is being deployed, it does not give
    any notification that the referenced EJB is not yet deployed and gets
    deployed successfully.
    In other words, I expect <ejb-ref> tag to let me know that the
    referenced EJB is not yet deployed. Is my understanding of <ejb-ref>
    tag correct ?
    It is clear to me that when the client EJB tries to instantiate the
    referenced EJB to use its services, it would throw an exception
    (during the lookup) since the referenced EJB is not deployed. But I
    want to avoid this exception at this stage. I want to get a
    notification of this, much before i.e. when the weblogic is deploying
    my client EJB. I think the <ejb-ref> tag does this. Hence I am using
    it.
    If I am going in wrong direction, is there any other way to fulfil my
    requirement ?
    Please advise.
    Neelesh.

Maybe you are looking for

  • Problem Oracle EBS

    Hello, I am having problem of slowness in Oracle Application, everything this occurred when we bring up to date JInitiator 1.3.1.26 exists some configuration in Unix or EBS to solve this, tanks Cristian

  • Record to Desktop in Premiere / OnLocation MIA?

    With the CS5 suite I was able to use OnLocation to capture video via a connected camcorder.  And that was super.  However, OnLocation seems to be missing in CS6.  Has it been retired or is there a replacement or updated feature in Premiere that takes

  • AC Adapter/ Elitebook 8730W -Can I use 200W safely?

    I have an EliteBook 8730w laptop. It comes with an external 120 watt or 150 watt Smart AC adapter.  A friend gave me a replacement 200W AC Adapter which was originally for the 8740w. It fits my 8730w but is it safe to use as its a higher wattage tha

  • How do I open .ICS files in Firefox?

    I receive a calendar from a website I often reference and suddenly the calendar is being sent as an .ICS file, and I have no installed software to open this file type, and a web search doesn't yield any software that works with Firefox, there is lots

  • Cannot configure a POP3 email account.  Using OSX10.8.2

    All of a sudden my wife's AT&T Yahoo mail account stopped working.  I looked at settings and found the account was changed to an IMAP instead a POP account.  I deleted the account and attempted to re-create it to no avail.  Seems when I put her accou