Semaphores and IPC

Hi, I am trying to figure out if the Java 5 Semaphore class is not just thread-safe, but also "process-safe". IOW can it be used across processes?
TIA

By process do you mean separate JVMs? Then the answer is no.
If you mean multiple CPUs, then the answer is yes.

Similar Messages

  • What is semaphore and shared memory

    Hello Gurus,
    what is Semaphores and shared memory. what is the use of setting the parameter
    SHMMAX
    SHMMIN
    SEMMIN while installing Oracle software in Linux
    Regards
    Hameed

    Hello,
    I would advise you to review Oracle Metalink Document: Semaphores and Shared Memory - An Overview : Doc ID: Note:153961.1.
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:12007188755102069423::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,153961.1,1,1,1,helvetica
    Oracle Metalink Document: TECH: Unix Semaphores and Shared Memory Explained Doc ID: Note:15566.1.
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:12007188755102069423::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,15566.1,1,1,1,helvetica
    Additionally you can review Oracle Metalink Document: Linux: How to Check Current Shared Memory, Semaphore Values Doc ID: Note:226209.1.
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:12007188755102069423::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,226209.1,1,1,1,helvetica
    Hope it helps.
    Adith

  • Semaphores and shared memory's classes

    Hi there,
    I looking for the classes used to deal with semaphores and shared memory. Does anyone know which are these classes?
    Thanks

    The file mapping capability added in 1.4 may result in shared memory but this is not guaranteed. You can use JNI to call some C code which allocates shared memory and then uses the NewDirectByteBuffer method to return a ByteBuffer representing that shared memory to the Java code.
    You would also need to use JNI to wrap system provided semaphore or mutex operations to provide cross process synchronization.
    However, do your communication needs really require performance in excess of that available using sockets? I can get at least 7MB/s between two processes on a rather modest machine.

  • CRM 5.0 and IPC Configuration

    Hi All,
    we are using CRM 5.0 and want to configure IPC for Internet sales. Can someone give me the IPC configuration guide for CRM 5.0 (as IPC is integrated in it). We are using CRM as standalone without R/3.
    Thanks & Regards,
    Vikas
    [email protected]

    Vikas and Nirmal,
    As IPC is already there with CRM 5.0, you just need to start it...
    See OSS note 854170 for details about starting and some configuration information on IPC...
    Thanks,
    Manoj

  • Using SQL Developer and IPC connection

    SQL Dev 1.0.0.15 on Windows XP
    On the windows PC I am run SQL Dev on I have a Listener & tnsnames setup to use an IPC connection. I did not have the listener setup to use a protocol of TCP. The connection to the db worked fine via sql+. Also I have toad on this PC and it worked just fine via the IPC connection.
    I installed SQL Dev and tried to use the IPC connection. It did not work. I kept getting the message of "unable to access the network adapter" or something close to that. The message made sense as an IPC connection does not use the Network or Network adapter.
    I ended up setting up the listener to listen for both IPC and TCP and SQL Dev worked.
    My question is does SQL Dev use only the JDBC thin driver as it is my understanding the thin driver must use TCP. And is there a method to allow SQL Dev to use an IPC connection.
    Here is my currect listener and tnsnames. SQL Dev I simple listed the parms to connect via TCP in the basic tab of the connection dialog.
    listener=
    (description=
    (address_list=
    (address=(protocol=tcp)(host=localhost)(port=1521))
    (address=(protocol=ipc)(key=to2))
    sid_list_listener=
    (sid_list=
    (sid_desc=(sid_name=to2)))
    tnsnames:
    to2.world =
    (description =
    (address = (protocol=ipc)(key=to2))
    (connect_data = (sid=to2)))
    Thanks

    As packaged, sql dev uses the thin driver.
    I believe that it is possible to dump the thick driver in its place (most likely in jdbc/lib) and use that with the advanced connection tab. I have yet to see anyone submit instructions on how to do it, so I am not of much help beyond saying that it is possible.

  • How best way to handle TaskCancellationException inside a Semaphore and Loop

    I'm having an issue using HttpCLient.GetStringAsync().
    I'm using a SemaphoreSlim to limit to one request by time... something like this:
    const int MAX_REQUESTS = 1;
    var semaphore = new SemaphoreSlim(MAX_REQUESTS);
    Func< IEnumerable<City>, Task > getDetailsAsync = async (cities) =>
    await semaphore.WaitAsync();
    try
    foreach (City c in cities)
    string result = null;
    string url = "MyUrl";
    try
    using (HttpClient client = new HttpClient() { Timeout = TimeSpan.FromSeconds(5) })
    Debug.WriteLine("Consulting: " + c.code);
    result = await client.GetStringAsync(url).ConfigureAwait(continueOnCapturedContext: false);
    catch (TaskCanceledException e)
    Debug.WriteLine("TaskCanceledException: " + e.Message);
    catch (Exception ex)
    Debug.WriteLine(ex.Message);
    if (result != null)
    // Save on local Database
    catch (Exception ex)
    Debug.WriteLine(ex);
    finally
    semaphore.Release();
    var tasks = cList.Select(m => getDetailsAsync(cities));
    await Task.WhenAll(tasks.ToArray()).ConfigureAwait(false);
    When the user clicks the button, it goes to this code above and gets the response from server.
    The problem is that sometimes "TaskCanceledException" is catch... and when this happens, the app has a strange behavior:
    apparently,
    it doesn't stop running... my indeterminate progress bar keeps running, but I can't interact with anything on screen, like button or pivot swipe.
    I made a search on internet and I believe that this may be deadlock.
    But how can I handle this exception, to continue the loop to the next city? 
    Thanks!!

    Hello,
    It seems you want to access web url one by one using HttpClient, but sometimes the app will throw TaskCanceledException and you don’t cancel it, is it right? Please correct if I have any misunderstanding.
    Can you submit a repro project for test? I have trouble to reproduce your problem. User your OneDrive and share a link here.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • ISA and IPC

    hi
      I got the assignment to display the ipc component like subtotal,fright charges  in jsp page of isa.(SAP E-Commerce
    5.0) . But I am not able to find how to do it. the arrangement of the system is as given below.
    ECC 6.0 as sap R/3 and sap b2b isa framework (SAP E-Commerce 5.0) as the front end.
    I am a java programmer so I dont have that much idea about the architecture.
    I tried to create object of type TcpDefaultDocument
    by importing the following class.
    <%@ page import
    ="com.sap.spc.remote.client.object.imp.tcp.TcpDefaultIPCDocument" %>
    and calling the following method on that object
    getSubtotal(PricingCustomizingConstants.ConditionSubtotal.SUBTOTAL_1)
    but there I am getting the problem with the constructor.
    Is IPC component  is available in ISA frame work or we have to use
    IPC seperatly in web server. what is the class we will have to import to that we can create the objects
    or we wil have to create a seperate BOM.
    Thanking in great anticipation.
    Edited by: akmishra.1 on Jun 16, 2011 6:45 PM

    Hello Bala,
    Regarding your first question, AFAIK, the userexit logic of pricing should be developed in IPC pricing routines and uploaded to the SAP system with appropriate userexit assignment.
    About the second question, I am not very clear on what is the requirement? Do you want to modify certain data before a document is actually created/simulated in the SAP system? In this case, there are some enhancement points in the FM SD_SALESDOCUMENT_CREATE. This is what I used to modify/add/delete some data before the basket data is simulated or created as a quotation/order in the SAP ECC system.
    Pradeep

  • MUP always fails to run with spurious folder access and IPC issue.

    Dear Mobile Heroes,
    Every time I run a MUP on our Mobile Sales Application, the MUP fails
    during the first folder copy (MSA\Layout). The log gives an incorrect
    description of the error saying that the layout folder cannot be
    accessed. The actual issue, and manual fix, is to go to
    C:\program files\sap\mobile\tpsfiles and in properties uncheck
    the "read-only" flag and cascade the change to all subordinate files. I
    also need to kill the "IPC Start" process. After doing this, I can run
    the MUP successfully.
    What is the SAP fix for this? Is there a new
    ClientUpgradeTarget.exe   to prevent all this nonsense?

    Hi Rohit,
    We are running Mobile Client 70SP4, the ClientUpgradeTarget.exe has a date of 16/07/2009 (size 436kb).
    Regards,
    Richard

  • Author Flag and IPC

    Hello All,
    Our project involves usage of IPC along with IS- A-VMS . My understanding is that for a configurable material with characteristics, each Characteristics will have a Author Flag attached to it. The author flag is set by IPC and passed back to SAP.
    Can some one explain what is meant by an author flag and how does the IPC influence this Auhtor Flag? Please reply back at the earliest to my yahoo is [email protected]
    Please treat this urgent.

    No
    a specific photo can only exist in one event
    If you duplicated the photos in the source event then flagged the new one (actually either one) you could do taht - you would, of course double the storage used for those photos winch there are now two of each - and any edits, =delete, etc would only operate on the one you did it to leaving the other copy alone (maybe what you intend?)
    LN

  • COMMR01 and IPC

    Folks,
    Is there any way I can bypass the IPC for the COMMR01 transaction ? I see the COMMR01 is calling the IPC and I would like it to bypass it. Any suggestions ?
    Faz

    Hello Faz,
    I guess IPC is called because you are maintaining configurable products. As product configuration is done by IPC, it is called from COMMPR01.
    Anyway if you want to by-pass the IPC calls from CRM just refer to SAP note 702735 for all prerrequesites to do that.
    regards, Patricia

  • CRM 5 and IPC

    Hello all,
    I'm wondering if IPC 5 ( or 4 )  is installed by defalut in MySAP
    CRM 5?
    under j2ee folder i can see a folder " crm-ipc"? what is this folder and can i use ipc ? is that meaning that ipc was installed during crm instal?
    iF not what components should i download to install it
    a server?
    a patch?
    sapinst?  wich one exacltly?
    wich version ?
    thank you a lot..and excuse me i'm new to sap CRM world and i passed hours searching elp on net and crm docs.
    A lot of points if you help me!
    Message was edited by: Blackman
    Message was edited by: Blackman

    Hi Blackman,
    No separate installation is required for IPC in CRM 5.0.
    In 5.0, there is very minimal basic configuration for IPC (compared to 4.0). The configuration documents are available under service marketplace.
    regards,
    thnx
    but where in market place, i only find docs related to IPC for CRM4 ..?
    what is there to configure to make ipc webapplication work?
    many thnx and pts

  • Screen scraping and IPC

    Hi there,
    We have a mainframe emulator which is implemented as a webapp. This webapp gets some data from mainframe say reservation #.
    I tried creating a browser portlet for the webapp (mainframe app).
    Now, there are 4 other JPF portlets which listen to the above webapp or browser portlet for reservation # . I' guess there is no way to share the data between browser portlet and other portlets. (Plz correct me if I'm wrong).
    My question is:
    1. Is there any way I can pass the data retrieved from external webapp into my portal framework i.e to other portlets
    2. Will Screen scraping or streaming web page content help in this scenario.
    Plz share your thoughts. Appreciate any help.
    Thanks,
    Sid

    Sid,
    It is possible, but you need to 'suck' the data from the mainframe app
    into a JSP-portlet. You can do this in the backing context of the
    JSP-portlet.
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.beehive.netui.pageflow.PageFlowController;
    import org.apache.beehive.netui.pageflow.annotations.Jpf;
    import org.apache.beehive.netui.pageflow.Forward;
    import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils;
    @Jpf.Controller(simpleActions = { @Jpf.SimpleAction(name = "begin", path
    = "retrieveParams.do") })
    public class PfIpcTestController extends PageFlowController {
         private static final long serialVersionUID = 1961633610L;
         @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path =
    "displayParams.jsp") })
         public Forward retrieveParams() {
              HttpServletRequest request =
    ScopedServletUtils.getOuterRequest(getRequest());
              String cloneMessage = request.getParameter("_cloneMessage");
              CloneMessage msg = new CloneMessage();
              if( cloneMessage != null )
                   System.out.println("Inside retrieveParams: cloneMessage="+cloneMessage);
                   msg.setTheMessage(cloneMessage);
              else
                   msg.setTheMessage("No clone message received as URL parameter");
              Forward forward = new Forward("success");
                   // Adding the message as an output form isn't strictly
                   // required but is handy if another application (or this
                   // pf) wants to register a handler on this action and
                   // get this payload
              forward.addOutputForm(msg);
              forward.addActionOutput("_cloneMessage", msg);
              return forward;
         * Callback that is invoked when this controller instance is created.
         @Override
         protected void onCreate() {
         * Callback that is invoked when this controller instance is destroyed.
         @Override
         protected void onDestroy(HttpSession session) {
         @Jpf.FormBean
         public static class CloneMessage implements java.io.Serializable {
              private static final long serialVersionUID = 838010769L;
              private String theMessage;
              public String getTheMessage() {
                   return theMessage;
              public void setTheMessage(String theMessage) {
                   this.theMessage = theMessage;
    This way you clone the content of the original page, and bring it in the
    context of the WLP. Now you can create IPC. The only thing you need to
    do is to post the user clicks back to the backing file which the submits
    the correct values to the mainframe app.
    Best Regards,
    Frank van den Nieuwboer
    Hi there,
    We have a mainframe emulator which is implemented as a webapp. This webapp gets some data from mainframe say reservation #.
    I tried creating a browser portlet for the webapp (mainframe app).
    Now, there are 4 other JPF portlets which listen to the above webapp or browser portlet for reservation # . I' guess there is no way to share the data between browser portlet and other portlets. (Plz correct me if I'm wrong).
    My question is:
    1. Is there any way I can pass the data retrieved from external webapp into my portal framework i.e to other portlets
    2. Will Screen scraping or streaming web page content help in this scenario.
    Plz share your thoughts. Appreciate any help.
    Thanks,
    Sid

  • Semaphores and queue together. Is it necessary?

    Hello.
    I am using a State Machine driven by queue, using a For Loop to enqueue three States that have to be executed in sequence. The code is working fine but when I run it in Highlight Mode is possible to see that the "State 1" of the State Machine start running while the For Loop (which enqueue the elements) is still running. Is this kind of code safe?
    I mean, for this example everything is working fine, but if I have SubVIs running in the States of the State Machine, would not be safer to have the For Loop execution done, before start playing with the SubVIs of the State Machine? Would a semaphore help me with that? I found this thread that discussed similar things, but I still thing that would be safer to have the For Loop done and just after that start running the State Machine.
    What do you thing guys?
    Thanks
    Dan07
    Message Edited by dan07 on 04-17-2010 02:59 AM
    Attachments:
    Enqueue.vi ‏16 KB

    Good question dan!
    The code you are explaining is "SAFE".  and seems like a good implementation of a basic "Producer-comsumer archetecture"  Your UI stays responsive while the consumer loop does all the data manipilations.  A very positive point.
    I am a bit concerned about scaleability of the code since you have added a programatic "flush queue" in the consumer loop.  It does what you want today but, what if you add a state that enters from another event?  the flush queue tosses that element out too.  and you might really want to do what the operator asked.  I would do the time check in the producer loop (not much code to slow things down - just a timer call and a comparison right?) and determine if its correct to queue up the time based state(s).
    Then again- I'm struck with the need for a time enabled state-  will the operator expect the code to behave differently at different times?   It is possible but, questionable. 
    By-the way.
    you can exit the consumer loop based on the error out of the dequeue element.  it returns when the queue is destroyed or when there is an element.
    Message Edited by Jeff Bohrer on 04-17-2010 03:39 PM
    Message Edited by Jeff Bohrer on 04-17-2010 03:41 PM
    Jeff

  • What are (SCE,SPE and IPC)????????????????????

    Hello All
    I want to know what is the use of these components and when I can use them
    Sales configuration engine (SCE)
    Sales pricing engine (SPE)
    Internet pricing configuration engine (IPC)
    Thanks in advance
    Jacopo François

    Hi,
    IPC stands for Internet Pricing and Configurator. It is a tool that may be used in a stand-alone mode or in conjunction with R/3 or with CRM. It has two major components, namely the pricing engine (SPE - Sales Pricing Engine) and configuration engine (SCE - Sales Configuration Engine). The IPC connects SPE and SCE to offer configuration with full pricing capabilities. These
    engines work stand-alone or as an integrated package. Stand-alone means that the IPC can work off-line
    from the backend systems (R/3 or CRM) while you configure and price products - this enables you to integrate the IPC in any software environment where you need to apply configuration and pricing.
    The IPC can utilize the data and models established in R/3. This information can then be transferred by
    data downloads or replication to the IPC database. This information is generally divided into two sections as identified by Pricing Data and the Knowledge Base (KB). The KB essentially contains master configuration data.
    As of Release 30 configurable products can be created in CRM using PME, product modeling environment.
    A set of standard user interfaces (UI’s) are supplied with the IPC and hence are immediately available
    for use. Since the IPC and its components are written in JAVA and based on Application Programming Interfaces (API), the UI’s are modifiable as well.
    The configuration engine (SCE) and the pricing engine (SPE) form the basis of the IPC. Both engines are
    encapsulated in the IPC server and delivered as a whole.
    Relevant data needed by these engines is provided from the knowledge base or the sales and distribution
    application in R/3 SD and/or CRM.
    http://help.sap.com/saphelp_crm50/helpdata/en/12/9efb373c63dd05e10000009b38f8cf/frameset.htm
    Best Regards,
    Ramesh.

  • Semaphores and SubVIs

    Okay gang, I'm trying to break my program down into 4 subVIs and running into a snag. In my main vi I create a semaphore, which is passed to a subVI where within this subVI the semaphore is both created and released.
    It is not working properly. I read that you cannot used a created semaphore in more than one instance, so does that mean if I create the semaphore in my main VI, I can't lock and unlock it in the subVI code?
    Thanks!
    -- Jason Pugh

    I assume you're referring to creating a semaphore control/indicator. The easiest way of creating a semaphore control is from the semaphore functions. Right-click on the "Acquire Semaphore" subVI's "semaphore" input and select "Create -> Control".
    You can have the "main" VI try to acquire the semaphore as well as the subVIs. If you start with the example I mentioned previously, you can take the code of one of the subVI and place it right in the main VI. Then, just connect the semaphore wire to the loop's tunnel and run the main VI. Now there will be a fourth graph on the main VI that gets updated along with the three subVIs.

Maybe you are looking for

  • Open Orders Report.

    Hello, Can anyone give me the code for the open orders report??Using the tables VBAP,VBAK and VBUK. Thanking you in anticipation. Regards, Sirisha.

  • How to determine the maximum allowable length of a filename for Window ?

    Hi all, Could I know how to determine the allowable file length (the length of the absolute path) for a file in Window environment? Due to some reason, I generated a zip file with a very long filename ( > 170) and put in a folder(the length of the fo

  • Real Time Application of  Void class

    Dear Friends, we know that there is class called Void with one field named TYPE. where can we apply this class?

  • Macbook pro has a trojan

    Yeah if you are a noob who thinks your macbook is not vulnerable and you cannot get trojans don't bother responding. Even though I declined those pop up adds and said no to download, I still acquired a trojan and my pro is running extremely sluggish

  • Disable ESC in Air 1.5

    greetings...i'm trying to disable the ESC key from closing/resizing/exiting my air app...my app iss built entirely with html/javascript...can someone please provide the code snippet needed to accomplish this?...thx!