Can I have a common Queue to queue up the requests received through function call?
<p>I will be happy, if you can give me some suggestions to solve my problem.</p>

<p>I have to make a function call from one program to another program (separate package).  Now my question is, can i have a common Queue in the called program in which all the calling requests will be queued up ???? is it possible to maintain a queue??</p>

<p>Example.</p>

<pre><code>package1:

public class Callingprogram
{
    public static void main(String args[])
    {
        CalledProgram cp=new Calledprogram();
        cp.function(hashset);
    }

}


package2:
public class Calledprogram
{
    public void function(Hasheset hs)
    {
        here i am going to make use of the hashset sent by them
    }
}
</code></pre>

<p>now here by i repeat my question :can i make any queue in Calledprogram such that it keeps track of all the calls made by Callingprogram and serves one by one...if so can i have a sample code such that i can proceed further....</p>

<p>Thank you..</p>
