Is creating InitialContext an expensive process?

hi guys
i have a question about the initial context. you see, i need to look up several EJBs from different servers. so i need to set up correct URL in the context when i want to lookup EJBs that are deployed on that server, i also need to change the url to a different server in order to lookup other EJBs. so, is it logic to have seperate initialcontext initialized for each server url from the start, or create it as i need it along the way.
right now, what i did is in the servicelocator class, i have a lookupHome method that takes url, ejbName and class as parameters. so, it will check the cache to see if there is already a home object, if not, use the url to create a context and lookup with the ejbName. i don't know if this is very costly. thanks

It is costly to have EJBs on different servers.
(First Law of Distributed Object Design: Don�t
distribute your objects)this is out of my hand. we have EJBs all over the place.
As for the initial context per say, it is a
resource-intensive operation, otherwise there would
be no need for Service Locator. i thought the service locator is used to cache the home or remote objects since they are costly to get.
The difference between eager and lazy lookups is not
that important, as long as those lookups are cached.so what are u trying to say? should i cache the context as well for each server?

Similar Messages

  • Can i create production order using process material ?

    Dear All.
    Please help me.
    I want to create production order using process material (material type is PROC).
    For may knowledge, process order is standard for the process material, but my customer want to use the PP module for the process material.
    But I cant convert the planned order of precess material to production order in MD05.
    The system message is "System does not support planned orders for process materials."
    The followings are my test steps.
      1. Master Creation
          - Material Master, BOM, ROUTING
    In standard, process material (Material Type : PROC) need creation of master recipe. But due to my clients need (Using production order
               for the process material), I create the work center and ROUTING
      2. DM Creation
          - In MD61, I create the planned independent requirement (Type : LSF)
      3. Planned order creation for the process material using MRP
          - In MD01, I run the total MRP, the the planned order is created.
            It's order type is "LA"
      4. Converting the planned order to Production Order
          - In this step, the system give the error "System does not support planned orders for process materials."
             and can not do anything.
    I want to know that the above case is possible, and how.
    Please Help meu2026..

    Hi
    First of if yur want to create production order or process order why do you go for material type :PROC.
    you can create the same material as FERT & go ahead.
    I do not understand the logic to select the material type as PROC.
    Pl. go through SAP library where PROC is used.
    Regards
    YMREDDY

  • Error creating instances in Business Process Workspace

    i have the following error:
    oracle.bpm.web.exception.WapiOperationException: Error creating instance for target process Serv_M/Proj_V!76.0*/EV.
    Caused by: BPM-70204
    Exception
    exception.70204.type: error
    exception.70204.severity: 2
    exception.70204.name: Error creating process instance.
    exception.70204.description: Error creating instance for target process Serv_M/Proj_V!76.0*/EV.
    exception.70204.fix: Verify server log to find the problem cause.
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:205)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at oracle.bpm.services.instancemanagement.ejb.InstanceManagementServiceBean_sqa2w0_IInstanceManagementServiceRemoteImpl_1036_WLStub.createProcessInstanceTask(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
    at $Proxy413.createProcessInstanceTask(Unknown Source)
    at oracle.bpm.papi.ora.util.ApplicationExecution11G.beginExecution(ApplicationExecution11G.java:50)
    ... 101 more
    Caused by: ORABPEL-02023
    Cannot activate block.
    failure to activate the block "EV" for the instance "30037"; exception reported is: .
    This error contained the exceptions thrown by the underlying routing system.
    Contact Oracle Support Services. Provide the error message, the composite source and the exception trace in the log files (with logging level set to debug mode).
    Help me please!
    Regards

    Hi Chris
    If you are trying to create a LOV and use that as a parameter, then you need to create LOV as Dynamic Cascading values. Once created then you can use that LOV in the Crystal Reports.    
    This is the best way to get dynamic cascading prompts in Crystal reports.
    Please refer to Business View Admin guide for more information.
    Hope this helps!!
    Regards
    Sourashree

  • HT4168 I have created an 100 page booklet in Pages, with many photographs, can I export it to ePub, and make an electronic book, because it says that "Note: The Pages document must have been created using a word processing template"?

    I have created an 100 page booklet in Pages, with many photographs, and much written word, can I export it to ePub, and make an electronic book, because it says that "Note: The Pages document must have been created using a word processing template"?....
    Basically what I want to do is publish the document into both an eDocument, and a hard copy document. What is the best way to do this?

    No Peter, this statement came right off the Apple ePub statement when outlining how to use ePub. the full context is:
    Creating ePub files with Pages
    Summary
    Learn how to create ePub files with Pages.
    Products Affected
    Pages '09
    ePub is an open ebook standard produced by the International Digital Publishing Forum. Pages ’09 lets you export your documents in ePub format for reading with iBooks on iPhone, iPad, or iPod touch.
    iBooks supports both ePub and PDF file formats, and you can export both from Pages.
    When to use ePub or PDF
    Use ePub when text is the most important part of your document, for example when you create a book, a report, a paper, a thesis, or classroom reading material.
    More details on using ePubUse PDF when layout is the most important part of your document, for example when you create a brochure, a flyer, or a manual with multiple illustrations.
    More details on using PDF
    Creating an ePub Document to Read in iBooks
    You can export any Pages word processing document to the ePub file format for reading in an ePub reader, such as the iBooks application on the iPad, iPhone, or iPod touch. Documents created in page layout templates can’t be exported to the ePub format.
    Documents exported to ePub format will look different than their Pages counterparts. If you want to get the best document fidelity between the Pages and ePub formats, style your Pages document with paragraph styles and other formatting attributes allowed in an ePub file. A sample document is provided on the Apple Support site that features styles and guidelines to help you create a Pages document that’s optimized for export to the ePub file format, which you can use as a template or a guide. To learn more about using paragraph styles in Pages, see the topics under the heading “Working with Styles” in the Pages built-in help.
    To read your ePub document in iBooks on your mobile device, you must transfer the ePub file that you create onto your device.
    To use the “ePub Best Practices” sample documentTo learn more about using the ePub format and get a better feel for how a Pages document might appear as a book in iBooks, it’s a good idea to download the “ePub Best Practices” sample document. After reading the guidelines and instructions within the document, you can use it as a template to create your own document. You can also import the styles from the sample document into a new document you create.
    Download the “ePub Best Practices” sample document at the following web address:
    http://images.apple.com/support/pages/docs/ePub_Best_Practices_EN.zip
    Do either of the following:Use the sample document as a template.Import the paragraph styles from the sample document into a new or existing Pages document.
    Export the document you create to ePub format to see how it looks in iBooks.
    Preparing an existing Pages document for export to ePub format
    Documents exported to the ePub format automatically appear with page breaks before every chapter. A table of contents is automatically generated, which allows readers to jump quickly to any chapter title, heading, or subheading in the book. In order to create a meaningful table of contents, it’s important to apply appropriate styles within your document. The ePub reader uses the paragraph styles to determine which items should appear in the table of contents for your book.
    Note: The Pages document must have been created using a word processing template.

  • Create Return Order copy from Billing created from DBM Order Processing

    Hi SAP Gurus
    I have scenario where the user requested to create return order based on Billing created from DBM Order Processing.
    I know that, we can create return order from DBM. but the function copy based on order. the user is requested to do return
    by billing document ( function as SD )
    is this requirement can be done in SD VA01 where the user can copy the billing created from DBM and create return order using SD function

    Hi,
    in DBM you regulary have mulitiple invoices per order (due to split).
    You either can cancel an certain invoice and adapt the order or create a returns order based on an given order where you can select certain (e.g. invoiced) items.
    BR

  • How to create InitialContext for JNDI lookup in a cluster?

              I am new to clusters in WL7 and I wanted to know how a client would create an InitialContext
              object to perform a JNDI lookup for a remote object deployed across serveral servers
              in the cluster. Is the following correct?
              Physcial Servers in the cluster
              machine1:9001
              machine2:9001
              machine3:9001
              Code for creating InitialContext
              Properties p = new Properties();
              p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              p.put(Context.PROVIDER_URL, "machine1:9001,machine2:9001,machine3:9001");
              Context c = new InitialContext( p);
              Thanks,
              Raffi
              

    Hi Ivaylo,
    There's another alternative solution to your problem. You can have the screen 120 as a user-defined selection screen. i.e., instead of creating this screen through the screen painter, you can create it from within your ABAP Program. This way, you can directly use the SELECT-OPTIONS statement within your screen. You then will no longer have to bother about how to handle the data for the field.
    Especially in the case where your screen 120 has few elements, this approach, in my opinion, will be the best.
    Please let me know if you need any further clarifications on how to go about it if you choose to follow this approach.
    Regards,
    Anand Mandalika.

  • How to create parent and chile process in java

    i'm beginning in java, and i want to ask something, please help me...
    1. i want to ask how to create parent and child process in java???
    example :
    if have one window and explore menu, when i click the explore menu.
    new window come out.
    how if i close the parent window the child window will close too...
    2. what is the method from runtime class to get available memory and Active Threads count

    ONE way to do what you wanted is this.
    class Parent{
    Child c = new Child
    allChildren.add(c);
    //if close
    iterate through list
    (Child)allChildren.get(index).close();
    ArrayList allChildren;
    class Child{
    public void close(){ }
    i dont know if you can get the thread count. but you can
    get the current thread by using System.
    Memory: Runtime.freeMemory() .maxMemory() .totalMemory()
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    Careful though you have to do a calculation to get the
    actual memory because those 3 methods refer to freeMemory
    of the CURRENT heap not the total memory.
    i think its: total - (max - free)

  • How to create Handling Unit using Process Order no. & Packing Instruction

    Hi experts,
    Please guide me how to create Handling Unit using Process Order number & Packing Instruction reference?Noramlly this is done using standard transaction 'COWBPACK'.
    ANY FUNCTION MODULE OR BAPI TO DO THIS.
    if any solution please explain with proper example..
    Thanks In advance
    Thanks,
    Yogesh

    Hi experts,
    Please guide me how to create Handling Unit using Process Order number & Packing Instruction reference?Noramlly this is done using standard transaction 'COWBPACK'.
    ANY FUNCTION MODULE OR BAPI TO DO THIS.
    if any solution please explain with proper example..
    Thanks In advance
    Thanks,
    Yogesh

  • When creating a travel expense, an incorrect input tax code is defaulted

    Dear experts,
    I'm new with SAP customizing in Travel Management. I have an issue that I cannot solve and I've tried almost all possibilities.When an employee tries to create a travel expense in PR05, him being from Belgium, the default input tax code for any expense type is, for example V3. This code exists in FI and will be transferred correct into accounting. But, if the employee wants to change the the country key in the field Country of Receipt (found in additional info section), anything other than the domestic country (BE) will automatically change the input tax from V3 to V0, which we don't even have in FI.
    I tried the following:
    - checked under global settings and for Belgian trip provision variant there was always Input Tax per Travel Expense Type flagged and V3 with cocd BE;
    - checked each and every expense type for the default input tax and all have V3.
    I had to create a country grouping EU for all European Countries. All maximum rates for different expense types have been defined using this EU code. Might it be this grouping?
    Any new expense type, similar to any of the ones I have problems with, will keep the default V3 tax code no matter if I change the country of receipt.
    Thank you in advance guys,

    No need anymore for an answer, I found out what I was looking for under Define Country-Dependent Default Values for Expense Types

  • How  to  create  adhoc  chain  in process chain

    how  to  create  adhoc  chain  in process chain

    hi,
    ad hoc process chain is also the process cahin which will run seperatly from main chains.
    as you do for process cahin create it also.
    Process chain creation
    http://help.sap.com/saphelp_nw04s/helpdata/en/67/13843b74f7be0fe10000000a114084/content.htm
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    Ramesh

  • How to create info area for process chains?

    How to create info area for process chains?

    Hi,
    If I understand your question clearly, you want to assign display componets.
    once you have created you chain you assign the components by clicking CTRL+F11
    Regards,
    Namrata

  • Instances is not creating for 10g BPEL process but Polling is happening

    Hi All ,
    I am using Jdev 10.1.1.3 .
    I created a process to poll data from DB adapter. Polling is happening (i mean in the DB, status is moving from unread value to read value), but after deployment, no instance is creating for my bpel process. Please help me out for my issue. Thank you in advance
    Regards,
    Kotresh

    Please post BPEL related queries in BPEL forum -
    BPEL
    Regards,
    Anuj

  • Exception trying to create InitialContext

    I am using the following code for trying to post a message to JMS queue using JDeveloper 11.1.1.5. Sometimes i get exception at the step of creating InitialContext.
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL,"t3://xxxx:yyyy");
    env.put(Context.SECURITY_PRINCIPAL,"username");
    env.put(Context.SECURITY_CREDENTIALS,"password");
    Context jndiContext = null;
    try {
    jndiContext = new InitialContext(env);
    } catch (NamingException e) {
    System.out.println("Could not create JNDI API context: " +
    e.toString());
    System.exit(1);
    When i run the above code i get the following exception(seen in log window)
    Could not create JNDI API context: javax.naming.CommunicationException [Root exception is weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason: ]
    When i checked the request and response using http analyzer the response is as follows.
    JDeveloper HTTP Analyzer encountered an error retrieving:
    CONNECT https://140.84.233.133:8001 HTTP/1.0
    An exception occurred while retrieving the response for https://140.84.233.133:8001.
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1293)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:65)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:50)
         at oracle.jdevimpl.webservices.tcpmonitor.model.HttpMessageBase.readLine(HttpMessageBase.java:658)
         at oracle.jdevimpl.webservices.tcpmonitor.model.HttpRequest.read(HttpRequest.java:327)
         at oracle.jdevimpl.webservices.tcpmonitor.ConnectionHandler.getResponse(ConnectionHandler.java:405)
         at oracle.jdevimpl.webservices.tcpmonitor.ConnectionHandler.run(ConnectionHandler.java:331)
    Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
         at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:523)
         at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(SSLSocketImpl.java:1916)
         at oracle.jdevimpl.webservices.tcpmonitor.ConnectionHandler.negotiateSSL(ConnectionHandler.java:707)
         at oracle.jdevimpl.webservices.tcpmonitor.ConnectionHandler.negotiateForwardedSSLConnection(ConnectionHandler.java:672)
         at oracle.jdevimpl.webservices.tcpmonitor.ConnectionHandler.run(ConnectionHandler.java:311)
    I have included weblogic.jar,wlclient.jar files in project libraries. The server is up and its listening port is running fine. Should i make any changes to my project settings?
    Any help is greatly appreciated.
    Thanks
    Sai Ram
    Edited by: 902262 on Mar 20, 2012 9:28 PM
    Edited by: 902262 on Mar 20, 2012 9:45 PM
    Edited by: 902262 on Mar 28, 2012 1:59 AM

    The explanation is probably that the weblogic.jar and wlclient.jar are not meant to be compatible. For a description of different client options, see [WebLogic Server Client Types and Features|http://docs.oracle.com/cd/E17904_01/web.1111/e13717/basics.htm#SACLT126]. I highly recommend using the "thin t3 client" option for most use cases.
    HTH,
    Tom

  • Create a Rules Language process which add a XML payload

    how to create a Rules Language process which add a XML payload in to the ICEPAYLOADEXT table??

    Take a look at this post: How to send a request from MDM 1.6.1 to CC&B using JMS servers?

  • Create InitialContext error under jre1.5

    I have a JMS client application need to run under the jre1.5 environment. I put the wljmsclient.jar and wlclient.jar into my application's . but throw java.lang.NoClassDefFoundError: com/sun/corba/se/connection/ORBSocketFactory on create InitialContext. How I can do?
    Hashtable props = new Hashtable();
    props.put(InitialContext.INITIAL_CONTEXT_FACTORY, getInitContextFactoryName());
    props.put(InitialContext.PROVIDER_URL, getProviderURL());
    InitialContext initialContext = new InitialContext(props); //here throw a NoClassDefFoundError

    z l <[email protected]> writes:
    Its not supported under 8.1. You need to use the 9.0 client which you can get by downloading the 9.0 beta.
    andy
    I have a JMS client application need to run under the jre1.5 environment. I put the wljmsclient.jar and wlclient.jar into my application's . but throw java.lang.NoClassDefFoundError: com/sun/corba/se/connection/ORBSocketFactory on create InitialContext. How I can do?
    Hashtable props = new Hashtable();
    props.put(InitialContext.INITIAL_CONTEXT_FACTORY, getInitContextFactoryName());
    props.put(InitialContext.PROVIDER_URL, getProviderURL());
    InitialContext initialContext = new InitialContext(props); //here throw a NoClassDefFoundError--

Maybe you are looking for

  • Requirement date In PO

    1. If you require clearing between the customer and vendor, the following requirements must be met: u2022     The customer number must have been entered in the corresponding vendor master record. u2022     The vendor number must have been entered in

  • Handling multiple events in web application

    We are converting a window application to a web application. We are facing an issue while implementing the web application with Java on front end and Oracle DB in back end. Consider a field with a car registration number which needs to be verified if

  • Deleted emails reappear

    I have an ipone 4S and suddenly my deleted emails reappear in my inbox.  Can someone help?  I also check email on my iPad but haven't had time to use it for a couple days so I don't know if they reappear on iPad as well.  Any suggestions on settings

  • My macbook is a mac OX S from early 2008 is it obsolete?

    my macbook is a mac OX S from early 2008 is it obsolete? 

  • Is it okay to use the mail client?

    I have not been using the mail client that came on my iMac for fear of downloading malware and other troublesome attachments that I get on my pc account. Am I being over cautious?