Federated consumer problem

Hi,
We have federated portal in our network, we done a development,using CAF<b>, Webdynpro for Java, Gp</b>.we are trying to accessing application in Producer, the application working fine, as we expected, when we accessing application from <b>remote role</b> it is showing blank page.
Thanks,
Balaji

Hi John,
Thanks for giving reply,
portal version is EP7.0 SP10,Trust relation is maintained,only GP application having this problem,all the webdynpro applications are working fine.
Thanks,
Balaji

Similar Messages

  • Time consuming problem in Self update rule

    Hi all:
         We have time consuming problem in self update rule.I have ODS ZOMS001,for this we created self update rule.In process chain we include this self update rule and during delta update,it takes 20 to 25 mins even if there is two records or 10000 records.In delta for this self update rule,it takes the whole records in ODS
        EX: If i have 10000 records during initialise and 10 records in Delta update...For the delta self update rule it takes 100010 records..But it only update delta records values.
    we have to reduce the total time consuming for this self update during delta..
    Waiting for your inputs.
    It would be helpful for your valuable reply.
    Rgds
    MSK

    I think retransporting is the only option available to you. You cannot modify anything in your production system.
    IF you have a chance to speak with basis people,ask them to open the system status to modifiable for few minutes.
    and make necessary changes in production and bring it back to normal (This is not a best practise in all situations).
    hope this helps.
    Praveen

  • Producer Consumer Problem using sockets

    Hello,
    Can anybody help me how to implement the Producer Consumer Problem using java sockets? Or any resources you've, pls forward it to me
    Cheers.

    Neg wrote:
    You just tell me if there is any means to do it.Yes, Just use a fixed length ArrayBlockingQueue on either end (or both ends) Use offer() to offer more data and this will return false when the queue is full.
    Note: the use of a Socket is entirely optional.

  • Shared memory usage of Producer Consumer Problem

    Hai,
    I am able to write the Producer-Consumer problem as a interthread communication. But I don't know how to write it using shared memory. (i.e. I wish to start Producer and consumer as a different process). Please help me, sorry for the Temp file idea.
    Thanks
    MOHAN

    I have read that in the new brightly JDK1.4 you would be able to use shared memory, but I have to confess that I'm not sure about if I'm mixing different informations (lots of stuff read, u know?). Try reviewing the JDK1.4 SE new features.
    Also, I should reconsider using "traditional" ways like RMI, Sockets, and things like those.
    Regards.

  • Data Federator ODS Problem

    Hi All,
    I´m building a scenario in SAP BO Data Federator where we connect to a table in BW (ODS) and with a jdbc connector we get the data to build a universe in UniDesigner.
    The problem is that the data returned by data federator doesnt match the data in BW, we always get less records in Data Federator when we perfom the query in data federator query tool.
    Can anyone give a clue whats happening and where to start looking? we already did a trace in BW (ST05) and the SQL statement seems to be right.
    thanks,
    Pedro

    Hi,
    I had the same ODS error when generating the databasis.
    This error we have been solved now.
    But do you know how to correct the following error:
    For Goodwill Data two indices are created which are completely identical. This leads to an error. How to solve this problem?
    Thanks for brief feedback.

  • Window s 8 consumer problem with hp laserjet p1005

    hello everyone
    today my second day with consumer preview 
    my printer was working will with developer preview
    but now
    i installed the software of hp full package and the printer where installed then i am trying to printing any page at give's me a side tap says 
    " Printing Error " 
    and not printing and in the queue says print-error 
    i tried uninstalling and reinstall ( Not working  ) 
    itried reinstall windows 8 consumer ( Not working ) 
    i aslo tried my printer on other pc ( Uses windows 7 ) to sure the printer health its worked on windows 7  and one developer preview.
    i tried microsoft fixit and hp problem detector every thing says no problem ,, but there's a problem  
    need help pls 
    thanks

    Really Thanks God
    i Found solution of this problem Randomly only by praying
    The solution
    Connect The p1005 printer to a pc have windows 7 and print a page with it and get the cable connected to windows 8 after that and go to control panel > hardware and sounds > Device and printer > hp laser jet p1005 Right click > Printer properties > ports > uncheck bidirectional support then press ok and print ,, it works
    Note : after doing the pervious steps if u turned the printer off u will need to connect it to windows 7 pc again and print and connect it to windows 8 it will work without the pervious steps //
    it seems like if windows 7 gives it information that is reseted after turn it off
    we wish windows 8 to solve this problem nearly
    That is the Original post page : http://answers.microsoft.com/en-us/windows/forum/windows_8-hardware/laserjet-p1005-will-not-print/34...

  • Producer - Consumer problem

    Hi,
    Can anyone tell me what is the problem with the below program. Its following the traditional producer consumer concept. For the first time the producer is executed correctly , followed by the consumer printing the consumed value. But for the next time, its hanging at the producer wait loop.
    Thanks in advance,
    Cochu

    Hi All,
    I found out the problem. Actually I forgot to put the getShared() method in loop!!!
    Cochu

  • Producer consumer problem - hanging

    Can anyone tell me how to fix this problem? In the code below the producer fills the queue until it reaches capacity (10) and then the consumer takes until it reaches 0 and then waits. It seems they are not running at the same time....I want the producer to be filling the queue each time the consumer takes.
    my output:
    Clerk ID: 1
    Clerk put: 1
    Clerk put: 2
    Clerk put: 3
    Clerk put: 4
    Clerk put: 5
    Clerk put: 6
    Clerk put: 7
    Clerk put: 8
    Clerk put: 9
    Clerk put: 10
    customer take9
    customer take8
    customer take7
    customer take6
    customer take5
    customer take4
    customer take3
    customer take2
    customer take1
    customer take0
    public class clerk extends Thread{
    //declare variables
    public ArrayBlockingQueue queue; //create "mailbox"
    public int number;
    /** Creates a new instance of clerk */
    public clerk(ArrayBlockingQueue q1, int num) {
    //System.out.println("Clerk created");
    queue = q1; //assign queue
    number = num; //assign number
    }//end clerk constructor
    public void run()
    long id = getId(); //get threads ID
    id = id - 6;
    System.out.println("Clerk ID: " + id); //test
    int t = queue.size(); //get size
    while(t < 10)//while the queue is not full
    try {
    queue.put(number); //add to queue
    t = queue.size(); //get size
    System.out.println("Clerk put: " + t); //test
    catch (InterruptedException e){ }
    }//end while
    //}//end for
    public class customer extends Thread {
    //declare variables
    public ArrayBlockingQueue queue; //create "mailbox"
    public int number;
    /** Creates a new instance of customer */
    public customer(ArrayBlockingQueue q1, int num) {
    queue = q1; //assign queue
    number = num; //assign number
    public void run()
    long id = getId(); //get threads ID
    id = id - 7;
    int t = queue.size(); //get size
    while(t > 0)//while there is something in the queue
    try {
    queue.take();
    int c = queue.size(); //get size
    System.out.println("customer take" + c);
    sleep((int)(Math.random() * 100));
    catch (InterruptedException e) { }
    }//end while
    //}//end for

    Your Clerk class is putting the items in the queue very rapidly (you have no sleep() call in there). Compare that to how you're throttling the Customer implementation. I'd expect Clerk to outrun it given that implementation.

  • Processing acquired data (8 simultaneous channels) in RT host (producer,consumer problem)

    Hi Gents,
    I have a Crio 9024 and two delta sigma modules NI 9234, I have to acquire 8 cahnnels simultaneously at 51,2 kHz from FPGA and transfert this data via DMA fifo to the RT host for proceesing (FFT for all channels and send data to a host computer via a stream network). I succeed to do this with 25,6KHz as sampling frequency but when I tried with 51,2KHz (my goal) I had problem because in RT code I have a producer loop receiveing data from fpga (DMA fifo) and sending this data to a consumer (Queue) loop in RT also for processing this data but the producer is to fast so the consumer loop can't proccess data in time and the queue is overflow. I have replaced queues with RT fifo,single process variable,... but no luck !!!
    Any way how to send 8 channels data from one loop to other for processing (base band FFT N channels) at 51,2KHz ???
    Please I need help !!!

    DMA Fifo:
    To avoid overflow you have to configure the RT side which has a default size of 10000 (Rio4.0 and above 2^14 elements) or doubled FPGA depth (fifo_config)
    RT Fifo:
    config example
    Read data from DMA to RT Fifo
    (read all elements available and write this data block to your RT fifo, which is configured to hold n-Blocks of size x, i.e. 300Blocks of 18432elements each)
    --> here I suggest to read a multiple of 8, because of your channel count
    Read data from RT fifo to stream
    (send data blocks to the host where each block is one element in terms of streaming buffer --> configure streaming buffer)
    Configuring large RT Fifo's has an impact on memory usage, so have an eye on it.
    Screens are just examples (not functional code)
    Hope it helps
    Christian

  • KeyEvent.consume() problem for BACKSPACE

    Hi!
    I have the following problem - I want to disable the BACKSPACE key input for a JTextArea. I�ve done it like this:
    private class MyKeyAdapter extends KeyAdapter {
    public void keyPressed (KeyEvent e) {
    if (e.getKeyCode()==KeyEvent.VK_BACK_SPACE) e.consume();
    This method works for other keys but why not for BACKSPACE? Checking if the event has been consumed with KeyEvent.isConsumed() returns "true" like it should, but the event still gets processed in JTextArea.
    Thanx in advance,
    bbruno

    Here, try the following with a document filter that filters out VK_DELETE and VK_BACK_SPACE:
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.event.*;
    public class TxtDemo extends JFrame {
       public static void main(String[] args) {
          JFrame F=new TxtDemo("Test Window");
          F.pack();
          F.setVisible(true);
          F.addWindowListener(new WindowAdapter() {
             public void windowClosing(WindowEvent e) {
                System.exit(0);
       TxtDemo(String title) {
          super(title);
          JTextArea textArea = new JTextArea(5, 20);
          DocumentFilter filter = new DocumentFilter() {
             public void insertString(DocumentFilter.FilterBypass fb,int offset, String string, AttributeSet attr) throws BadLocationException {
                super.insertString(fb,offset,string,attr);
             public void remove(DocumentFilter.FilterBypass fb, int offset, int length) {  
                // do nothing
             public void replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
                super.replace(fb,offset,length,text,attrs);
          ((AbstractDocument) textArea.getDocument()).setDocumentFilter(filter);
          getContentPane().add(textArea);
    }Here is the same version that can be cut-n-paste:
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.event.*;
    public class TxtDemo extends JFrame {
    public static void main(String[] args) {
    JFrame F=new TxtDemo("Test Window");
    F.pack();
    F.setVisible(true);
    F.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    TxtDemo(String title) {
    super(title);
    JTextArea textArea = new JTextArea(5, 20);
    DocumentFilter filter = new DocumentFilter() {
    public void insertString(DocumentFilter.FilterBypass fb,int offset, String string, AttributeSet attr) throws BadLocationException {
    super.insertString(fb,offset,string,attr);
    public void remove(DocumentFilter.FilterBypass fb, int offset, int length) {  
    // do nothing
    public void replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
    super.replace(fb,offset,length,text,attrs);
    ((AbstractDocument) textArea.getDocument()).setDocumentFilter(filter);
    getContentPane().add(textArea);
    ;o)
    V.V.

  • Unsynchronized Producer Consumer Problem

    Hi I would like some help implementing an unsynchronized producer consumer with an unbounded queue (implemented using an ArrayList) I have both the producer and consumer sleeping for random amount of time (producer wakes up faster). The problem is that sometimes the producer never gives the consumer a chance to run.
    Note I have a notify after I add stuff to the ArrayList. I dont know whether its my choice of collection object or the fact that I have not defined a wait for the producer.
    I don't know whether I have explained my problem clearly so feel free to ask some questions. Thanks

    Maybe I should not have used the word unsynchronized.
    But what I am trying to do is have the producer
    putting more objects into the buffer than the
    consumer can remove. The problem is that my producer
    does not let the consumer run ever.The basic model is like this:
    // Producer
    while (!done()) {
      synchronized(queue) {
        while (queue.isFull()) {
          queue.notifyAll();
          queue.wait();
        queue.put(next job);
        queue.notifyAll():
    // Consmer
    while (!done()) {
      synchronized(queue) {
        while (queue.isEmpty()) {
          queue.notifyAll();
          queue.wait();
        job = queue.get();
        queue.notifyAll():
        process job
    }I expect I've missed a subtlety or two in the whole get/put/wait/notify cycle--I always have to reconstruct it from scratch in my head, it's not something I carry around. It should be pretty close though and should show you the main pieces.
    As mentioned, if you use the concurrency package, some of that gunk is hidden from you.

  • Producer consumer problem - semaphores

    problem solved.
    Message was edited by:
    nasher

    The last one is 'E' a subnetmask for a private LAN of 20 machines
    Masking is at the bit level as in binary;-
    |||00000.||||||||.||||||||.|||||||| == 224.255.255.255 - mask ---> multicast
    ||000000.|0|0|0|0.||||||||.|||||||| == 192.168.255.255 - mask ---> Class 'C' Private LANS
    - or both, M-cast and Class 'C' Private LANS ;-
    ||||||||.||||||||.||||||||.|||||||| == 255.255.255.255 - which masks all IP addresses ie: all IP nos.
    - in a process called logical AND-ing ie:-
    0 + 0 = 0
    0 + | = 0
    | + 0 = 0
    | + | = |
    - So, to subnetMASK a private cls C LAN =
    ||||||||.||||||||.||||||||.||||0000 == 255.255.255.240
    - will leave 4 remaining bits to address the subnetwork and binary 0000|||| = (2 pow 4) 16, not enough! - though;-
    ||||||||.||||||||.||||||||.|||00000 == 255.255.255.224
    would = 5 bits = up to 32 (less 2, one=gtw + one=router) machines would've worked.Hope I've been of service, though I'm not 100% sure of the other answers.

  • Web Dynpro Domino Web Service Consumer Problem

    Dear All,
    We are trying to consume a Web Service on Domino.
    The web service is working Fine on webdynpro web service checker (EP perspective, Web Service Checker), but when tested with check and deploy, the Webservice return an error:
    "Service call exception; nested exception is: com.sap.engine.lib.xml.parser.ParserException: The empty string is not acceptable for a value of an xmlns:* attribute.(:main:, row:1, col:0)"
    It is a simple web service getting a string in input and returning a simple string (xsd string in both cases),
    here are the soap messages used:
    Input
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://bespordom.lhoist.net/webserviceagent.nsf/directorywsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
      <SOAP-ENV:Body>
        <tnsMethod:getperson xmlns:tnsMethod="uri:Domino">
          <FullName xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">Davis</FullName>
        </tnsMethod:getperson>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    response
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SOAP-ENV:Body>
        <m:getpersonResponse xmlns:m="Domino" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
          <Answer xsi:type="xsd:string">Jim [email protected] Falls1313 Mocking Bird laneNY127842241~</Answer>
        </m:getpersonResponse>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    this information came from the Webdynpro web service checker (or EP web service checker in Netweaver developer studio).
    Any Idea will be welcome.
    Message was edited by: Rui Felipe Rebelo Prego
    Message was edited by: Rui Felipe Rebelo Prego

    Hello victor I checked,
    Unfortunately It is only one input parameter and one output parameter.
    Example:
    Dividing a number By 2
    Example I send the number 10 and the result (xml/string) would be 5.
    Input Number as string
    Output Result as string
    message function divide
    WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
         xmlns="http://schemas.xmlsoap.org/wsdl/"
         name="divide"
         targetNamespace="http://bespordom.lhoist.net/divide.nsf/wsdl"
         xmlns:tns="http://bespordom.lhoist.net/divide.nsf/wsdl"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <message name="divide">
    <part name="Number" type="xsd:string" />
    </message>
    <message name="divideResponse">
    <part name="Result" type="xsd:string" />
    </message>
    <portType name="DirectoryPortType">
         <operation name="divide">
              <input message="tns:divide" />
              <output message="tns:divideResponse" />
         </operation>
    </portType>
    <binding name="DirectoryBinding" type="tns:DirectoryPortType">
         <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
         <operation name="divide">
              <soap:operation soapAction="" />
              <input>
                   <soap:body use="literal" namespace="uri:Domino" />
              </input>
              <output>
                   <soap:body use="literal" namespace="uri:Domino" />
              </output>
         </operation>
    </binding>
    <service name="Directory">
         <documentation>Directory</documentation>
         <port name="DirectoryPort" binding="tns:DirectoryBinding">
              <soap:address location="http://bespordom.lhoist.net/divide.nsf/WebService?OpenAgent" />
         </port>
    </service>
    </definitions>
    When I run it in the Web service Checker with the URL http://bespordom.lhoist.net/divide.nsf/wsdl, it Gives me the correct result and Functionality. Here is the Soap generated on the Web Service checker:
    Soap request
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://bespordom.lhoist.net/divide.nsf/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
      <SOAP-ENV:Body>
        <tnsMethod:divide xmlns:tnsMethod="uri:Domino">
          <Number>10</Number>
        </tnsMethod:divide>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Soap Response
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SOAP-ENV:Body>
        <m:divideResponse xmlns:m="Domino" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
          <Answer xsi:type="xsd:string">5</Answer>
        </m:divideResponse>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I initialize correctly the Web service and the field number (with new String()) in the component controller.
    When I click on the Button divide on the web dynpro interface, I call the executerequest defined in the component controller where I execute the call.
    But the response is always the same:
    Service call exception; nested exception is: com.sap.engine.lib.xml.parser.ParserException: The empty string is not acceptable for a value of an xmlns:* attribute.(:main:, row:1, col:0)
    What can i do or check, or can I debug the soap generated or received by the portal?
    Do you see something wrong?
    Thank you very much for your help.

  • Producer/Consumer problem using jtux.

    The buffer can only have 10 items which contains 2 integers. But after some time the producer starts to produce and put more than 10 items in the buffer. Here the semaphore is suppose to stop it but it seems that the producer does not care about it and continues to produce items. I have gone through the code many times i cannot see what is wrong.
    //BOUNDED_BUFFER CLASS
    import java.io.*;
    import jtux.*;
    public class Bounded_buffer extends Semaphore{
         static public void main(String[] args) {
              long pid;
              int mutex = create(1);
              int fullBuffer = create(0);
              int emptyBuffer = create(10);
              int shmid = Shared_memory.create(84);
              long memPointer = Shared_memory.attach(shmid);
              Shared_memory.write(memPointer, intToByteArray(4), 4);
              int numProd = 5;
              int numCust = 10;
              try{
              for(int i = 0; i<numProd; i++) {
                   pid = UProcess.fork();
                   if(pid == 0) {
                        producer(mutex, fullBuffer, emptyBuffer, memPointer);
                        Shared_memory.detach(memPointer);
                        //Thread.sleep(500,0);
                        System.exit(0);
              for(int i = 0;     i<numCust; i++) {
                   pid = UProcess.fork();
                   if(pid == 0) {
                        customer(mutex, fullBuffer, emptyBuffer, memPointer);
                        Shared_memory.detach(memPointer);
                        //Thread.sleep(500,0);
                        System.exit(0);
              UExitStatus status = new UExitStatus();
              for(int i = 0; i<(numProd+numCust); i++)
                   UProcess.wait(status) ;
              }catch (Exception e) {
                   System.out.print("Exception: ");
                   System.out.println(">" + e.toString() + "<");
              } //try-catch
              destroy(mutex);
              destroy(emptyBuffer);
              destroy(fullBuffer);
              Shared_memory.detach(memPointer);
              Shared_memory.destroy(shmid);
              System.exit(0);
         } //end main
         static private void producer(int mutex, int fullBuffer, int emptyBuffer, long memPointer) throws Exception{
              long pid = UProcess.getpid();
              byte[] buffer = new byte[4];
              int usedBuffer;
              for(int i = 0; i<20; i++) {
                   wait(emptyBuffer);
                   wait(mutex);
                   //Thread.sleep((int)(10*Math.random()),0);
                   Shared_memory.read(memPointer, buffer, 4);
                   usedBuffer = byteArrayToInt(buffer);
                   Shared_memory.write(memPointer+usedBuffer, intToByteArray((int)pid), 4);
                   Shared_memory.write(memPointer+usedBuffer+4, intToByteArray(i), 4);
                   usedBuffer = usedBuffer + 8;
                   Shared_memory.write(memPointer, intToByteArray(usedBuffer), 4);
                   System.out.println("Item " + i +" produced by " + pid + '\t' + '\t' + "Items in buffer: " + (usedBuffer-4)/8);
                   signal(mutex);
                   signal(fullBuffer);
         static private void customer(int mutex, int fullBuffer, int emptyBuffer, long memPointer) throws Exception{
              long pid = UProcess.getpid();
              byte[] buffer = new byte[4];
              int usedBuffer, ppid, num;
              for(int i = 0; i<10; i++) {
                   wait(fullBuffer);
                   wait(mutex);
                   //Thread.sleep((int)(10*Math.random()),0);
                   Shared_memory.read(memPointer, buffer, 4);
                   usedBuffer = byteArrayToInt(buffer);
                   Shared_memory.read(memPointer+usedBuffer-4, buffer, 4);
                   num = byteArrayToInt(buffer);
                   Shared_memory.read(memPointer+usedBuffer-8, buffer, 4);
                   ppid = byteArrayToInt(buffer);
                   usedBuffer = usedBuffer - 8;
                   Shared_memory.write(memPointer, intToByteArray(usedBuffer), 4);
                   System.out.println("Customer " + pid + " got item " + num + " from " + ppid + '\t' + "Items in buffer: " + (usedBuffer-4)/8);
                   signal(mutex);
                   signal(emptyBuffer);
         private     static final byte[] intToByteArray(int value) {
              return new byte[] {
                   (byte)(value >>> 24),
                   (byte)(value >>> 16),
                   (byte)(value >>> 8),
                   (byte)value};
    // helper function to convert an array of 4 bytes to an int.
    // This function is needed to read ints from shared memory.
    private static final int byteArrayToInt(byte [] b) {
              return (b[0] << 24)
                   + ((b[1] & 0xFF) << 16)
                   + ((b[2] & 0xFF) << 8)
                   + (b[3] & 0xFF);
    //SEMAPHORE CLASS
    import java.io.*;
    // jtux is the library that gives the POSIX interface.
    import jtux.*;
    // This is an interface to the SystemV semaphores that are
    // easier to use. The SystemV interface to semaphores is
    // very weird and hard to understand. If you're interested
    // you can take a look here, but you do not need to understand
    // the implementation, just the interface.
    abstract class Semaphore {
    // Create a new semaphore. value should be its initial
    // value. It should be 1 in most cases. It returns a
    // handle to the semaphore.
    static int create(int value) {
         int semid = 0;
         try {
         semid = USysVIPC.semget(UConstant.IPC_PRIVATE,
                        1,
                        UConstant.IPC_CREAT | 00400 | 00200);
         USysVIPC.u_semun_int arg = new USysVIPC.u_semun_int();
         arg.val = value;
         USysVIPC.semctl(semid, 0, UConstant.SETVAL, arg);
         } catch (Exception e) {
         System.out.print("Exception: ");
         System.out.println(">" + e.toString() + "<");
         System.exit(1);
         return semid;
    // Destroy a semaphore. This will free the semaphore given
    // as argument. You should always do this when you're finished
    // with a semaphore.
    static void destroy(int sem) {
         try {
         USysVIPC.u_semun semun = new USysVIPC.u_semun();
         USysVIPC.semctl(sem, 0, UConstant.IPC_RMID, semun);
         } catch (Exception e) {
         System.out.print("Exception: ");
         System.out.println(">" + e.toString() + "<");
         System.exit(1);
    // Operation P on a semaphore. Same operation as wait below. Use P
    // if you are familiar with the lectures, and wait if you are familiar with the course
    // book
    static void P(int sem) {
         USysVIPC.s_sembuf wait[] = new USysVIPC.s_sembuf[1];
         wait[0] = new USysVIPC.s_sembuf();
         wait[0].sem_num = 0;
         wait[0].sem_op = -1;
         wait[0].sem_flg = 010000;
         try {
         USysVIPC.semop(sem, wait, 1);
         } catch (Exception e) {
              System.out.print("Exception: ");
         System.out.println(">" + e.toString() + "<");
         System.exit(1);
    // Operation wait on a semaphore. Same operation as P above. Use P
    // if you are familiar with the lectures, and wait if you are familiar with the course
    // book
    // Wait for the semaphore. It will block until the semaphore
    // is available.
    static void wait(int sem) {
         USysVIPC.s_sembuf wait[] = new USysVIPC.s_sembuf[1];
         wait[0] = new USysVIPC.s_sembuf();
         wait[0].sem_num = 0;
         wait[0].sem_op = -1;
         wait[0].sem_flg = 010000;
         try {
         USysVIPC.semop(sem, wait, 1);
         } catch (Exception e) {
              System.out.print("Exception: ");
         System.out.println(">" + e.toString() + "<");
         System.exit(1);
    // Operation V on a semaphore. Same operation as signal below.
    // Use V if you are familiar with the lectures, and signal if you are familiar with the course
    // book
    static void V(int sem) {
         USysVIPC.s_sembuf signal[] = new USysVIPC.s_sembuf[1];
         signal[0] = new USysVIPC.s_sembuf();
         signal[0].sem_num = 0;
         signal[0].sem_op = 1;
         signal[0].sem_flg = 010000;
         try {
         USysVIPC.semop(sem, signal, 1);
         } catch (Exception e) {
              System.out.print("Exception: ");
         System.out.println(">" + e.toString() + "<");
         System.exit(1);
    // Operation siganal on a semaphore. Same operation as V above.
    // Use V if you are familiar with the lectures, and signal if you are familiar with the course
    // book
    static void signal(int sem) {
         USysVIPC.s_sembuf signal[] = new USysVIPC.s_sembuf[1];
         signal[0] = new USysVIPC.s_sembuf();
         signal[0].sem_num = 0;
         signal[0].sem_op = 1;
         signal[0].sem_flg = 010000;
         try {
         USysVIPC.semop(sem, signal, 1);
         } catch (Exception e) {
              System.out.print("Exception: ");
         System.out.println(">" + e.toString() + "<");
         System.exit(1);
    //SHARE_MEMORY CLASS
    import java.io.*;
    // jtux is the library that gives the POSIX interface.
    import jtux.*;
    // This is an interface to the SystemV shared memory that are
    // easier to use.
    // If you're interested you can take a look here, but you do not need to understand
    // the implementation, just the interface.
    abstract class Shared_memory {
         // create creates a new shared memory segment.
         // Argument size is the size of the segment in bytes.
         // create returns a handle to the newly created
         // shared memory segment. When the OS is not able to create a new
         // segment, the process is terminated with exit value 1.
         static int create(int size) {
    String keystring = new String(".");
         int shmid = -1 ;
    long key;
              try {
              key = USysVIPC.ftok(".", (int) UProcess.getpid());
              shmid = USysVIPC.shmget(key, size, UConstant.IPC_CREAT | 0666);
              } catch (Exception e) {
              System.out.print("Exception: ");
              System.out.println(">" + e.toString() + "<");
              System.exit(1);
         return(shmid);
         }//create
         // destroy removes the shared memory segment in argument.
         // If the argument shm is not a valid handle to a shared memory segment
         // the process is terminated with exit value 1.
         // You should always remove a shared memory segment when you are finished
         // with it.
         static void destroy(int shm) {
              try {
    USysVIPC.s_shmid_ds shmds = new USysVIPC.s_shmid_ds();
              USysVIPC.shmctl(shm, UConstant.IPC_RMID, shmds) ;
              } catch (Exception e) {
              System.out.print("Exception: ");
              System.out.println(">" + e.toString() + "<");
              System.exit(1);
         }//destroy
         // attach "places" the shared memory segment passed in argument
         // in the address space of the calling process. This way the process can
         // access the segment. A pointer to the the block in the process address space
         // is returned.
         // If the argument shm is not a valid handle to a shared memory segment
         // the process is terminated with exit value 1.
         static long attach(int shm) {
              long shmaddr = -1 ;
              try {
              shmaddr = USysVIPC.shmat(shm, 0, 0) ;
              } catch (Exception e) {
              System.out.print("Exception: ");
              System.out.println(">" + e.toString() + "<");
              System.exit(1);
         return(shmaddr) ;
         }//attach
         // detach "detaches" the shared memory segment at shmaddr
         // in the process's address space.
         // If there is no shared memory attached at address shmaddr.
         // the process is terminated with exit value 1.
         static void detach(long shmaddr)
              try {
              USysVIPC.shmdt(shmaddr);
              } catch (Exception e) {
              System.out.print("Exception: ");
              System.out.println(">" + e.toString() + "<");
              System.exit(1);
         }//detach
    // write : writes into shared memory segment.
    // writes at address addr datasize bytes of array data
    static void write(long addr, byte[] data, int datasize){
              UUtil.jaddr_to_seg(addr, data, datasize);
    }//write
         // read : reads from a shared memory segment.
    //reads datasize bytes at address addr and stores them in
    // array data
    static void read(long addr, byte[] data, int datasize){
              UUtil.jaddr_from_seg(addr, data, datasize);
    }//write
    }//Shared_memory

    What is jtux?
    Use code tags to make your post more legible.

  • Sun Federation Manager installation problem

    I'm trying to install Sun Federation Manager on a machine running RedHat Linux and Sun Application Server. The installation in itself appears to go ok, and the loginpage appears when i connect to http://x.x.x.x/federation The problem is when I try to login with the username and password, it only redirects back to the login page. It seems like it tries to go to AMAdminFrame, but gets redirected back. First I thought i didn't login correctly, but when I look in the amAuthentication.access file, it says that the login was correct.
    Has anyone else had this problem? I've tried with both 8.2 and 9 of the application server, and the problem is the same on both. All help would be appriciated.
    I've also tried with the Sun Webserver, but it threw an nullpointerexception on me. Does anyone have any ideas?

    Hello,
    When you create any user through SUN Access Manager, is that user is created in LDAP
    datastore, or is it created in SAM flat file repository ?

Maybe you are looking for

  • Help on query

    Hi, Looking for your help, SELECT c.Seq, case when s2.Str_Name like 'STR' then s2.Str_Name end as name1, case when s2.Str_Name like 'AVE' then s2.Str_Name end as name2 FROM assign a INNER JOIN customer c on a.seq = c.seq INNER JOIN address s2 on a.se

  • Podcasts and the dreaded exclamation point

    Most of my podcasts will no longer update. This actually started BEFORE iTunes 7. I can see new episodes are available but when I try to download I get messages like "this URL was not found on the server". Per another poster, I tried deleting and rel

  • Unable to Create Source System under 'SAP'

    Hi, We are on BI 7.0 and I am trying to create an R/3 Logical System (RSA1 - Source Systems - SAP - Create...) But everytime I try to do that logical system is getting created under 'BI' folder (instead of 'SAP' folder). Do you know why this could ha

  • Cannot connect to shares after upgrade to Tiger

    Hi, I work at an IT company that manages both Macs and PCs. We just performed a site-wide upgrade for one of our clients from 10.3.9 to 10.4.6 (and on to 10.4.9). We have 2 iBooks, a PowerMac, and 2 iMacs in an Active Directory setup. One of the iMac

  • Adobe photo shop 12 photo editor

    Hi my photo editor on adobe photo 12 is not letting me open it. but my organizer will open up.