How to write the jndi lookup for ejb using oc4j server in jdeveloper

Hi All,
i am new to the JDeveloper. i want to develop the session bean in JDeveloper using the OC4J server. how to write the jndi lookup in cllient. what are the xml files need to deploy the application. where can i mention the JNDI name in xml file. so please provide the information as soon as possible.
regards
ram

There is quite in-depth information in the Enterprise JavaBeans Developer's Guide.
Section 2 (Understanding EJB Application Development) explains the xml files needed and Section 29 (Accessing an EJB from a Client) explains how to do a JNDI lookup.
Hope this helps.

Similar Messages

  • How to write the regular expression for Square brackets?

    Hi,
    I want regular expression for the [] ‘Square brackets’.
    I have tried to insert in the below code but the expression not validate the [] square brackets.
    If anyone knows please help me how to write the regular expression for ‘[]’ Square brackets.
    private static final Pattern DESC_PATTERN = Pattern.compile("({1}[a-zA-Z])" +"([a-zA-Z0-9\\s.,_():}{/&#-]+)$");Thanks
    Raghav

    Since square brackets are meta characters in regex they need to be escaped when they need to be used as regular characters so prefix them with \\ (the escape character).

  • How to write the CMD command for restarting all obi services?

    Hi Experts,
    BIEE:11.1.1.6
    How to write the CMD command for restarting all obi services automatically by windows task scheduler?
    I am try to write the code as below, but it does not work. Please help me to review it and check what I am missing.Thanks.
    Or is there any better method for solving my requirement ? Please share me.Thanks very much.
    cd C:\InstallPath\OBIEE\instances\instance1\bin
    opmnctl stopall
    opmnctl startall
    I am facing the problem that it does not excute the 'opmnctl startall' code, which will be stopped after 'opmnctl stopall',
    So how to modify the command ?Thanks

    See if any of the these are useful or solves your query -
    4.5.2 Using a Windows Service to Start and Stop System Components
    http://docs.oracle.com/cd/E23943_01/bi.1111/e10541/components.htm#BABEEAAI
    4.5.3 Using the Oracle BI Systems Management API to Programmatically Start and Stop Oracle Business Intelligence
    http://docs.oracle.com/cd/E23943_01/bi.1111/e10541/components.htm#BABFGICA
    Edited by: Abhi on May 8, 2013 4:44 AM

  • How to write the dynamic code for RadioGroupByKey and Check Boxes?

    Hi,
    Experts,
    I have created a WD ABAP application in that i have used RadioGroupByKey and CheckBox Ui elements but i want how to write the dynamic code to that i want to display male and female to RadioGroupByKey and 10  lables to check boxs.
    Please pass me some idea on it and send any documents on it .
    Thanks in advance ,
    Shabeer ahmed.

    Refer this for check box:
    Do check :
    bind_checked property is bind to a node with cardinality of 1:1
    CHECK_BOX_NODE <---node name
    -CHECK_BOX_VALUE <--attribute name of type wdy_boolean
    put this code under your WDDOMODIFYVIEW:
    DATA:
    lr_container TYPE REF TO cl_wd_uielement_container,
    lr_checkbox TYPE REF TO cl_wd_checkbox.
    get a pointer to the RootUIElementContainer
    lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    lr_checkbox = cl_wd_checkbox=>new_checkbox(
    text = 'WD_Processor'
    bind_checked = 'CHECK_BOX_NODE.CHECK_BOX_VALUE'
    view = view ).
    cl_wd_matrix_data=>new_matrix_data( element = lr_checkbox ).
    lr_container->add_child( lr_checkbox ).
    Refer this for Radiobutton :
    dynamic radio button in web dynpro abao
    Edited by: Saurav Mago on Jul 17, 2009 10:43 PM

  • How to write the ABAP code for Datasource Enhancment

    Hi Team,
                  Can you please help me how to write the code for the enhancement i have made to the standard datasource
    i have added the fields ZZPayer and ZZPayer_access.
    I just wanted to know how to write the ABAP code to populate the data for these fields.
    Regards,
    Pradeep P.

    Hi
    From a performance point of view would like to suggest a few changes :
    WHEN '<DS name>'.
      select zzfields from <table> into itab
      for all entries in c_t_data where <condition>.
      If sy_subrc = 0.
    loop at c_t_data assiging f_c_t_data.
    read itab into wa_itab where key = f_c_t_data-key.
    f_c_t_data-zzfield = wa-itab-zzfield.
    endloop.
    refresh itab.
    regards,
    aparna
    endif.

  • How to write the map expression for a const string

    hi all,
    i am trying to map from source table A to target table B. Table B has a column that A doesn't have and the column type is string.
    what should i do if i want to keep this column a const string like "abc"? How to write the map expression?
    Setting a default value like "abc" of this column in database is not available .
    please try to help, thanks a lot.
    jun

    Hi jun,
    You mean, u want to give some hard coded value to a specific column in mapping?
    If so , give 'abc' in the target column and execute it on Target.
    Thanks,
    Guru

  • How to setup the cluster environment for BPM using weblogic

    want to setup the cluster environment for BPM using weblogic....
    i have installed the oracle weblogic server 10gr3 and oracle BPM enterprise for weblogic 10gR3
    i have used the Admin tools from the "oracle BPM enterprise for weblogic" to setup the configuration and create the weblogic domain servers.
    i can launch the process administrator and import the project exp file to domain server.
    but what should i do to setup cluster environment using weblogic?
    what i want to do is :
    setup one admin machine..
    setup two product machine..
    enable the cluster so the admin machine can monitor the status of the product machine..
    thanks a lot ...

    The install guide at http://download-llnw.oracle.com/docs/cd/E13154_01/bpm/docs65/config_guide/index.html gives a reasonable amount of info on how to do this.
    Personally I have not used the OBPM option to configure WebLogic instead I've used the information in the above install guide to create the weblogic domain in advance of configuring OBPM.
    Once you've setup WebLogic configure OBPM using the values I mention in the following thread: How to set the JMX Engine parameter in Process Administation?
    Let me know any specific config questions and I'll do my best to answer them for you.
    Thanks,
    Mike

  • JAVA client JNDI lookup for EJB session in cluster in WLS 5.1

    The documentation says :
              to obtain a Context for JNDI lookup do the following :
              Hashtable ht = new Hashtable();
              ht.put(Context.INITIAL_CONTEXT_FACTORY,
              "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://mycluster:7001");
              try {
              Context ctx = new InitialContext(ht);
              // Do the client's work
              catch (NamingException ne) {
              // A failure occurred
              finally {
              try {ctx.close();}
              catch (Exception e) {
              // a failure occurred
              where "mycluster" is the DNS name of my cluster. My DNS server (Windows 200
              DNS server) use round robin
              to call alernatively all the wls server node in "mycluster" and it's OK. The
              two servers of my cluster
              are called alternatively for my EJB session stateless.
              Now I unplug one of the two nodes of my cluster and the remaining server is
              called only 2 times
              and not after.
              Questions :
              -is the load balancing between the nodes of mycluster only rely on DNS or
              is there an internal
              mecanism in EJB sub to try one server then an other ?
              - do I need to obtain a new reference on JNDI Context for each call ?
              Thank's a lot.
              Farid Bellameche.
              

              I too have the same problem. My scenario is :
              I have the web tier architecture away from cluster. All ejbs are in cluster
              running in two seperate machines. We have a factory class running in
              webtier(we use servlet in this tier) which obtains home interface only once
              and stores it for future reference. When ever we need the remoteobject stub,
              we ask the factory class and which in turn uses the stored home interface to
              get the same.
              In the webtier, I list all the servers in the cluster as a part of url as
              mentioned by you.
              I started the web tier as well as Object tier cluster. I could see the
              request coming in both the machines in the cluster for the ejb. But When I
              bring one the server in the cluster,
              1. Web tier throws an exception saying that it could not connect
              to server using t3.
              2. The other machine which is running the server, also says
              'failed to create socket to : -32323234324 sever name
              using protocol t3.
              It looks like I am able to get load balance. But I am not able to get the
              fail over to be working.
              In the weblogic-ejb-jar.xml, I added the following.
              <clustering-descriptor>
              <home-is-clusterable>true</home-is-clusterable>
              <home-load-algorithm>round-robin</home-load-algorithm>
              </clustering-descriptor>
              I compiled and added the .jar file. So the jar file now has replica aware
              stubs.
              Could any one of you help me for why the fail over is not working?
              Suersh
              "Giri Alwar" <[email protected]> wrote in message
              news:[email protected]...
              > Farid,
              > (1) Yes, the stub has the logic to perform load-balancing and
              fail-over.
              > (2) In almost all cases, no. You can get the context once, store it
              and
              > use it thereafter. Please refer to
              > http://www.weblogic.com/docs51/cluster/concepts.html#1025061 for more
              info.
              >
              > A couple of notes on your situation. From what you are describing, your
              > Windows DNS server is setup to serve only one IP from the cluster (using
              > round-robin) as opposed to a list of all IP's in the cluster. Hence, the
              > initial context you obtain is tied to a single server in the cluster (the
              > one returned by the DNS). The weblogic implementation on the client side
              has
              > no idea of the existence of the other servers in the cluster. This is not
              a
              > cluster aware context. To obtain a cluster aware context, either list all
              > the IP's in the URL like t3://server1,server2,server3:7001 or have
              > "mycluster" return a list of all servers in the cluster.
              >
              > Giri
              >
              >
              > "Farid Bellameche" <[email protected]> wrote in message
              > news:[email protected]...
              > > The documentation says :
              > >
              > > to obtain a Context for JNDI lookup do the following :
              > > Hashtable ht = new Hashtable();
              > > ht.put(Context.INITIAL_CONTEXT_FACTORY,
              > > "weblogic.jndi.WLInitialContextFactory");
              > > ht.put(Context.PROVIDER_URL, "t3://mycluster:7001");
              > > try {
              > > Context ctx = new InitialContext(ht);
              > > // Do the client's work
              > > }
              > > catch (NamingException ne) {
              > > // A failure occurred
              > > }
              > > finally {
              > > try {ctx.close();}
              > > catch (Exception e) {
              > > // a failure occurred
              > > }
              > > }
              > >
              > > where "mycluster" is the DNS name of my cluster. My DNS server (Windows
              > 200
              > > DNS server) use round robin
              > > to call alernatively all the wls server node in "mycluster" and it's OK.
              > The
              > > two servers of my cluster
              > > are called alternatively for my EJB session stateless.
              > > Now I unplug one of the two nodes of my cluster and the remaining server
              > is
              > > called only 2 times
              > > and not after.
              > >
              > > Questions :
              > > -is the load balancing between the nodes of mycluster only rely on DNS
              > or
              > > is there an internal
              > > mecanism in EJB sub to try one server then an other ?
              > >
              > > - do I need to obtain a new reference on JNDI Context for each call ?
              > >
              > >
              > > Thank's a lot.
              > >
              > > Farid Bellameche.
              > >
              > >
              > >
              > >
              >
              >
              

  • How to write the SQL query for generating triangular numbers

    Hi,
    I have a table ..which stores the sequence number like this
    Seq :
    1000
    1200
    1300
    1500
    1800
    1900
    Now i want to get a result like this
    1000 1000
    1200 2200
    1300 3500
    1500 5000
    1800 6800
    1900 8700
    how can it be achieved. I tried using Lead and lag. but only I can add the n+1 or n-1 results. Please help.

    I've never heard it called 'triangular numbers' before but I think you're looking for a 'running total':
    SQL> WITH data AS
      2  (
      3     SELECT 1000 AS num FROM dual UNION ALL
      4     SELECT 1200 AS num FROM dual UNION ALL
      5     SELECT 1300 AS num FROM dual UNION ALL
      6     SELECT 1500 AS num FROM dual UNION ALL
      7     SELECT 1800 AS num FROM dual UNION ALL
      8     SELECT 1900 AS num FROM dual
      9  )
    10  /* END SAMPLE DATA */
    11  SELECT num, SUM(num) OVER (ORDER BY num) AS running_total
    12  FROM   data
    13  ORDER BY 1
    14  ;
           NUM RUNNING_TOTAL
          1000          1000
          1200          2200
          1300          3500
          1500          5000
          1800          6800
          1900          8700
    6 rows selected.

  • How to post the Down payment for assets using the investment measure?

    Hi,
    We want to post the down payment using the investment measure for some of the assets. Please tell me how to post it and how to clear it.
    I have searched the net but till now I am unable to find something with which I can do that.
    Thanks in advance...
    Regards
    Nitin

    Hi,
    Please reply as I am facing problems with posting the down payments using the investment measure and I have tried and read alot but nothing as such I have been able to found.
    Thanks and Reply
    Nitin

  • Issues when we try to lookup for EJB using T3 protocol

    Hi,
    We have EJB's deployed in Weblogic server and we are trying to invoke them using T3 protocol.
    We are facing problem as its giving the following exception
    javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://170.0.10.45:7685: Bootstrap to dev2.test.zone/170.0.10.45:7685 failed. It is likely that the remote side declared peer gone on this JVM];
    We tried to enable HttpTunneling in Weblogic server but it did not work.
    Could anyone suggest solution for this at the earliest. Not sure whether this is a cluster issue .

    We are trying to connect to service and EJB from our local weblogic portal
    Client Server Info
    Weblogic version 9.2
    jdk1.5
    Server Info
    Weblogic version 9.2
    jdk1.5
    In properties file we have delcared the EJB client URL : t3://IP:7685
    code
    private static final String CLIENT_EJB_KEY_PREFIX = "ejbclient.";
    private static final String CLIENT_EJB_JNDI_NAME_SUFFIX = ".remoteJndiName";
    try {
    String className = cls.getName();
    String key = CLIENT_EJB_KEY_PREFIX + className + CLIENT_EJB_JNDI_NAME_SUFFIX;
    LOG.debug("Looked up key of {} for className: {}", key, className);
    String jndiName = cfg.getString(key);
    System.out.println("Inside getHome Method : Jndi Name"+jndiName);
    if (StringUtils.isEmpty(jndiName)) {
    System.out.println("Inside if");
    throw new ServiceNotAvailableException("Unable to locate JNDI key of %s for class %s", key, className);
    Hashtable<String, String> env = new Hashtable<String, String>();
    env.putAll(context.connectionEnv());
    Context ctx = new InitialContext(env);
    EJBHome home = (EJBHome) ctx.lookup(jndiName);
    return home;
    } catch (NamingException cause) {
    throw new ServiceNotAvailableException(cause);
    The call to EJB is failing because it is not able to communicate using T3 protocol.

  • How do I setup 'local' dns lookups for hostnames using DHCP server on WRT610N?

    Said router with latest firmware has DHCP reservation setup with reserved clients names mapped to specific MAC addresses/IP addresses.  I'd like my clients (a mixture of Mac and W7) to access mapped devices via hostnames and not IP addresses.   I have static IP address provided by my ISP configured on the router with it's corresponding ISP DNS server addresses.  FYI, the DHCP server DNS settings on the router are masked out (can't be changed) on the router and looks to be inherited from the Internet setup (in which I've entered the DNS IP addresses of my ISP's DNS).
    On my clients, nslookup (or equivalent) clearly specify that the DHCP is pumping out the DNS servers from the ISP.  Why would it not look for the reserved client hostnames first?
    I know I can setup local /etc/hosts (or equivalents) or override the DNS and point to the router's IP address on the clients but I'd rather not - that's a lot of maintenance.  I can also setup an internal DNS server, but again, overkill. 
    Is this feature available on this router or am I doing something wrong?  An aging integrated Westell 327W DSL model/router used to be able to provide internal network DNS - but this more modern capable WRT610N router does not?  Thoughts?   Thanks.

    Well its not possible to access the storage driver using the host name.. You can access the storage driver using only the IP address. As the Linksys Router doesn't work on a Host Name.

  • How to turn the video on for skype use

    When I am on skype, people can't see me. What do I have to do?

    You may have to download and install the "latest" version of Skype from their website, then shut Skype down and restart it.  That may solve your problem.
    Hope this helps

  • Problems with JNDI lookup for java:comp/env/ejb

    Hi all,
    I'm using OC4J 9.0.3 and I have problems when looking up for the local
    EJB context.
    I have a SLSB which refers to another SLSB via a JNDI mapping like
    shown below. Both services are deployed within one EAR file.
    (snippets of ejb-jar.xml and orion-ejb-jar.xml)
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>ServiceABean</ejb-name>
    <home>com.coi.ServiceAHome</home>
    <remote>com.coi.ServiceA</remote>
    <ejb-class>com.coi.ServiceABean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-ref>
    <ejb-ref-name>ejb/some/sub/packages/ServiceB</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.coi.ServiceBHome</home>
    <remote>com.coi.ServiceB</remote>
    </ejb-ref>
    </session>
    </enterprise-beans>
    </ejb-jar>
    <orion-ejb-jar>
    <enterprise-beans>
    <session-deployment location="global/some/sub/packages/ServiceA" name="ServiceABean">
    <ejb-ref-mapping name="ejb/some/sub/packages/ServiceB" location="global/some/sub/packages/ServiceB" />
    </session-deployment>
    </enterprise-beans>
    </orion-ejb-jar>
    The ApplicationInitialContextFactory will be used (prepared by the container),
    so the lookup for ServiceB within a method of ServiceA should work as follows:
    public class ServiceABean implements SessionBean
    public void someMethod()
    InitialContext con = new InitialContext(); // will be of class ApplicationContext
    Context localEjbContext = (Context)con.lookup( "java:comp/env/ejb" );
    ServiceBHome serviceBHome = (ServiceBHome) PortableRemoteObject.narrow(
    localEjbContext.lookup( "some/sub/packages/ServiceB" ),
    ServiceBHome.class );
    The problem is now, that the lookup for "java:comp/env/ejb" doesn't work
    and throws a NameNotFoundException.
    To figure out what's actually happening during lookup I debugged a little bit and
    tried a few things:
    1. A lookup for "java:comp" works fine. It returns an instance of class FlatMapContext
    which consists of a hash map which itself contains an entry for "env".
    2. So a lookup for "env" on that FlatMapContext also works and returns an instance of SubContext.
    3. A lookup for "ejb" using this SubContext causes a NameNotFoundException
    with message "java:comp/env/ejb not found".
    4. A lookup like con.lookup( "java:comp/env" ) throws also a NameNotFoundException
    with message "java:comp/env not found (not inside a J2EE module, for instance a Web-App,
    EJB, or Application-Client)".
    Does anyone know something about this?
    Regards
    --thomas

    Hi Debu,
    Great! 9.0.4 will be released in june/july this year, right? Sorry for my ironical reaction, but does that mean, that I don't have any chance to get my whole stuff running in 9.0.3? I cannot believe that. Isn't there a wordaround I could apply? A setting or whatever to substitute the daft FlatCtx by something else that is implemented according to the spec?
    Regards
    --thomas

  • How to write the Business Process

    Can anybody please give me the link on How to write the Business Process for <b>IC_C03</b>... we have done the blue print and going to write the documentation for this info provider.
    So please provide the related links..........

    Probably the best thing to do is go to your boss/team lead/project manager/client contact and ask them what documentation they want you to produce and what should go in it.  No-one here can guess at that.
    Gareth.

Maybe you are looking for

  • Macboor air 13 late 2010 freezes when wake from deep sleep

    Hi. I have had this problem for a few months and still havent found a solution. This macbook air freezes and is totally unresponsive for five or six seconds when it wakes from deep sleep. I have tried: 1 Apple hardware test, which came up negative. N

  • Edit the release date of a podcast ?

    Hello everyone ! I have a question regarding iTunes and podcasts management. I really enjoy a specific podcast, which I follow from a few monthes. A friend of mine has given me the whole archives of the show, from more than two years, as plain mp3 fi

  • First single-boot Linux, in the future multi-boot after addition of Windows

    The given hardware setup is 32Bits Pentium 4 with blank SATA HDD and BIOS. GPT is in seek on that HDD, not MBR. As next it will be setup to single-boot system with Linux. Means amongst others the disk is to be partitioned. However it is unclear if Li

  • Music skips when running slideshow in iPhot0 8

    I created a slideshow in Iphoto 8 and when I play it any music I select from Itunes (burned from a CD and not purchased on Itunes) skips about every 10 seconds. I've tried several songs and they all do the same thing. When I play the same songs on It

  • Why do my files print as a thumbmail from Photoshop CS4

    Recently using Adobe Photoshop CS4. My files started printing as thumbmails only. I believe it is a known glitch in the program. Is there a way to work around it?