Client/server - how to make out

In solaris how to make out weather the installed version is a client or Server..
??

Hi,
Earlier I had clint installed on my system. Now, I installed server as well on the system (for local testing purposes). Now when I look for what you said, OUI shows only server and when I look for directory I see
1. C:\Program Files\Oracle\bin
2. E:\oracle\product\10.2.0\db_1\BIN
there is nothing like $ORACLE_HOME/bin/oracle
Now how can I say what is what?
OS Windows XP SP2
Oracle 10gR2

Similar Messages

  • How to make outer join in Sub Query?

    Hi!
    I'm facing one problem. Can anyone tell me - how to make outer join in sub query?
    I'm pasting one sample code -
    select e.empno, e.ename,e.job,e.sal,d.deptno,d.dname
    from d_emp e, d_dept d
    where e.deptno(+) = (
                          case
                            when d_dept.deptno = 10
                              then
                                  select deptno
                                  from d_dept
                                  where dname = 'SALES'
                          else
                            d_dept.deptno
                          end
    SQL>
    ERROR at line 15:
    ORA-01799: a column may not be outer-joined to a subqueryHow to resolve this issue?
    Regards.

    And any luck with this?
    SQL> with emp as
      2  (select 100 empno, 'Abcd' ename, 1000 sal, 10 deptno from dual
      3  union all
      4  select 101 empno, 'RRR' ename, 2000 sal, 20 deptno from dual
      5  union all
      6  select 102 empno, 'KKK' ename, 3000 sal, 30 deptno from dual
      7  union all
      8  select 103 empno, 'PPP' ename, 4000 sal, 10 deptno from dual
      9  )
    10  ,dept as
    11  (select 10 deptno, 'FINANCE' dname from dual
    12  union all
    13  select 20 deptno, 'SALES' dname from dual
    14  union all
    15  select 30 deptno, 'IT' dname from dual
    16  union all
    17  select 40 deptno, 'HR' dname from dual
    18  )
    19  select e.empno, e.ename, e.sal, d.deptno, d.dname
    20  from emp e,
    21       (select decode(a.deptno, 10, b.deptno, a.deptno) deptno, decode(a.deptno, 10, b.dname, a.dname) dname
    22      from dept a, (select deptno, dname
    23                    from dept
    24                      where dname = 'SALES'
    25                     ) b
    26       ) d
    27  where e.deptno(+) = d.deptno
    28  /
         EMPNO ENAM        SAL     DEPTNO DNAME
           101 RRR        2000         20 SALES
           101 RRR        2000         20 SALES
           102 KKK        3000         30 IT
                                       40 HR
    SQL> Cheers
    Sarma.

  • TCP Client Server - how to set timeout and bandwidth option

    Hi Friends,
    I am writing a simple TCP based client-server app and I would like the connection to be dropped after a certain time of inactivity and also I would like to control the connection's bandwidth. I would appreciate if someone can throw some pointers as to how this can be done.
    I have tried this so far, for Timeout I am trying to do this:
    sock.setSoTimeout(10000);But I think this is not the right way as this will disconnect the server from all client connections I guess. I think the better way would be to write a timer or something for each connection but I don't know how...
    Any help?

    Micks80 wrote:
    Hi Friends,
    I am writing a simple TCP based client-server app and I would like the connection to be dropped after a certain time of inactivity and also I would like to control the connection's bandwidth. I would appreciate if someone can throw some pointers as to how this can be done.
    I have tried this so far, for Timeout I am trying to do this:
    sock.setSoTimeout(10000);But I think this is not the right way as this will disconnect the server from all client connections I guess.Wrong in a couple of ways.
    1) That doesn`t disconnect anything. It causes a read that reaches that time in blocking to be unblocked and an exception (java.net.SocketTimeoutException) is thrown. The Socket is still just fine and can be used (all other things being equal). At any rate you then decide what you want to do after a timeout. One possibility is to close the socket because to you that timeout means it is abandoned.
    2) setSoTimeout of ServerSocket applies to the accept* method. setSoTimeout of Socket applies to reads from that sockets input stream. Neither of those apply anything to all connections.
    I think the better way would be to write a timer or something for each connection No setSoTimeout is correct. You will also then need to actually attempt to read something for that timeout exception to ever be thrown.
    As far as the bandwidth question goes, you will need to define your goals better. Please do not just restate "control bandwidth" because that is not actually a very specific goal. Do you want to limnit the bandwidth used at one time (tricky) or do you want to limit the total bandwidth used. Either way requires some work but they are different things.

  • Maverick server - How to post out of office on clients

    Hello there,
    since Maverick server dropped webmail how are you suppose to place an out of office on an email account?
    Thanks

    Hi
    Use RoundCube
    http://roundcube.net/
    http://topicdesk.com/downloads/roundcube/
    Working here on:
    OSX 10.9.2
    Server 3.1
    Roundcube Webmail 0.9.5
    If you have a lot of emails in your account then it takes a little while to load but then OK.

  • Proxy server - how to find out

    Hi to all,
    i'm writig a java web start app and i'd like to know if my user has a proxy
    server to connect the internet.
    How can i read this setting?
    I know, it should be saved in javaws.cfg (or deployment.properties) file,
    i'd like to know your opinion if there is a better way to find out this
    setting?
    Or the one and only way is to check java web start version, than to find a
    config file and finally to find a right section in this file to read if my
    user uses a proxy server.
    Thanks in advance for all opinions.
    Best regards
    Maras

    I can't remember where it was documented, but you can check the following system properties, which are automatically set if you lauch an application via WebStart:
    proxyHost, proxyPort, httpsProxyHost, httpsProxyPort

  • SQL Server - How to make SELECT block with TRANSACTION_SERIALIZABLE

    I'm in the process of switching an application to use SQL Server. Is there anyway of making a SELECT in SQL Server implement a lock (and therefore also get blocked) similar to an INSERT or UPDATE?
    Essentially, I have code that tracks a transaction ID for a particular customer; given there can be concurrent access from the same customer, I am using TRANSACTION_SERIALIZABLE:
    long id = 0L; // Customer ID stmt = Conn.prepareStatement("SELECT TxID FROM TxIDTable WHERE (ID = ?)"); stmt.setLong(1, id); result = stmt.executeQuery(); result.next(); int tx_id = result.getInt("TxID"); result.close(); stmt.close(); stmt = Conn.prepareStatement("UPDATE TxID SET TxID = ? WHERE (ID = ?)"); stmt.setInt(1, tx_id + 1); stmt.setLong(2, id); stmt.executeUpdate(); stmt.close(); Conn.commit();
    This code is working, however on SQL Server I have to wrap a loop around it, and if I catch a deadlock exception, rerun the transaction. This is costly and I would much rather have the SELECT create a lock and therefore block any concurrent SELECTs. One workaround is to force a dummy UPDATE up front:
    long id = 0L; // Customer ID stmt = Conn.prepareStatement("UPDATE TxIDTable SET ID = ? WHERE (ID = ?)"); stmt.setLong(1, id); // THIS UPDATE DOES NOT REALLY UPDATE ANYTHING stmt.setLong(2, id); // (NOTE SET AND WHERE CLAUSE ARE IDENTICAL) stmt.executeUpdate(); // HOWEVER, IT DOES EFFECTLY PREVENT DEADLOCK // BY CREATING A TABLE LOCK BEFORE THE SELECT stmt.close(); // stmt = Conn.prepareStatement("SELECT TxID FROM TxIDTable WHERE (ID = ?)"); stmt.setLong(1, id); result = stmt.executeQuery(); result.next(); int tx_id = result.getInt("TxID"); result.close(); stmt.close(); stmt = Conn.prepareStatement("UPDATE TxIDTable SET TxID = ? WHERE (ID = ?)"); stmt.setInt(1, tx_id + 1); stmt.setLong(2, id); stmt.executeUpdate(); stmt.close(); Conn.commit();
    This seems really like a waste -- anyway to make the SELECT lock on SQL Server??
    Thanks,
    Kevin

    You want a table hint (the equivalent of SELECT ... FOR UPDATE in other dialects):
    [http://msdn2.microsoft.com/en-us/library/ms187373.aspx|http://msdn2.microsoft.com/en-us/library/ms187373.aspx]

  • Changing from .mac to another server-how to make sure I keep all my emails?

    Sorry if this has been asked before--I couldn't find it in recent threads--,
    Here is my situation: I already have free email service from another server (my DSL provider) but I have kept paying for the .mac email and idisk storage for two years simply because I thought I was going to do great things, I guess.
    I now realize I am too busy to learn enough about setting up my own webpage or whatever, so want to consolidate and save money. I am going to not resubscribe when next year's payment comes due next month, but in the meanwhile, I need to know:
    Should I forward any or all of my (opened and read) mail to my new email/server? Or is it all stored on my iMac anyway, and so only need to send my friends an email telling them of the new address...? I obviously don't want to lose anything.
    Please advise. Thank you in advance for any help you can give.

    Your DSL provider probably does not provide/support an IMAP account - more than likely it is a POP account so there is no need to forward all messages from your .Mac account's Inbox mailbox to your DSL provider's email account which probably much has less server storage space available.
    If you have been accessing your account as a .Mac type account (which is really an IMAP account and behaves in the same way), you need to transfer all messages in the account's Inbox mailbox to a user created "On My Mac" location mailbox before the account expires.
    This will store the transferred messages locally on the hard drive and remove the messages from the server at the same time.
    I recommend using the Copy To command vs the Move To command in case something goes wrong with the process.
    At the menu bar, go to Mailbox and select New Mailbox.
    Select "On My Mac" as the location if not already selected, enter a name for the mailbox and select OK to create the mailbox.
    Select a message in the message list for the account's Inbox mailbox and at the menu bar, go to Edit > Select All to highlight/select all messages in the account's Inbox mailbox.
    At the menu bar, go to Message > Copy To and select the user created "On My Mac" location mailbox.
    This will copy all messages from the server to the user created mailbox. When completed and after confirming all messages were successfully copied to the mailbox, you can delete all messages from the server or leave as is. When the account expires, all messages available on the server will be deleted.
    If you are also saving sent messages on the server, you need to do the same with all sent messages stored on the server and with any other messages stored on the server that you want/need to keep such as and Drafts.
    I would send an email to all contacts in your Address Book informing them of your email address change now and to start using your new email address right away. This way, you will have fewer messages to transfer from the account's Inbox to the user created "On My Mac" location mailbox.
    If you have been accessing your .Mac account as a POP account, you need to do the same with all messages in the account's Inbox and Sent mailbox before deleting the account. When deleting an account with Mail, the account named folder and all associated account mailboxes are also deleted.

  • How to make collage template myself pse8

    I would like to be able to make a template with
    rows of rectangles, squares or circles for collage work. Are there any tutorials
    or can someone point me in the right direction? Thanks

    Malloww,
    There are several ways to do this. Here is one:
    http://www.pixentral.com/show.php?picture=1NmVcTyaLz9i6V7cLOoH4fMslMKr0
    Open blank , new file. I used background color=white, but you can use any color. The resolution should be about the same as that of the pictures which you will display, ultimately.
    Duplicate background layer, work on background copy layer, and shut off visibility of background layer by clicking on its eye icon in the layers palette
    Access the rectangular marquee tool, and in the tool's option bar enter mode>fixed size, and the dimensions for height & width. Drag out the rectangle.
    Open a blank layer. This should be at the top in the layers palette
    Go to Edit>stroke>inside.. I chose color=red. Make the stroke a good sized width. You can select any color.
    Repeat steps 3 & 5 for each position. I have 4 for the purpose of demonstration. Use elliptical marquee tool for circle and ellipse. Hold down shift key as you drag out to get the circle
    Go to Layer>merge down (CTRL+E).
    Access the magic wand tool, and in the tool's option bar "contiguous" should be checked. Click inside the 4 stroke boundaries, sequentially, each time hitting delete on the keyboard. This will punch a hole in each location. The checkered pattern denotes transparency
    Copy, then paste your picture between the background layer and the background copy layer. I did this once here for demonstation
    Use the move tool to position the picture
    Let us know how you make out.

  • How to make the client connect to the server at the command prompt?

    I found this code on IBM's website, it was a training session on servers and clients using java.
    The code compiles fine and the server seems to start up properly when I use java Server 5000. I think whats happening is the server is running and listening for a connection on port 5000.
    When I try to run the client I get the following error.
    Exception in thread "main" java.lang.NoSuchMethodError: main
    I see a start() method but no main. As far as I know, applications should all have main, it seems as if the person who wrote this kinda confused applets with application. Not that I would really know what happened.
    If you have time, could you tell me if there's an easy fix for this? I would love to have this client/server working if it isn't too much trouble. As I have looked all over the net for a free client/server applet that will actually let me see the java code and none of the free ones do allow getting to their source.
    Most of them allow you to customize them somewhat but also have built in advertising that can't be removed.
    This is the closest I have come to finding one that lets me look under the hood. But alas it doesn't work out of the box and I don't know what to do to fix it.
    Heres the code: Server:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class Server
      // The ServerSocket we'll use for accepting new connections
      private ServerSocket ss;
      // A mapping from sockets to DataOutputStreams.  This will
      // help us avoid having to create a DataOutputStream each time
      // we want to write to a stream.
      private Hashtable outputStreams = new Hashtable();
      // Constructor and while-accept loop all in one.
      public Server( int port ) throws IOException {
        // All we have to do is listen
        listen( port );
      private void listen( int port ) throws IOException {
        // Create the ServerSocket
        ss = new ServerSocket( port );
        // Tell the world we're ready to go
        System.out.println( "Listening on "+ss );
        // Keep accepting connections forever
        while (true) {
          // Grab the next incoming connection
          Socket s = ss.accept();
          // Tell the world we've got it
          System.out.println( "Connection from "+s );
          // Create a DataOutputStream for writing data to the
          // other side
          DataOutputStream dout = new DataOutputStream( s.getOutputStream() );
          // Save this stream so we don't need to make it again
          outputStreams.put( s, dout );
          // Create a new thread for this connection, and then forget
          // about it
          new ServerThread( this, s );
      // Get an enumeration of all the OutputStreams, one for each client
      // connected to us
      Enumeration getOutputStreams() {
        return outputStreams.elements();
      // Send a message to all clients (utility routine)
      void sendToAll( String message ) {
        // We synchronize on this because another thread might be
        // calling removeConnection() and this would screw us up
        // as we tried to walk through the list
        synchronized( outputStreams ) {
          // For each client ...
          for (Enumeration e = getOutputStreams(); e.hasMoreElements(); ) {
            // ... get the output stream ...
            DataOutputStream dout = (DataOutputStream)e.nextElement();
            // ... and send the message
            try {
              dout.writeUTF( message );
            } catch( IOException ie ) { System.out.println( ie ); }
      // Remove a socket, and it's corresponding output stream, from our
      // list.  This is usually called by a connection thread that has
      // discovered that the connectin to the client is dead.
      void removeConnection( Socket s ) {
        // Synchronize so we don't mess up sendToAll() while it walks
        // down the list of all output streamsa
        synchronized( outputStreams ) {
          // Tell the world
          System.out.println( "Removing connection to "+s );
          // Remove it from our hashtable/list
          outputStreams.remove( s );
          // Make sure it's closed
          try {
            s.close();
          } catch( IOException ie ) {
            System.out.println( "Error closing "+s );
            ie.printStackTrace();
      // Main routine
      // Usage: java Server <port>
      static public void main( String args[] ) throws Exception {
        // Get the port # from the command line
        int port = Integer.parseInt( args[0] );
        // Create a Server object, which will automatically begin
        // accepting connections.
        new Server( port );
    }CLIENT:
    import java.io.*;
    import java.net.*;
    public class ServerThread extends Thread
      // The Server that spawned us
      private Server server;
      // The Socket connected to our client
      private Socket socket;
      // Constructor.
      public ServerThread( Server server, Socket socket ) {
        // Save the parameters
        this.server = server;
        this.socket = socket;
        // Start up the thread
        start();
      // This runs in a separate thread when start() is called in the
      // constructor.
      public void run() {
        try {
          // Create a DataInputStream for communication; the client
          // is using a DataOutputStream to write to us
          DataInputStream din = new DataInputStream( socket.getInputStream() );
          // Over and over, forever ...
          while (true) {
            // ... read the next message ...
            String message = din.readUTF();
            // ... tell the world ...
            System.out.println( "Sending "+message );
            // ... and have the server send it to all clients
            server.sendToAll( message );
        } catch( EOFException ie ) {
          // This doesn't need an error message
        } catch( IOException ie ) {
          // This does; tell the world!
          ie.printStackTrace();
        } finally {
          // The connection is closed for one reason or another,
          // so have the server dealing with it
          server.removeConnection( socket );
    }Thanks for your time.

    CLIENT:
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    public class Client extends Panel implements Runnable
      // Components for the visual display of the chat windows
      private TextField tf = new TextField();
      private TextArea ta = new TextArea();
      // The socket connecting us to the server
      private Socket socket;
      // The streams we communicate to the server; these come
      // from the socket
      private DataOutputStream dout;
      private DataInputStream din;
      // Constructor
      public Client( String host, int port ) {
        // Set up the screen
        setLayout( new BorderLayout() );
        add( "North", tf );
        add( "Center", ta );
        // We want to receive messages when someone types a line
        // and hits return, using an anonymous class as
        // a callback
        tf.addActionListener( new ActionListener() {
          public void actionPerformed( ActionEvent e ) {
            processMessage( e.getActionCommand() );
        // Connect to the server
        try {
          // Initiate the connection
          socket = new Socket( host, port );
          // We got a connection!  Tell the world
          System.out.println( "connected to "+socket );
          // Let's grab the streams and create DataInput/Output streams
          // from them
          din = new DataInputStream( socket.getInputStream() );
          dout = new DataOutputStream( socket.getOutputStream() );
          // Start a background thread for receiving messages
          new Thread( this ).start();
        } catch( IOException ie ) { System.out.println( ie ); }
      // Gets called when the user types something
      private void processMessage( String message ) {
        try {
          // Send it to the server
          dout.writeUTF( message );
          // Clear out text input field
          tf.setText( "" );
        } catch( IOException ie ) { System.out.println( ie ); }
      // Background thread runs this: show messages from other window
      public void run() {
        try {
          // Receive messages one-by-one, forever
          while (true) {
            // Get the next message
            String message = din.readUTF();
            // Print it to our text window
            ta.append( message+"\n" );
        } catch( IOException ie ) { System.out.println( ie ); }
    import java.applet.*;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    public class ClientApplet extends Applet
      public void init() {
        String host = getParameter( "192.168.1.47" );
        int port = Integer.parseInt( getParameter( "5000" ) );
        setLayout( new BorderLayout() );
        add( "Center", new Client( host, port ) );
    }Sorry about that. Now when I run an html file with this applet I just get the x in the corner.
    Thanks for looking.

  • How to make Client instantly recieve msg from Server

    Hello! I'm trying to make a multiplayer game via Bluetooth (RFCOMM protocol) in J2ME. I already managed to detect devices both as a client and as a server. I also managed to send real-time message from client(s) to server in the following way:
    // Pauses thread until Transmission occurs
    StreamConnection conn = notifier.acceptAndOpen();
    read_msg(conn); //this is the function which reads the date received from client
    But when I try the above as a client I got some exception, but never mind actually.
    Here is the actual problem:
    I want to be able to send a message from server to client whenever I press a key so that the client instantly receives that message.
    Now the only thing that comes to my mind is to periodically check (i.e. every 50 ms) StreamConnection and watch for some changes like this.
    while(true) {
    InputStream input = conn.openInputStream(); // conn is of type StreamConnection
    //now I check if the messege received is the new one OR have I actually received a message
    // here I pause the Thread for i.e. 60 ms
    But that would be extremely CPU heavy and foolish, wouldn't it?
    So is there a smart way to register when client gets a message from server?
    Please give me some example for client side.
    Edited by: leden on Sep 27, 2007 3:07 PM

    One more question.
    I have a server and many clients. Let's say I had already received the first message from every client with this piece of code:
    for(int current_client = 0; current_client < MAX_CLIENTS; ++current_client) {
    //notifier is of type StreamConnectionNotifier
    StreamConnection conn = notifier.acceptAndOpen(); //wait for transmission to occur
    String response = read_msg(conn); //read_msg actually reads the message
    Now, at some other moment I want to send a message to one of the clients .
    How could I do that?
    Do I have to add this command in the for loop above, perhaps?:
    conn_client[current_client] = conn;
    then simply reply by doing:
    OutputStream output = conn_list[who_I_want_to_send_msg_to].openOutputStream();
    and then the code like in my first post
    OR this whole procedure is totally wrong?
    Please explaim me what does openOutputStream() actually do?
    Edited by: leden on Sep 30, 2007 8:51 AM

  • PLZ HELP ME! -- How to make a developer app. Client / Server?

    Can anyone tell me how to make a developer application (which i have build) Client/Server?
    I would like to make a installation cd which i can run? Which program can i use for this and how does this work.
    Thanks,
    Vincent

    Assuming that it is a Forms 6i application, it is in client/server mode already. The fmx files will be installed in the client machine. The application will connect to a databse located on another machine (server) through Oracle client software (SQL*Net) which will also be installed/configured on the client.
    Regards,
    Rajesh

  • How to find out which ACS server a wireless LEAP client auth to?

    If I have 2 ACS servers that can authenticate wireless users using LEAP, is there a way to determine from the client or server end which client is authenticating to which ACS server? Thanks!!

    Hi! Thanks for the reply. The reason I would like this is for convenience. I have 2 ACS servers, and it seems that there is a delay when a card switches from one ACS to another. Further, I'd like to see from the client side how they are comunicating with the ACS servers and which ones. Being able to see this from a non-administrator client is much easier. Thanks!

  • JMF - client server video streaming how to stop

    Hi
    I am able to stream video from a server to multiple clients using AVReceive2 and AVTransmit2 from the JMF site.
    Iam developing a client server project. I have modified the above code such that Iam able to start and stream the videos by calling on servlets and socket connections.
    The AVTransmit2 code does not however have a stop button and it uses a thread.sleep method. I do not know how to add a stop button in the GUI on AVReceive2 to call on AVTransmit2.
    I am using sockets to communicate to and from the server. Do i have to use RMI or is there another easier way to call stop from the client which would stop the transmission on the server?
    Also, after the video file has been successfully streamed, when I refresh and try to connect again, the server is invoked and __it starts transmission_,_ but the servlet which calls the AVReceive fails and the frame does not show. Any possible reasons why?
    Thanks in advance.
    Junior

    I don't know the speed of the connection.
    4-10 users usually.
    .11b or .11g I don't know.
    microwave nearby - I don't know
    5-6 other wifis - yes
    I will try Safari, thanks!
    Thanks for the update. The speed of the Wi-Fi in the
    coffee shop will depend on many factors. What is the
    speed of their connection to the Internet? How many
    people are sharing the Wi-Fi? Is it 802.11b or
    802.11g? Do they have a microwave operating nearby?
    That will often interfere. Are there additional Wi-Fi
    networks nearby? That can interfere as well. It's
    possible that it was their network that's causing
    your trouble. But, to rule that out, did you try
    using Safari instead? You might make sure you have an
    up-to-date version of the Flash player which you can
    get at http://www.adobe.com
    I have Clearwire
    at home, it's basically like wireless DSL. It's not
    as fast as cable Internet access, but it is portable.
    I only mentioned it because it would indicate that
    you don't need cable speed to watch the videos
    without buffering.
    -Doug

  • How to make VPN client auto timeout when it still idle?

    How to make VPN client auto disconnect when it still idle?
    Hi,I found some user still connected the VPN evenif they dose not use the VPN resouse.
    I try to set a "idle timeout" for the VPN configuration.
    We use PIX515 8.0.3 and CISCO ACS 4.2 for the VPN's connection and authentication,and the user use cisco vpn client for the connection.
    I have tried many methods,but all failured.
    First,I configed "vpn-idel-timeout 5" on PIX.It can not worked.
    so,I add Radius(CISCO VPN 3000/ASA/PIX 7.0+) attribute "[026/3076/050] Authenticated-User-Idle-Timeout" on CISCO ACS,It still not worked.
    And I also add IETF RADIUS Attributes "[028] Idle-Timeout" on group setting on ACS,it always not worked.
    i found in vpn client's statistics,it always has some byte sended or received, i thought it maybe IPsec keepalive message or Radius message.
    This maybe the reason because the PIX or ACS think the vpn user is keep working.
    Can someone tell me how to make a "idle time out"?
    best regard.
    Roger

      here is the configuration on PIX,
    group-policy DfltGrpPolicy attributes
    wins-server value 10.0.0.67 10.0.0.68
    dns-server value 10.0.0.67 10.0.0.68
    vpn-simultaneous-logins 20
    vpn-idle-timeout 5
    split-tunnel-policy tunnelspecified
    split-tunnel-network-list value vpn-acl
    default-domain value mydomain.com
    address-pools value vpnpool group-policy DfltGrpPolicy attributes
    wins-server value 10.0.0.67 10.0.0.68
    dns-server value 10.0.0.67 10.0.0.68
    vpn-simultaneous-logins 20
    vpn-idle-timeout 5
    split-tunnel-policy tunnelspecified
    split-tunnel-network-list value vpn-acl
    default-domain value want-want.com
    address-pools value vpnpool

  • How to make a Simple NIO Scalable Server?

    I want to learn NIO for a project, but first want to start out simple. I want to figure out how to send a string across from clients to a server using NIO. I tried looking up stuff, but got caught in the terminology and such. How can I make a simple scalable server (agh tripple S) to send strings across? (like a chat server or something). All I know is I need to use a Selector and some Threaded loops to do stuff.
    I found http://gee.cs.oswego.edu/dl/cpjslides/nio.pdf and tweaked the code to make (what I thought was) a simple server, but I do not know how to make client code or even whether or not my Server code works.
    This is what I have so far:
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.*;
    import java.nio.channels.spi.*;
    import java.net.*;
    import java.util.*;
    import static java.lang.System.*;
    public class NIOTest {
    public static void main(String args[]) throws Throwable
    try {
    new Thread(new NIOTestServer()).start();
    } catch(Exception e) {
    e.printStackTrace();       
    class NIOTestServer implements Runnable
    final Selector selector;
    final ServerSocketChannel serverSocket;
    int chatPort=9990;
    public NIOTestServer() throws Exception
    selector=Selector.open();
    serverSocket = ServerSocketChannel.open();
    serverSocket.socket().bind(
    new InetSocketAddress(chatPort));
    serverSocket.configureBlocking(false);
    SelectionKey sk =
    serverSocket.register(selector,
    SelectionKey.OP_ACCEPT);
    sk.attach(new Acceptor());
    public void run()
    try
    while(!Thread.interrupted())
    selector.select(); //Blocks until atleast one I/O event has occured
    Iterator<SelectionKey> it=selector.selectedKeys().iterator();
    while(it.hasNext())
    dispatch(it.next());
    catch(Throwable lol)
    lol.printStackTrace();
    void dispatch(SelectionKey k)
    Runnable r = (Runnable)(k.attachment());
    if (r != null)
    r.run();
    class Acceptor implements Runnable
    { // inner class to accept the event
    public void run()
    try
    SocketChannel c = serverSocket.accept();
    if (c != null)
    new Handler(selector, c);
    catch(IOException ex) {ex.printStackTrace();}
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.*;
    import java.nio.channels.spi.*;
    import java.net.*;
    import java.util.*;
    import static java.lang.System.*;
    final class Handler implements Runnable {
    final SocketChannel socket;
    final SelectionKey sk;
    ByteBuffer input = ByteBuffer.allocate(1024);
    ByteBuffer output = ByteBuffer.allocate(1024);
    static final byte READING = 0, SENDING = 1;
    byte state = READING;
    Handler(Selector sel, SocketChannel c) throws IOException
    socket = c; c.configureBlocking(false); //makes it non blocking
    // Optionally try first read now
    sk = socket.register(sel, 0);
    sk.attach(this);
    sk.interestOps(SelectionKey.OP_READ);
    sel.wakeup();
    boolean inputIsComplete()
    return input.hasRemaining();
    boolean outputIsComplete()
    return output.hasRemaining();
    void process()
    CharBuffer buf=input.asCharBuffer();
    buf.flip();
    out.println(buf);
    public void run()
    try {
    if (state == READING) read();
    else if (state == SENDING) send();
    catch (IOException ex) { ex.printStackTrace(); }
    void read() throws IOException
    socket.read(input);
    if (inputIsComplete())
    process();
    state = SENDING;
    // Normally also do first write now
    sk.interestOps(SelectionKey.OP_WRITE);
    void send() throws IOException
    socket.write(output);
    if (outputIsComplete()) sk.cancel();
    }again this is a rough incomplete code test.

    See http://forum.java.sun.com/thread.jspa?forumID=536&threadID=5277053. You can use Telnet as a test client. When you come to write your own client, use java.net, not java.nio.

Maybe you are looking for

  • How to get the position of a selected cell in a table without using the mouse event?

    Dear All,     I have a question about table:After clicking the cell of a table, the cell is into the edit status. How to know the row number and column number of the cell, when I click a button?    The link below is using the mouse down event:    htt

  • App Error 523- Nothing is working

    Hello, I have a Blackberry curve 8310. Nothing is working anymore on my phone. There is this error message : app error 523. When I try to reset, it take 3 minutes of "waiting" with nothing on the screen, until the same message reappear. I also try ta

  • ERROR: Exception in thread "main"

    i am running java runtime version 1.4.0_01 on a windows 95 computer here is the source im having a problem with: Project: Create a Java Program which will display your initials (minimum 2) in "block letters". Program Name: Initials1 Mailbox: Initials

  • TEM and Time Mgmt. Integration

    Dear All I have activated the integration between Training and Event Management and Time Management in the node SAP Customizing Implementation Guide>Training and Event Management>Integration>Time Management>Integration Yes or No?. Moreover in the nex

  • RFC missing some output fields

    Hello developers, I have encountered a very strange problem... I have a table in an iview which displays the output from an RFC. Simple. Problem is, the RFC is only returning certain fields correctly... for example, the following is text from the tab