How to proxy messages from client?

Hello, i have a problem on how am i gonna proxy the messages from a sender client, to be sent to it's requested client recipient...
clientA(want talk to clientB) --> server(sent to clientB) --> clientB(receive)
and of course vice versa.. what should i do...
server..
import java.io.*;
import java.net.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Strider extends JFrame implements ActionListener {
  JButton sendbutton;
  JTextField txtfield;
  JTextArea txtarea;
  ObjectOutputStream output;
  ObjectInputStream input;
  private int counter = 1;
  ServerSocket server;
  Socket connection;
  ThreadHandler client;
  public Strider() {
    super("Server Strider Running: No# of Client Connected: ");
    Container c = getContentPane();
    c.setLayout(new FlowLayout());
    JButton sendbutton = new JButton("&SEND");
    JTextField txtfield = new JTextField(10);
    JTextArea txtarea = new JTextArea(10, 20);
    sendbutton.addActionListener(this);
    txtfield.addActionListener(this);
    txtfield.setEnabled(true);
    txtarea.setEnabled(false);
    c.add(sendbutton);
    c.add(txtfield);
    c.add(new JScrollPane(txtarea));
    setSize(230, 250);
    show();
  public void runStrider() {
    try {
     server = new ServerSocket(5000, 100);
    catch(IOException e) {
      e.printStackTrace();
      System.exit(1);
    try{
     do {
       ThreadHandler clientThread = new ThreadHandler(server.accept(), this);     
        //txtarea.append("Connection " + counter + "received from: " + clientThread.connection.getInetAddress().getHostName());
       //txtarea.append("\nGot I/O Stream!");
       clientThread.start();       
        ++counter;
     }while(true);
    catch(IOException e) {
     e.printStackTrace();
     System.exit(1);
  public void actionPerformed(ActionEvent e) {
   if (e.getSource() == sendbutton)
      sendData(txtfield.getText());
   else
      sendData(e.getActionCommand());
  public void sendData(String msg) {
   try {
     clientThread.output.writeObject("Strider>> " + msg);
     clientThread.output.flush();
     txtarea.append("\nStrider>> " + msg);
   catch(IOException io) {
     txtarea.append("\nError Writing Object");
  public void update(String message) {
       String msg = null;
       msg = message;
       //txtarea.setText(msg);
      //txtarea.setCaretPosition(txtarea.getText().length());
  public static void main(String[] args) {
    Strider app = new Strider();
    app.addWindowListener(
      new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
          System.exit(0);
    app.runStrider();
  class ThreadHandler extends Thread{
    private Socket connection;
    protected ObjectOutputStream output;
    protected ObjectInputStream input;
     Strider str;
    String message = " ";
    int count = 0;
    public ThreadHandler(Socket s, Strider x) {
     connection = s;
     str = x;
    public void run() {
     String msg = null;
     try {
      output = new ObjectOutputStream(connection.getOutputStream());
      output.flush();
      input = new ObjectInputStream(connection.getInputStream());
      //message  = "Connection received";
         //str.update(message); //+ connection.getInetAddress().getHostName());
      //message = "\nGot I/O Stream!";
      //str.update(message);
      //txtfield.setEnabled(false);
      message = "Strider>> Connection Succesful! \nWelcome to Cybersoft's Underground Community :)";
      output.writeObject(message);
      output.flush();
      //txtfield.setText(" ");
        do {
          msg += (String) input.readObject();
            ++count;
            if(count == counter)
                 output.writeObject(msg);
            //str.update(msg);
        }while(!message.equals("Client>>Terminate"));
      input.close();
       output.close();
      connection.close();
       ++counter;
     catch(IOException e) {
      e.printStackTrace();
      catch(ClassNotFoundException cnfx) {
       cnfx.printStackTrace();
}client...
import java.io.*;
import java.net.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Hiryu extends JFrame implements ActionListener
  ObjectOutputStream output;
  ObjectInputStream input;
  String msg;
  JTextField txtfld1, txtfld2;
  JPanel txtpanel;
  JTextArea txtarea;
  public Hiryu()
     Container c = getContentPane();
     c.setLayout(new BorderLayout());
     txtfld1 = new JTextField(10);
     txtfld2 = new JTextField(10);
     txtarea = new JTextArea(10,20);
     txtpanel = new JPanel();
     txtpanel.setLayout(new GridLayout(2, 1));
     txtfld1.addActionListener(this);
     txtfld2.addActionListener(this);    
     txtpanel.add(txtfld1);
     txtpanel.add(txtfld2);
     c.add(txtpanel, BorderLayout.NORTH);
     c.add(new JScrollPane(txtarea), BorderLayout.CENTER);
     setSize(230,250);
     show();
  public void actionPerformed(ActionEvent e)
     if (e.getSource() == txtfld1)
       sendData(e.getActionCommand());
     //else
       //runClient();
  public void runClient()
     Socket client;
     String s = txtfld2.getText();
     try {
      txtarea.setText("Attempting Connection\n");
      client = new Socket(InetAddress.getByName("192.168.2.109"), 5000);
      txtarea.append("Connected to:" + client.getInetAddress().getHostName());
       output = new ObjectOutputStream(client.getOutputStream());
       output.flush();
       input = new ObjectInputStream(client.getInputStream());
       txtarea.append("\n Got I/O Streams \n");
       msg = "Client>> Connection Successful";
       output.writeObject(msg);
       output.flush();
       do{
        try{
          msg = (String) input.readObject();
          txtarea.append("\n" + msg);
          txtarea.setCaretPosition(txtarea.getText().length());
        catch(ClassNotFoundException cnfex){
         txtarea.append("\nUnknown Object type received");
       }while(!msg.equals("Server>> Terminate"));
       txtarea.append("\nUser Terminated connection");
       output.close();
       input.close();
       client.close();
       //++counter;
     catch(EOFException eof){
      System.out.println("Client terminated connection");
     catch(IOException io){
      io.printStackTrace();
  public void sendData(String s)
     try{
      output.writeObject("Client>>" + s);
      output.flush();
      txtarea.append("\nClient>>" + s);
     catch(IOException cnfex){
      txtarea.append("\nError writing Object");
  public static void main(String[] args)
     Hiryu app = new Hiryu();
     app.addWindowListener(
      new WindowAdapter()
         public void windowClosing(WindowEvent e)
            System.exit(0);
     app.runClient();
}

Though you can initiate the binary from your client side but for the file creation, there is no other way but to store it on the server side. So your best bet would be to get some space free on the server side of yours.
Aman....

Similar Messages

  • How to receive message from flex client

    From the sample 'testdrive-datapush', I know how to receive message from backend(java) to flex client.
    Now, I want to know how to receive message from flex client to backend.
    I tried to find it in http://livedocs.adobe.com/blazeds/1/javadoc/.
    but I failed.
    Do you guys know the solution?

    Alex mentioned a solution in another thread.
    http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=messaging_config_3. html#256378
    [quote]
    Using a JMSConsumer object instead of the JMS adapter
    You use a JMSConsumer to listen for JMS messages without relying on the JMS adapter. Customer code is responsible from receiving JMS messages, converting them to Flex messages and using BlazeDS APIs to pass the message to Flex clients.
    In the following code example, a bootstrap service is used to create a JMSConsumer object when the server starts. When a JMS message is received, it is printed (rather than converting it to a Flex message and handing it to BlazeDS). For different workflows, a RemoteObject could be used to create JMSConsumer objects.
    [/quote]
    Do you know where is the code example?

  • How to receive message from queue based on JMSPriority

    Hi all,
    I want to receive message from Receive Message From Queue based on JMSPrirority.
    I am able to send message to queue using Send Message To Queue component with specifying Priority value as Five(Liternal value).
    Now, when I am trying to receive message from Queue by specifying JMSPriority='Five'; in Message selector, it is not working.
    But, when I use JMSPriority is not null in Message selector, I am able to receive message.
    How to receive message from queue by specifying exact value of JMSPriority.
    Please suggest.

    Hi WASIL,
    I tried with captial FIVE and it is not working.
    I tried also like operator and the standard example doesn't recieve messages based on priority.
    I am experiecing below error:
    Caused by: javax.jms.InvalidSelectorException: The selector is invalid: JMSPriority LIKE '%FIVE%';
        at com.adobe.livecycle.jms.QueueMessageReceiver.receiveMessageFromQueueWithPropertiesNoWait( QueueMessageReceiver.java:206)
        at com.adobe.livecycle.jms.JMSService.receiveMessageFromQueue(JMSService.java:413)
        at sun.reflect.GeneratedMethodAccessor1017.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
        ... 135 more
    Caused by: javax.jms.InvalidSelectorException: The selector is invalid: JMSPriority LIKE '%FIVE%';
        at org.jboss.jms.server.selector.Selector.<init>(Selector.java:107)
        at org.jboss.jms.server.endpoint.ServerSessionEndpoint.createConsumerDelegateInternal(Server SessionEndpoint.java:2103)
        at org.jboss.jms.server.endpoint.ServerSessionEndpoint.createConsumerDelegate(ServerSessionE ndpoint.java:277)
        at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advise d$SessionAdvised$createConsumerDelegate$aop(SessionAdvised.java:94)
        at org.jboss.jms.server.endpoint.advised.SessionAdvised$createConsumerDelegate_8721389917985 689973.invokeTarget(SessionAdvised$createConsumerDelegate_8721389917985689973.java)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
        at org.jboss.jms.server.container.SecurityAspect.handleCreateConsumerDelegate(SecurityAspect .java:124)
        at sun.reflect.GeneratedMethodAccessor389.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.jms.server.endpoint.advised.SessionAdvised.createConsumerDelegate(SessionAdvise d.java)
        at org.jboss.jms.wireformat.SessionCreateConsumerDelegateRequest.serverInvoke(SessionCreateC onsumerDelegateRequest.java:100)
        at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandle r.java:165)
        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)
        at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791 )
        at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
        at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:586)
        at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
        at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:216)
        at org.jboss.remoting.Client.invoke(Client.java:2034)
        at org.jboss.remoting.Client.invoke(Client.java:877)
        at org.jboss.remoting.Client.invoke(Client.java:865)
        at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
        at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
        at org.jboss.jms.client.delegate.ClientSessionDelegate.org$jboss$jms$client$delegate$ClientS essionDelegate$createConsumerDelegate$aop(ClientSessionDelegate.java:267)
        at org.jboss.jms.client.delegate.ClientSessionDelegate$createConsumerDelegate_87213899179856 89973.invokeTarget(ClientSessionDelegate$createConsumerDelegate_8721389917985689973.java)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
        at org.jboss.jms.client.container.StateCreationAspect.handleCreateConsumerDelegate(StateCrea tionAspect.java:136)
        at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateCon sumerDelegate_930384804.invoke(StateCreationAspect_z_handleCreateConsumerDelegate_93038480 4.java)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.jms.client.container.ConsumerAspect.handleCreateConsumerDelegate(ConsumerAspect .java:76)
        at org.jboss.aop.advice.org.jboss.jms.client.container.ConsumerAspect_z_handleCreateConsumer Delegate_930384804.invoke(ConsumerAspect_z_handleCreateConsumerDelegate_930384804.java)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.j ava:92)
        at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:172)
        at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
        at org.jboss.jms.client.delegate.ClientSessionDelegate.createConsumerDelegate(ClientSessionD elegate.java)
        at org.jboss.jms.client.JBossSession.createConsumer(JBossSession.java:237)
        at org.jboss.jms.client.JBossSession.createConsumer(JBossSession.java:220)
        at org.jboss.jms.client.JBossSession.createReceiver(JBossSession.java:396)
        at com.adobe.livecycle.jms.QueueMessageReceiver.receiveMessageFromQueueWithPropertiesNoWait( QueueMessageReceiver.java:198)
        ... 140 more
    Please suggest

  • How to run expdp from client ?

    Hi All,
    I tried searching google and forums for my issue but to no avail > How to run expdp from client side ....like in my laptop.
    Because currently our PROD database server has no space for expdp dump file. So I want it directed to my laptop which has an extenal USB of 1TB harddisk...via client EXPDP
    import data using impdp command
    Posted on: 08-May-2012 11:36, by user: 841731 -- Relevance: 53% -- Show all results within this thread
    below command is correct or not? if it is not correct could you please send me the correct command. impdp user/pass@databasename schemas=sourceschemaname remap_schema=sourceschemaname:destinationschemaname ...
    System generated Index names different on target database after expdp/impdp
    Posted on: 30-May-2012 11:58, by user: 895124 -- Relevance: 43% -- Show all results within this thread
    After performing expdp/impdp to move data from one database (A) to another (B), the system name generated indexes has different ...
    [ETL] TTS vs expdp/impdp vs ctas (dblink
    Posted on: 08-May-2012 21:10, by user: 869578 -- Relevance: 39% -- Show all results within this thread
    (table : 500 giga, index : 500 giga), how much faster is TTS (transportable tablespace) over expdp/impdp, and over ctas (dblink) ? As you know, the speed of etl depends on the hardware capacity. (io ...
    Oracle Client
    Posted on: 21-Jun-2012 22:47, by user: Sh**** -- Relevance: 32% -- Show all results within this thread
    Hi Guys, Please can you guys elaborate the difference between Oracle Client and Oracle Instant Client. Also, please can you advise from where I can download the Oracle normal ...
    Oracle 10g Client
    Posted on: 05-Jun-2012 10:11, by user: dzm -- Relevance: 26% -- Show all results within this thread
    to search at oracle site and this forum, but i wasn't able to find a link to download the oracle 10g client. I really need especificaly the 10g version. Anybody know the link or another way to download ...
    9i client to access 11g database
    Posted on: 22-Jun-2012 07:31, by user: kkrm333 -- Relevance: 24% -- Show all results within this thread
    Hi, Can i access a 11g database using 9i client? Thanks,
    SQLplus in Oracle Client
    Posted on: 14-Jun-2012 00:36, by user: Tim B. -- Relevance: 24% -- Show all results within this thread
    Hi, I tried to install an 11g oracle client in linux. As I've compared the files with the files when you install using the oracle instant ...
    Re: Information on Oracle Client 11202-1.1.4-6
    Posted on: 05-Jun-2012 03:33, by user: 898763 -- Relevance: 23% -- Show all results within this thread
    Actually thats the client requirement
    Analysing the performance of a single client
    Posted on: 28-Mar-2012 02:05, by user: 880172 -- Relevance: 23% -- Show all results within this thread
    timeouts even on some of the simplest queries. I want to try and get some data about how just this one client is performing and what it’s doing, but everything Google has thrown up so far is orientated around ...
    to make client connection as sys
    Posted on: 12-Jun-2012 22:04, by user: user11221081 -- Relevance: 23% -- Show all results within this thread
    Dear gurus can i connect to my server from my client machine with sysdba without giving sys password i have connected in different ways as sys@abc ...Thanks a lot.

    Though you can initiate the binary from your client side but for the file creation, there is no other way but to store it on the server side. So your best bet would be to get some space free on the server side of yours.
    Aman....

  • Process wait SQL*Net message from dblink /SQL*Net message from client

    Hi There,
    We have an ETL process that we kindly need your help with. The process been running since Sun, where it transfers the data from one server (via remote query). The process was running ok till last night where it appeared
    to have stopped working and/or the session is just idling doing nothing.
    Here are some tests that we did to figure out what's going on:
    1. when looking at the session IO, we noticed that it's not changing:
    etl_user@datap> select sess_io.sid,
      2         sess_io.block_gets,
      3         sess_io.consistent_gets,
      4         sess_io.physical_reads,
      5         sess_io.block_changes,
      6         sess_io.consistent_changes
      7    from v$sess_io sess_io, v$session sesion
      8   where sesion.sid = sess_io.sid
      9     and sesion.username is not null
    10     and sess_io.sid=301
    11  order by 1;
                        logical   physical
      SID BLOCK_GETS      reads      reads BLOCK_CHANGES CONSISTENT_CHANGES
      301  388131317   97721268   26687579     223052804             161334
    Elapsed: 00:00:00.012. Check there is nothing blocking the session
    etl_user@datap> select * from v$lock where sid=301;
    ADDR     KADDR           SID TY        ID1        ID2      LMODE    REQUEST      CTIME      BLOCK
    684703F0 6847041C        301 DX         35          0          1          0      45237          0
    684714C4 684714F0        301 AE     199675          0          4          0     260148          0
    619651EC 6196521C        301 TM      52733          0          3          0      45241          0
    67F86ACC 67F86B0C        301 TX     458763      52730          6          0      45241          03. Check if the session is still valid:
    etl_user@datap> select status from v$session where sid=301;
    STATUS
    ACTIVE4. Check if there is anything in long ops that has not completed:
    etl_user@datap> SELECT SID, SERIAL#, opname, SOFAR, TOTALWORK,
      2      ROUND(SOFAR/TOTALWORK*100,2) COMPLETE, TIME_REMAINING/60
      3      FROM   V$SESSION_LONGOPS
      4      WHERE
      5      TOTALWORK != 0
      6      AND    SOFAR != TOTALWORK
      7     order by 1;
    no rows selected
    Elapsed: 00:00:00.005. Check if there is anything in long ops for the session:
    etl_user@datap> r
      1* select SID,SOFAR,TOTALWORK,START_TIME,LAST_UPDATE_TIME,TIME_REMAINING,MESSAGE from V$SESSION_LONGOPS where sid=301
      SID      SOFAR  TOTALWORK START_TIM LAST_UPDA TIME_REMAINING MESSAGE
      301          0          0 22-JUL-12 22-JUL-12                Gather Table's Index Statistics: Table address_etl : 0 out of 0 Indexes done
    Elapsed: 00:00:00.00This is a bit odd!! This particular step have actually completed successfully on the 22nd of July, and we don't know why it's still showing in long opps!? any ideas?
    6. Looking at the sql and what's it actually doing:
    etl_user@datap> select a.sid, a.value session_cpu, c.physical_reads,
      2  c.consistent_gets,d.event,
      3  d.seconds_in_wait
      4  from v$sesstat a,v$statname b, v$sess_io c, v$session_wait d
      5  where a.sid= &p_sid_number
      6  and b.name = 'CPU used by this session'
      7  and a.statistic# = b.statistic#
      8  and a.sid=c.sid
      9  and a.sid=d.sid;
    Enter value for p_sid_number: 301
    old   5: where a.sid= &p_sid_number
    new   5: where a.sid= 301
                 CPU   physical    logical                                   seconds
      SID       used      reads      reads EVENT                             waiting
      301    1966595   26687579   97721268 SQL*Net message from dblink         45792
    Elapsed: 00:00:00.037. We looked at the remote DB where the data resides on, and we noticed that the remote session was also waiting on the db link:
    SYS@destp> select a.sid, a.value session_cpu, c.physical_reads,
      2  c.consistent_gets,d.event,
      3  d.seconds_in_wait
      4  from v$sesstat a,v$statname b, v$sess_io c, v$session_wait d
      5  where a.sid= &p_sid_number
      6  and b.name = 'CPU used by this session'
      7  and a.statistic# = b.statistic#
      8  and a.sid=c.sid
      9  and a.sid=d.sid;
    Enter value for p_sid_number: 388
    old   5: where a.sid= &p_sid_number
    new   5: where a.sid= 390
           SID SESSION_CPU PHYSICAL_READS CONSISTENT_GETS EVENT                                                    SECONDS_IN_WAIT
           390         136              0            7605 SQL*Net message from client                                        46101
    SYS@destp>We have had an issue in the past where the connection was being dropped by the network when the process runs for few days, hence we have added the following to the sqlnet.ora and listener.ora files:
    sqlnet.ora:
    SQLNET.EXPIRE_TIME = 1
    SQLNET.INBOUND_CONNECT_TIMEOUT = 6000
    listener.ora:
    INBOUND_CONNECT_TIMEOUT_LISTENER = 6000What else can we do and/or further investigate to work out the root cause of the problem, and may be help resolve this. We don't want to just stop and start the process again as it took few days already. We have
    had a chat to the infrastructure team and they've assured us that there have been no network outages.
    Also, the alert logs for both instances (local and remote) shows no errors what so ever!
    Your input is highly appreciated.
    Thanks
    Edited by: rsar001 on Jul 25, 2012 10:22 AM

    Ran the query on both local/remote db, and no rows returned:
    etl_user@datap> SELECT DECODE(request,0,'Holder: ','Waiter: ')||vl.sid sess, status,
      2  id1, id2, lmode, request, vl.type
      3  FROM V$LOCK vl, v$session vs
      4  WHERE (id1, id2, vl.type) IN
      5  (SELECT id1, id2, type FROM V$LOCK WHERE request>0)
      6  and vl.sid = vs.sid
      7  ORDER BY id1, request
      8  /
    no rows selected
    Elapsed: 00:00:00.21

  • How to get messages from IBM MQ in Oracle.

    Hi ,
    Can you please help me how to get messages from one IBM MQ to another IBM MQ in Oracle.
    My requirement is Our upstream is putting messages from their IBM MQ to our IBM MQ
    then we have to extract data from the message and load into Oracle database tables
    how to implement this  in oracle.
    Is there any other way to implement this without writing any ORACLE PL/SQL programming.
    Please help me.
    Thanks.

    You might want to use Oracle AQ: Integrating Oracle database applications with WebSphere MQ applications You will need to write some PL/SQL to Dequeue from Oracle AQ and convert the queue payload into insert statements.
    If you need help wityh AQ, there is a separate forum: Advanced Queueing

  • SQL*Net message from client - huge wait in trace file

    Dear All,
    I am facing a performance issue in a particular operation ( which was completed in 21 Minutes earlier). Now the same operation takes more than 35 Minutes. I took a trace for those session ( 10046 level 12 trace ) and found Lot of waits in SQL*Net message from client.
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQLNet message from client 611927 10.00 1121.35*
    I copied only the highest wait in the tkprof output.
    And I found from the tkprof and even in raw trace file this event waits more time after excuting
    SELECT sysdate AS SERVERDATE from dual;
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 115 0.00 0.00
    SQLNet message from client 115 10.00 724.52*
    Please help me to find out why this wait taking long time, especially on the above query..
    Regards,
    Vinodh

    Vinodh Kumar wrote:
    Hi,
    This is what available in the trace file
    PARSING IN CURSOR #2 len=38 dep=0 uid=60 oct=3 lid=60 tim=7052598842 hv=3788189359 ad='7d844fa0'
    *"SELECT sysdate AS SERVERDATE FROM dual"*
    END OF STMT
    PARSE #2:c=0,e=12,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=7052598839
    BINDS #2:
    EXEC #2:c=0,e=42,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=7052599002
    WAIT #2: nam='SQL*Net message to client' ela= 1 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=7052599058
    FETCH #2:c=0,e=15,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,tim=7052599110
    *** 2012-01-02 17:07:30.364
    WAIT #2: nam='SQL*Net message from client' *" ela= 10007957"* driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=7062607120Please find the last line WAIT -- in the complete trace after executing this query
    In awr report , this query taken less than a sec for more than 2000 executions.
    Regards,
    VinodhGood idea to check the raw trace file. It is important to notice that this particular wait event appears after the fetch of the result from the database. The client receives the SYSDATE from the database server, and then the client performs some sort of action for about 10 seconds before submitting its next request to the database. The SQL statement that immediately follows and immediately preceeds this section of the trace file might provide clues regarding what caused the delay, and where that delay resides in the client side code. Maybe a creative developer added a "sleep for 10 seconds" routine when intending to sleep for 10ms? Maybe the client CPU is close to 100% utilization?
    Charles Hooper
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • How to view messages from another iPhone using your apple Id

    How to view messages from another iPhone using your apple Id

    Sign into iMessage using the same ID (in Settings>Messages>Send & Receive).  The other phone should then see your messages too.

  • How to move messages from Phone to Memory card?

    Hi, can anyone tell how to move message from phone memory to Memory card.  Everytime, i'm connecting to PC, thn it is being changed to phone memory.  Cant PC suite synchronize it with memory card messages folder.  Please help.  By the way, my phone is Nokia X6, if someone can help me, it would be gr8.
    Regards,
    Jimmy.

    I can mark all the messages, but the option to copy them to phone memory does not appear! I'm using the lastest firmware for my Nokia 5800.

  • How to send message from Message Driven Bean  to JMS client?

    In my project I have JMS client, two QueueConnectionFactory and Message Driven Bean. Client send message to MDB through the first QueueConnectionFactory , in one's turn MDB send message to client through the second Queue Connection Factory . I already config my Sun AppServer for sending message in one way, and sending message from MDB to the second QueueConnectionFactory. But on my Client there is an error : �JNDI lookup failed: javax.naming.NameNotFoundException: No object bound to name java:comp/env/jms/MyQueue2� (jms/MyQueue2 � this is the name of my Queue). So it couldn't get this message.
    P.S.
    Thank you for help!!!

    What is the name of the second queue?is the connection factory on the local?Yes the connection factory is on the local. The name of my first queue is jms/MYQueue and the name of another one is jms/MyQueue2.

  • How to send message to client?

    Hello, I'm newbie in J2EE. I have a client (e.g. GUI class) which have to "connect" to EJB and start further processing when others 3 clients also connect to this EJB. It's not a problem to obtain reference to EJB and connect to it, but I don't know how to send some message from EJB to client.
    I've tried to implement it with events, but it not works. Is it possible to use event for this? Are there any patterns to solve this class of problems? Please, help!
    Below fragments of my code for events:
    GamesListFrame.java
          try
             title.setText("text");
             tablesManager = getHome().create();
             tablesManager.addStartGameListener(this);
             tablesManager.generateEvent();
          } catch ...
    }and TablesManagerBean.java
        * @ejb.interface-method
        *     view-type="remote"
       public void generateEvent()
          EventQueue q = Toolkit.getDefaultToolkit().getSystemEventQueue();
          StartGameEvent event = new StartGameEvent(this);
          q.postEvent(event);     
        * @ejb.interface-method
        *     view-type="remote"
       public void addStartGameListener(StartGameListener listener)
          listenerList.add(StartGameListener.class, listener);
       public void processEvent(AWTEvent event)
          if (event instanceof StartGameEvent)
             EventListener[] listeners = listenerList.getListeners(StartGameListener.class);
             for (int i=0; i<listeners.length; i++)
                ((StartGameListener)listeners).GameStarted((StartGameEvent)event);
    else
    super.processEvent(event);

    Before you make any call form client to server check that sever is available. This is easily done by intorudciing an rmi method that will return true e.g m_sever.isAvalable(); if server is availbel you will get ture if not then you will get an RMI Excpetion which you then trap and attemp to reconnect to the server (NAming.lookup() ) .. if several attempts fail then assume server is down.
    When a client dies it throws an excpetion on the sErver :
    java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:116)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
         at java.io.FilterInputStream.read(FilterInputStream.java:66)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:442)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:536)
    trap this and deal with it appropriatly.
    hope this helps.
    Charbel.

  • How to delete file from client machine

    Hi all,
    we are using the DataBase: oracle:10g,
    and forms/reports 10g(developer suite 10g-10.1.2.2).
    can anybody help me how to delete the file from client machine in specified location using webutil or any
    (i tried with webutil_host & client_host but it is working for application server only)
    thank you.

    hi
    check this not tested.
    PROCEDURE OPEN_FILE (V_ID_DOC IN VARCHAR2)
    IS
    -- Open a stored document --
    LC$Cmd Varchar2(1280) ;
    LC$Nom Varchar2(1000) ;
    LC$Fic Varchar2(1280);
    LC$Path Varchar2(1280);
    LC$Sep Varchar2(1) ;
    LN$But Pls_Integer ;
    LB$Ok Boolean ;
    -- Current Process ID --
    ret WEBUTIL_HOST.PROCESS_ID ;
    V_FICHERO VARCHAR2(500);
    COMILLA VARCHAR2(4) := '''';
    BOTON NUMBER;
    MODO VARCHAR2(50);
    URL VARCHAR2(500);
    Begin
    V_FICHERO := V_ID_DOC;
    LC$Sep := '\';--WEBUTIL_FILE.Get_File_Separator ; -- 10g
    LC$Nom := V_FICHERO;--Substr( V_FICHERO, instr( V_FICHERO, LC$Sep, -1 ) + 1, 100 ) ;
    --LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
    LC$Path := 'C:';
    LC$Fic := LC$Path || LC$Sep || LC$Nom ;
    If Not webutil_file_transfer.DB_To_Client
    LC$Fic,
    'TABLE_NAME',
    'ITEM_NAME',
    'WHERE'
    ) Then
    Raise Form_trigger_Failure ;
    End if ;
    LC$Cmd := 'cmd /c start "" /MAX /WAIT "' || LC$Fic || '"' ;
    Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
    LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
    If LN$But 0 Then
    Set_Alert_Property( 'ALER_STOP_1', TITLE, 'Host() command' ) ;
    Set_Alert_Property( 'ALER_STOP_1', ALERT_MESSAGE_TEXT, 'Host() command error : ' || To_Char( LN$But ) ) ;
    LN$But := Show_Alert( 'ALER_STOP_1' ) ;
    LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Raise Form_Trigger_Failure ;
    End if ;
    If Not webutil_file_transfer.Client_To_DB
    LC$Fic,
    'TABLE_NAME',
    'ITEM_NAME',
    'WHERE'
    ) Then
    NULL;
    Else
    Commit ;
    End if ;
    LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Exception
    When Form_Trigger_Failure Then
    Raise ;
    End ;sarah

  • Error getting application exception message from client EJB 3

    Hi, somebody nkow what is the error?
    I have this simple session bean deploy in a jboss 4.0.5 GA application server
    My interface:
    package server.ejb.usuarios;
    import javax.ejb.Remote;
    @Remote
    public interface Prueba {
         public void getError() throws Exception;
    }My Session bean implementation:
    package server.ejb.usuarios;
    import javax.ejb.Stateless;
    import server.ejb.usuarios.Prueba;
    public @Stateless class PruebaBean implements Prueba {
         public void getError() throws Exception {
              throw new Exception("Mensaje de error");
    }Simple, i can deploy this bean on my application server, now i have this client code:
    package clientold;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import server.ejb.usuarios.Prueba;
    public class MainPruebaError {
          * @param args
         public static void main(String[] args) {
              Context ctx;
              try {
                   ctx = getInitialContext();
                   Prueba pruebaSession = (Prueba) ctx.lookup("PruebaBean/remote");
                   pruebaSession.getError();
              } catch (NamingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch(Exception e){
                   System.out.println("Get error from server: " + e.getMessage());
                   e.printStackTrace();
         private static Context getInitialContext() throws NamingException {
              Properties prop = new Properties();
              prop.setProperty("java.naming.factory.initial",
                        "org.jnp.interfaces.NamingContextFactory");
              prop.setProperty("java.naming.provider.url", "127.0.0.1:1099");
              prop.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
              return (new InitialContext(prop));
    }and my client catch the exception but i can�t get the correct exception message. I need pass custom message from my server to my clients and wrap it in a exception, but when i run this example got the next output:
    Get error from server: [Ljava.lang.StackTraceElement;
    java.lang.ClassNotFoundException: [Ljava.lang.StackTraceElement;
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:50)
         at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:139)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
         at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
         at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
         at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
         at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
         at org.jboss.remoting.Client.invoke(Client.java:525)
         at org.jboss.remoting.Client.invoke(Client.java:488)
         at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:41)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
         at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
         at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
         at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
         at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
         at $Proxy0.getError(Unknown Source)
         at clientold.MainPruebaError.main(MainPruebaError.java:21)What is the problem??, i must see on the output
    Get error from server: Mensaje de errorbut i have :
    Get error from server: [Ljava.lang.StackTraceElement;why???, is only a simple application exception and don,t work, somebody can help me??
    i have tried to use an interceptor class for get the exceptions and work, but without interceptor, dont work
    thanks

    I can resolve this problem change the JDK version used to develop my clint application and to run the jboss application server.
    Current, in JBoss 4.0.5, the JDK requirement is JDK 5, and i was using JDK 6.

  • How to restrict login from client?

    Hi all,
    11gR2
    How do I restrict login from client users, because I want to backup our database using expdp, and I do not want anybody updating the database.
    I can not use the startup restrict becuase some client have dba privs.
    I am thinking of shutting down the listener, but there are other database using this listener.
    Is there option in the listener so that I can disconnect only the servicename PROD1 database? or do I need to stop the listener and edit it and remove PROD1 then start it again?
    Any more briliant ideas?
    Thanks a lot,

    KinsaKaUy? wrote:
    Hi Pavel,
    I not trying to make a backup of my db. But I do not want to use rman as this is complicated to restore. What's complicated about
    oracle: rman target /
    rman:  restore database
    rman:  recover databaseIf you are dpending on export as your backup ...
    1) you will lose all transactions since the export was taken
    2) you will need to rebuild a database from scratch in order to have something in which to import.
    The most flexible,easy, and space friendly backup is export. and I beg to disagree to anyone saying that export dump is not a backup.
    In fact this is the best backup utility Oracle has ;)
    Thanksssss"In fact this is the best backup utility Oracle has "
    That falls under the heading of "if the only tool you have is a hammer, every problem looks like a nail."

  • How to delete messages from IMAP server but keep on computer???

    Hi
    I am using Mail to receive my email messages from the University's IMAP server. My problem is that I need to keep copies of my sent and received emails for archives on my computer but not on the server because space is limited. However, when I check the 'remove messages from server' box in the preferences, it also removes them all from my Mail inbox and sent mail folders. Consequently, I'm constantly needing to go to the server (once a week) and manually delete the messages when my folder is too full and then I lose all of my messages.
    Can someone please tell me how I can keep all of my sent, received and trashed emails on my computer without them being stored on the server?
    thanks
    adam

    Eric is right. An IMAP account is designed specifically to keep email on line, on a server somewhere on the planet. That way you can use any machine anywhere and see your email. A POP account is designed to actually download your email to the specific machine that you are using and remove it from the server. Although there are ways around that...
    So if you want to keep an email on your computer and you want to delete it from the server, you have to make an "On my Mac" mailbox.

Maybe you are looking for