System control with java, and networking in jave

Hi, just a couple of questions.
Ill start witht the networking query. Ive been making a basic network chat program using sockets. The text is transfered through the sockets as strings read in from text field on the interface
eg
kkSocket = new Socket("xxx.xxx.xxx.xxx", 80);
out = new PrintWriter(kkSocket.getOutputStream(), true);
in = new BufferedReader(new InputStreamReader(kkSocket.getInputStream()));
String fromUser = (ba.text());
out.println(fromUser);
All this works fine, i want to impliment file transfer into the app, but im clueless how to transfer anything other than a basic string over a socket, let alone send it to a specific location on the client computer. Any help / advice would be well recieved.
Also, as i have basic code, that can connect computers, and send messages between them, i was wondering how i control some of the system functions, like executing files, opening / closing cd tray etc through java. As with this, i could create a mini remote control application.
Again, any help on this (or even a pointer to relavent things in the java api) would be fantastic as the more i can understand the more inventive i can be when coding
Cheerz

You seem to manage well even though you're posting to New To Java Technology, I've seen far worse questions in ALT even...
All this works fine, i want to impliment file transfer into the app, but im clueless how to transfer anything other than a basic string over a socket, let alone send it to a specific location on the client computer.To send files/binary data, you would use a BufferedInputStream (remember Streams are for binary data, Readers/Writers are for text) in a similar way you're using PrintWriter and BufferedReader now.
It could go a bit like this (invent your own protocol):
User1 sends a String that says: FILE C:\directory\file
User2 receives the String and prepares to save a file to the specified directory.
User1 sends the binary data to User2.
User2 reads the binary data and writes it in the file.
Controlling system functions in Java can be tricky, so you might not get all the functionality in your program that you want. Running programs can be done through System.exec(), but the CD tray might be impossible even.

Similar Messages

  • Jboss with mapviewer and network configuration.

    Hello All,
    developped succesfully an application piece with mapviewer and network (10.x) ndm on OAS.
    Now should integrate in solution running on JBoss 4.0.5.
    First problem arises when cannot reach new mapviewer html admin pages.
    Anybody has experience on this?
    Thank you,
    David

    Thank you again Justin.
    I think I'm getting closer but not working yet.
    Was missing the step you pointed out.
    Used succesfully the AdfInstaller from OTN after copying the 36 lib files to JBOSS_HOME/server/default/lib.
    But can't run /mapviewer/faces/home.jspx yet.
    Next I post errors for before (a) and after (b) having deleted folder jboss\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs [Understood this as equivalent step from doc "JBoss Deployment Notes" although written for version 4.0.3]
    Also tried to delete folders tmp, log and data, but get same error.
    (A)
    Error raised on executing
    /mapviewer/faces/home.jspx
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    On the log at the jboss cmd prompt:
    22:22:08,421 ERROR [STDERR] Thu Dec 06 22:22:08 CET 2007 INFO [oracle.lbs.mapcac
    he.mcservlet] *** Oracle MapCacheServer started. ***
    22:22:55,812 ERROR [UIComponentTag] Faces context not found. getResponseWriter w
    ill fail. Check if the FacesServlet has been initialized at all in your web.xml.
    22:22:55,953 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
    at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.
    java:929)
    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
    (B)
    Error raised on executing
    /mapviewer/faces/home.jspx
    org.apache.jasper.JasperException: org.apache.myfaces.taglib.core.ViewTag
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810
    On the log at the jboss cmd prompt:
    22:50:56,156 INFO [STDOUT] INFO [oracle.lbs.mapserver.core.MapperConfig] settin
    g logging level to error
    22:51:01,859 ERROR [STDERR] Thu Dec 06 22:51:01 CET 2007 INFO [oracle.lbs.mapcac
    he.mcservlet] *** Oracle MapCacheServer started. ***
    22:51:47,687 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    java.lang.NoClassDefFoundError: org.apache.myfaces.taglib.core.ViewTag
    at org.apache.jsp.home_jspx._jspx_meth_f_view_0(home_jspx.java:137)
    at org.apache.jsp.home_jspx._jspService(home_jspx.java:118)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
    .java:334)
    22:51:47,687 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servle
    threw exception
    java.lang.NoClassDefFoundError: org.apache.myfaces.taglib.core.ViewTag
    at org.apache.jsp.home_jspx._jspx_meth_f_view_0(home_jspx.java:137)
    at org.apache.jsp.home_jspx._jspService(home_jspx.java:118)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    Also would like to solve error related to georaster that seems a missing class:
    22:58:42,343 ERROR [STDERR] Exception in thread "Thread-81"
    22:58:42,343 ERROR [STDERR] java.lang.NoClassDefFoundError: javax/media/jai/Data
    BufferFloat
    22:58:42,359 ERROR [STDERR] at oracle.sdovis.theme.GeoRasterThemeProducer.pr
    epareData(GeoRasterThemeProducer.java:577)
    22:58:42,359 ERROR [STDERR] at oracle.sdovis.GeoRasterTheme.prepareData(GeoR
    asterTheme.java:90)
    22:58:42,359 ERROR [STDERR] at oracle.sdovis.LoadThemeData.run(LoadThemeData
    .java:66)
    Regards,
    David

  • IBM OS ISSUE: SYSTEM HANG WITH JFS2 AND HEAVY LOAD

    제품 : ORACLE SERVER
    작성날짜 : 2004-11-24
    IBM OS ISSUE: SYSTEM HANG WITH JFS2 AND HEAVY LOAD
    ==================================================
    PURPOSE
    이 문서는 IBM AIX5L OS 상에서 Arch Process가 online redo log
    를 release하지 못하고 OS의 kill 명령으로 kill조차 되지 않을 경우
    조치 방법이다.
    Problem Description
    이 문서는 다음 OS 정보와 Oracle version인 경우에 해당한다.
    Oracle Server - Enterprise Edition - Version: 9.2.0.5.0
    Oracle Server - Enterprise Edition - Version: 8.1.7.4.0
    AIX5L Based Systems (64-bit) or (32-bit)
    문제 발생 당시의 증상은 다음과 같다.
    - arch-process doesn't release redolog files
    - arch-process doesn't die after database shutdown
    - arch-process can't be killed
    genclntsh 수행 시 hang 상태이다.
    (sleeping...)28590: kwaitpid(0x2FF22470, -1, 4, 0x00000000, 0x00000000)
    또는 이 문제로 인하여 ORA-600[2103] 에러가 발생하기도 한다.
    이 에러가 발생하는 원인은 IBM AIX5L 64bit, 32bit OS 이슈에 있다.
    IBM OS issue: SYSTEM HANG WITH JFS2 AND HEAVY LOAD.
    Workaround
    none
    Solution Description
    OS AIX5L ML4.0(5.2.0.40)의 bos.up / bos.mp / bos.mp64 fileset level을
    갖는 JFS2 file system을 갖는 경우에 해당한다.
    AIX 5.3 APAR IY59387은 IY58143에 포함되어 있다.
    JFS2 file system에 Heavy I/O activity가 발생하면 database process에
    HANG 문제를 야기시킬 수 있다. 이 때 database process가 kill -9
    명령으로 kill되지 않는다. 데이타베이스를 SHUTDOWN하여도 Process가
    계속 살아 있게 된다.
    Process에게 SIGKILL 함수가 issue되었지만 영향을 주지 않게 된다.
    Process를 제거하는 유일한 방법은 OS를 reboot하는 것이다.
    문제를 예방하는 방법은 IBM APAR-FIX IY59082 를 적용하는 것이다.
    이 APAR는 bos.64bit 5.2.0.42에 포함되어 있다.
    Fix :
    Need to install the IBM APAR-FIX IY59082, this APAR is included on
    bos.64bit 5.2.0.42.
    (주) IBM 엔지니어에게 확인 결과 이 Patch 안에 AIX5L 32bit 용과 64bit
    용이 모두 포함되어 있는 것으로 확인됨.
    Reference Documents
    <Note:285158.1>

    b,
    The install was from my original Dell XP Pro-SP1 'Reinstallation' CD along with the complete MS XP-SP2 download that I burned to another CD. I also had all the latest Dell drivers from their website burned to a CD. Install went as follows:
    - Format HD
    - Install XP Pro SP1
    - Install SP2
    - Install Dell Drivers
    - Obtain any MS patches from their site
    - Install Office
    - Update Office from the MS website
    - Install iTunes
    - Tweak MS settings
    - Install many software programs
    - Make an interim Image of system and store to ExHD
    - Install other software programs (mostly security programs)
    - Make another 'complete' Image to ExHD
    - Restore backup data and music
    After additional testing last night, I determined that it is not iTunes at all (or to blame). I get intermittent hangs/freezes/pauses in other media players (WMP, etc.).
    Seems that something is causing the 'System' process to periodically jump up in CPU %age (though not more than 30-50%). Even this relatively small amount is enough to pause the playback of music or video, hang the mouse movement for a brief moment, or delay a menu opening. All very subtle - you have to be looking for it to notice (except with real-time audio-video, which is quite noticeable whenever this happens).
    I had this problem a year ago, which is why I reimaged then and stayed with SP1 on the advice of Dell and Webroot. I'm stumped as to where to look for the culprit. Every time I go back to the original HD with SP1, everything runs smoothly. Some sort of system call is generating this complete pause....
    I'll be limited in my Internet ability for the next several days, so I may be out of touch until Friday. I'll keep testing and playing with the limited equipment I take along....
    Any thought you or others want to toss out, I'll attempt when possible.
    Thanks!

  • Four digit numbering system starting with 0001 and not just 1.

    How can I re name and renumber  a file of photos and include a four digit numbering system starting with 0001 and not just 1. I need this so another computer program can keep the images in numerical order
    Now I number a wedding say... Smith_Jones 1 ect up to 659 but a program I use to create albumes scrambles all my photos becasue they say the numerical system has to have 4 digits so Number 1 is really 0001 thus staying in order.  I d ont see how to assign 3 zeros to the front of numbers --- so # 344 would be 0344  LR wants to keep it 344.

    In the Library rename use the following custom settings.

  • Java and Networks - questions

    Hi,
    I have this idea in my head, and i wanna get it out..
    Okie the plan is that I want to create something like a macro program. The special thing is that I want to create a server and 2 clients. The thing I want is that whenever I hit a special key from Client1, that key is going to be sent to the server,then the server is going to modify it, and then send to the Client2. And then the Client2 will invoke the key just like a macro program.
    Okie the networking part, I kindda have an idea what how to do it. However since it is more like a macro program, I want it (client/server) to run simutaniously with other programs I am running.
    Ex:
    Let's say I am playing a game, I hit number 1 to signal the game that I want my unit to attack something. Meanwhile the Client gotta capture the key 1 that I just hit and send it to the server and then the client2, and then perform an action of pressing a key that a server sends to.
    Could anyone have an idea of how to do the capture keys and invoke keys as I mentioned above?
    Thank you
    please email me at [email protected] if you could help me out

    JNI (Java Native Interface) is the interface between Java and C (usually native functions in C). In C you can do a lot more low-level stuff than in Java, particularly interacting with the OS at a system level. This is the native part.
    Ie, the system knows about all key events. It then sends them to the OS, that only directs them to the program with focus. (Might be java, might not. But no program can get keyevents intended for another program).
    Using JNI, you could intercept the keyevents betweent the system and the os, and do what you want with them.
    But, I don't know JNI, and I don't know much about it. This is mainly guesswork. It's along the right track, but the system/os stuff might not be 100% correct.
    The other thing is, once you start writing code that interacts directly with the system, it loses all cross-platform compatibility. IE, if you write something that interacts with windows, it obviously won't work on Linux.
    Cheers,
    Radish21

  • Problem with execution and running a Java program

    Good evening,
    I have downloaded the jdk-1_5_0_05-windows-i586-p.exe and installed it on my PC.A folder Java has been created.Now,I need an editor in order to type the program,execute it and run it.I have a shell named Cygwin which includes the nano editor.I copied the folder Java into the cygwin folder C:\cygwin\home\user\Java.
    I open the shell.Do the following steps:
    user@owner ~
    $ cd Java
    user@owner ~/Java
    $ ls
    jdk1.5.0_05 jre1.5.0_04
    user@owner ~/Java
    $ cd jdk1.5.0_05/
    user@owner ~/Java/jdk1.5.0_05
    $ ls
    COPYRIGHT LICENSE.rtf bin jre src.zip
    HelloWorldApp.java README.html demo lib
    LICENSE THIRDPARTYLICENSEREADME.txt include sample
    user@owner ~/Java/jdk1.5.0_05
    $ javac HelloWorldApp.java
    bash: javac: command not found
    user@owner ~/Java/jdk1.5.0_05
    $ java HelloWorldApp
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp
    What am I supposed to do in order to execute the program?
    Thanks in advance!

    Well,following your advice I did :
    user@owner ~/Java/jdk1.5.0_05
    $ ./java <arguments>
    bash: syntax error near unexpected token `newline'
    Then(without < >):
    user@owner ~/Java/jdk1.5.0_05
    $ ./java arguments
    bash: ./java: No such file or directory
    user@owner ~
    $ ./java javac
    Exception in thread "main" java.lang.NoClassDefFoundError: javac
    user@owner ~
    $ ./java java
    Exception in thread "main" java.lang.NoClassDefFoundError: java
    Then :
    user@owner ~/Java/jdk1.5.0_05
    $ echo "PATH=$PATH:~/jdk1.5.0_05/bin" >> $HOME/.bashrc
    It accepted it.
    Then:
    user@owner ~/Java/jdk1.5.0_05
    $ javac HelloWorldApp.java
    bash: javac: command not found
    user@owner ~/Java/jdk1.5.0_05
    $ java HelloWorldApp
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp
    Unfortunately the same result.
    Could you please tell me what else I have to do in order to compile it and run it?
    Thanks a lot!

  • Want To create Zip file  using java,And Unzip without Java Program

    I want to create a zip text file using java, I know Using ZipOutputStream , we can create a zip file, , But i want to open that zip file without java program. suppose i use ZipOutputStream , then zip file is created But for unZip also difftrent program require. We cant open that zip file without writing diff java program.
    Actually i have one text file of big size want to create zip file using java , and unzip simply without java program.Its Possible??
    Here is one answer But I want to open that file normal way(
    For Exp. using winzip we can create a zip file and also open simply)
    http://forum.java.sun.com/thread.jspa?threadID=5182691&tstart=0

    Thanks for your Reply,
    I m creating a zip file using this program, Zip file Created successfully But when im trying to open .zip file i m getting error like "Canot open a zip file, it does not appear to be valid Archive"
    import java.io.*;
    import java.util.zip.*;
    public class ZipFileCreation
         public static void main (String argv[])
         try {
         FileOutputStream fos = new FileOutputStream ( "c:/a.zip" );
         ZipOutputStream zip = new ZipOutputStream ( fos );
         zip.setLevel( 9 );
         zip.setMethod( ZipOutputStream.DEFLATED );
    //     get the element file we are going to add, using slashes in name.
         String elementName = "c:/kalpesh/GetSigRoleInfo092702828.txt";
         File elementFile = new File ( elementName );
    //     create the entry
         ZipEntry entry = new ZipEntry( elementName );
         entry.setTime( elementFile.lastModified() );
    //     read contents of file we are going to put in the zip
         int fileLength = (int)elementFile.length();
         System.out.println("fileLength = " +fileLength);
         FileInputStream fis = new FileInputStream ( elementFile );
         byte[] wholeFile = new byte [fileLength];
         int bytesRead = fis.read( wholeFile , 0 /* offset */ , fileLength );
    //     checking bytesRead not shown.
         fis.close();
    //     no need to setCRC, or setSize as they are computed automatically.
         zip.putNextEntry( entry );
    //     write the contents into the zip element
         zip.write( wholeFile , 0, fileLength );
         zip.closeEntry(); System.out.println("Completed");
    //     close the entire zip
         catch(Exception e) {
    e.printStackTrace();
    }

  • I need to create an Account.jav and Account test.java but I am lost PLZHelp

    This is what I got I have tried understanding what I am doing wrong I am really lost and I am begging anyone to help me PLEASE?!?
    // Fig. 3.12: AccountTest.java
    // Create and manipulate an Account object.
    public class Account
         private double balance; // instance variable that stores the balance
       // constructor
         public Account( double initialBalance )
          // validate that initialBalance is greater than 0.0;
          // if it is not, balance is initialized to the default value 0.0
              if ( initialBalance > 0.0 )
            balance = initialBalance;
       } // end Account constructor
       // debit (subtract) an amount to the account
         public void debit( double amount )
              balance = balance - amount; // add amount to balance
        // end method debit
    if(debitAmount>account1.getBalance())
         System.out.printf("You don't have enough money for this transaction, the amount available is  $%.2f",getBalance());
    else
         account1.debit(debitAmount);
         System.out.printf("The new balance is $%.2f",getBalance());
    //And for AccountTest.java:
    public class AccountTest {
         // main method begins execution of Java application
    public static void main( String args[] )
         Account account1 = new Account( 50.00 ); // create Account object
         double currentBalance = account1.getBalance();
    // display initial balance of each object
         System.out.printf( "account1 balance: $%.2f\n",
         currentBalance );
    // create Scanner to obtain input from command window
         Scanner input = new Scanner( System.in );
         double debitAmount; // debit amount read from user
              System.out.print( "Enter withdrawl amount from your account: " ); // prompt
              debitAmount = input.nextDouble(); // obtain user input
              if(debitAmount > currentBalance)
                   System.out.printf("Debit amount of $%.2f is greater than the Available Balance of $%.2f.%n",debitAmount,currentBalance);
              else
                   System.out.printf( "\nwithdrawling %.2f to account1 balance\n\n", debitAmount );
                   account1.debit( debitAmount ); // add to account1 balance
                   currentBalance = account1.getBalance();
    // display balances
         System.out.printf( "account1 balance: $%.2f\n",     currentBalance );
         } // end main
    }

    Did you have a specific question?
    There are several thing I would like to point out
    1. Did you keep both the public classes in the same file(AccountTest.java)? Each java file can contain only one public class. Either move class Account to its own file (Account.java) or remove the public modifier (i.e., make it friend)
    2. Class Account is not defined properly. What is that hanging if statement doing there?
    3. There is a call to method getBalance() of the Account class. Where have you defined it?
    Here's the modified source.
    File 1. Account.java. Notice the method getBalance which was previously missing.
    // Separate file Account.java
    // Create and manipulate an Account object.
    public class Account
      private double balance; // instance variable that stores the balance
      // constructor
      public Account( double initialBalance )
        // validate that initialBalance is greater than 0.0;
        // if it is not, balance is initialized to the default value 0.0
        if ( initialBalance > 0.0 )
          balance = initialBalance;
      } // end Account constructor
      // debit (subtract) an amount to the account
      public void debit( double amount )
        balance = balance - amount; // add amount to balance
      }// end method debit
      public double getBalance()
        return this.balance;
    }File 2. AccountTest.java.
    //AccountTest.java
    import java.util.Scanner;
    public class AccountTest
      // main method begins execution of Java application
      public static void main( String args[] )
        Account account1 = new Account( 50.00 ); // create Account object
        double currentBalance = account1.getBalance();
        // display initial balance of each object
        System.out.printf( "account1 balance: $%.2f\n", currentBalance );
        // create Scanner to obtain input from command window
        Scanner input = new Scanner( System.in );
        double debitAmount; // debit amount read from user
        System.out.print( "Enter withdrawl amount from your account: " ); // prompt
        debitAmount = input.nextDouble(); // obtain user input
        if(debitAmount > currentBalance)
          System.out.printf("Debit amount of $%.2f is greater than the Available Balance of $%.2f.%n",debitAmount,currentBalance);
        else
          System.out.printf( "\nwithdrawling %.2f to account1 balance\n\n", debitAmount );
          account1.debit( debitAmount ); // add to account1 balance
          currentBalance = account1.getBalance();
        // display balances
        System.out.printf( "account1 balance: $%.2f\n",  currentBalance );
      } // end main
    }Are your questions answered? Have you learnt something out of all this?

  • Multi-authoring with source control with RH10 and RH11

    Situation:
    Writer A is running RH10. Writer A opens Project A, from Visual Studio Source Control, which is connected to a Team Foundation Server.
    A new employee, Writer B, has been given RH11.
    Writer A can't install RH11 until after mid-June because of tight schedules (can't afford any upgrade problems).
    Writer B is supposed to work on the same Help project. (We know that RoboHelp does not support checking out the same file at the same time.)
    If Writer B configures her version of RH11 to work with TFS and Source Control, can she open Project A and work on it (from Source Control) without causing problems for Writer A?
    Thanks.
    Carol Levine

    If Writer B is not using Source Control or it is competely separate from Writer A, possibly but I still would not be comfortable.
    I think I would rather upgrade Writer A and I note your reservations. It's your call but it's like being between the devil and the deep blue sea. Neither is ideal.
    So far it looks like Rh11 upgrades have been OK.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Sessionmanagement with NES and Network Addresstranslation

    Hi guys,
              I have a strange problem. I use NES with NSAPI Bridge as proxy for a
              Weblogic cluster. This cluster consists of two machines with Solaris 2.7 and
              Weblogic Server 4.5.1 SP7. The cluster works and the sessions are replicated
              between the primary and the secondary server. There is a CookieName
              configured in the properties and in the bridge too. I use the bridge from
              the WLS 5.1 distribution (along with recommendations). Between the bridge
              and the cluster there is a gateway which translates the used ip addresses.
              Along with recommendations I have configured the property
              weblogic.system.DNSName with the ip addresses used within the bridge
              configuration.
              But if I issue a request to the SessionServlet of the distribution the
              bridge doesnt routes the request to the primary server, but the bridge make
              a round robin between the cluster members. If I shut down a member of the
              cluster, the session management works.
              Does anyone has an idea? Each help is welcome.
              Thanks Lutz Strobel
              

    May be I did say it right. Let me try this again.
              Say there are two servers in the cluster, Servers A and B. If the proxy thinks
              that Server B is the primary, after NAT, if the request doesn't go to Server B,
              then you are breaking the replication mechanism.
              Hope this helps.
              - Prasad
              Bob Kiep wrote:
              > Are you sure you cannot do NAT between the bridge and the cluster? I would
              > imagine that many many sites perform address translation between their DMZ
              > where the bridge is located, and the "inside" where the cluster is.
              >
              > If NAT is a no-no, then firms will be revealing to hackers a lot about their
              > internal addressing schemes by putting the "inside" IP addresses in config.
              > files on the web server
              > .
              >
              > "Prasad Peddada" <[email protected]> wrote in message
              > news:[email protected]...
              > > You shouldn't be doing any address translation between the bridge and the
              > WLS.
              > > Essentially you are breaking the whole mechanism on which the replication
              > works.
              > > Any way what kind of address translation are you talking about here?
              > >
              > > - Prasad
              > >
              > >
              > > Lutz Strobel wrote:
              > >
              > > > Hi guys,
              > > >
              > > > I have a strange problem. I use NES with NSAPI Bridge as proxy for a
              > > > Weblogic cluster. This cluster consists of two machines with Solaris 2.7
              > and
              > > > Weblogic Server 4.5.1 SP7. The cluster works and the sessions are
              > replicated
              > > > between the primary and the secondary server. There is a CookieName
              > > > configured in the properties and in the bridge too. I use the bridge
              > from
              > > > the WLS 5.1 distribution (along with recommendations). Between the
              > bridge
              > > > and the cluster there is a gateway which translates the used ip
              > addresses.
              > > > Along with recommendations I have configured the property
              > > > weblogic.system.DNSName with the ip addresses used within the bridge
              > > > configuration.
              > > > But if I issue a request to the SessionServlet of the distribution the
              > > > bridge doesnt routes the request to the primary server, but the bridge
              > make
              > > > a round robin between the cluster members. If I shut down a member of
              > the
              > > > cluster, the session management works.
              > > > Does anyone has an idea? Each help is welcome.
              > > > Thanks Lutz Strobel
              > >
              

  • Homehub 3 problems with wifi and network - please ...

    I am hoping someone can help me, as I am struggling to work out why I am getting so many problems with my network at home.
    I have BT Infinity, and a Homehub 3A. I have had BT broadband for years. Infinity was added in Feb 2013. The HH3A is the original one supplied to me years ago.
    When Infinity was installed I also added a pair of TP Link powerline adapters, to provide a connection to an unmanaged network switch in the lounge.
    A rough outline of what I have connected to the router is:
    Wired
    - Synology NAS Diskstation
    - Win7 laptop
    - powerline adapter
    Wifi
    - 3 iphones
    - 2 ipads
    - Win7 laptop
    - 2 Win Vista laptops
    Powerline / network switch
    - Sonos bridge
    - TV
    - BluRay
    - Vodafone booster
    - SkyHD
    Recently I am getting a number of different problems:
    1) wifi drops to everything connected to the router, at the same time, all blue lights are on the router
    I lose wifi connection to the internet, from all devices, at the same time, but also the connection from my laptop to the NAS drops.
    2) Anything connected to the Powerline adapter is rarely available
    I try and connect to Sonos, or my sky box or the TV, but they aren't connected to the router. The lights on the powerline adapters indicate everything is fine, and the HH3 has all blue lights. But my iphone and laptop cannot find my Sonos. My iphone app cannot find my sky box. And on the TV it says it is not connected to the internet. To solve this problem I have to power cycle the pair of Powerline adapters.
    Some observations:
    1) these problems are all since Infinity was installed. I have no idea if that is relevant.
    2) My NAS Diskstation has a powersave mode. I noticed last night that when I woke it up, the powerline adapters disconnected briefly, before reconnecting. But when they did reconnect I could not access anything connected to them. It was as if the NAS had booted them off the network, and then they couldn't get back on.
    3) I run a 10m brand new Cat5e cable from the infinity modem to my router, because the modem is in the garage.
    Can anyone help? I am tearing my hair out with this.
    Thanks for any help.

    If you set the devices on the home hub to always use the same IP address, then that can help.
    The problem is that when the DHCP lease expires, the home hub often gives the device a different IP address, and this breaks the port forwarding rules.
    Some routers allow you to specify which IP addresses are to be reserved, but the home hub does not.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • Working with request and respond in Java.. Help needed.

    I'm currently working on making a old time- multiplayer shooter in java.
    It will have a TCP server, that got all the games that are hosted
    And all clients will connect and get the list of hosted games from this server..
    To communicate, I made interfaces for request, and respond.
    Logon object:
    public class LogonObject implements Serializable, MSRequest, MSResponse {
        public String USERNAME;
        public String PASSWORD;
        public void clientWork(MainServerManager client) { // client will do this work..
            // Client work..
        public void serverWork(RCOS server) { // RCOS is the threaded object that contains socket to the client etc..
            // Serverwork..
    }So currently, my cast in client looks like this:
            MSResponse objCast = (MSResponse) obj;
            objCast.clientWork(this);Since all the objects im sending, will be of either type of MSRequest or MSRespond, i have not found any problems with it.
    But im wondering if there is any better way to do this?
    One of the reasons why im wondering, is because i want to split up the project a bit.
    At the moment, i got everything in one project (in Netbeans), and got packages like: Client, Client.Network, Client.GUI, Server, Server.Network, Server.DIV, Shared.NetworkObjects, and so on.
    Shared contains all the classes that will go back and forth the client and server.
    But I want to split them up into different projects. So Server is a project at its own.
    So i tried in netbeans, to make one project for Server, one for Client and one for Shared.
    This i thought would work out great, but when i tried to add the projects as libraries, I could'nt add both ways.
    This is how i would want it to work:
    Server (Access to shared)
    Client (Access to shared)
    Shared (Access to client and server)
    Except when I add Shared in Server as a library, I cant add Server as a library in Server, and same for client.
    Netbeans gives me the message: Can't add cylic reference.
    So that brings me back to the question, is there a better way for me to split it up, or make the shared network files?
    Ps: Sorry if its the wrong forum, but it goes under more than one thing, atleast as i figure.
    Kind reguards..

    Lgeee wrote:
    And how would i go about doing that?By making a proper design.
    This way, I can easily do what the object itself is made to do, without writing alot of code that checks what kind of object was sendt.
    The first way I did this was:
    Psudo Code:
    Object obj = input.readObject();
    String type = obj.getClass().toString();
    if (type.contains("logonObject")) {
    } else if (type.contains("playerObject")) {
    I don't think that's relevant. I don't see where that code uses anything which is specific to the server and to the client. Those class names look like they belong in the server, so that code shouldn't be in a "shared" class. It should be in a "server" class.
    As for the issue of having to tell what kind of object was sent, I'm sure there are better ways than just sending an object and then having the receiver inspect the object to see what kind of object it was.

  • Java and networking; best method?

    I am writing a manufacturing application where the DB will reside on a server. I need multiple computers utilizing the application concurrently.
    Is there any reason why each workstation couldn't have a copy of the application and simply point to, and access, the DB on the server?
    Or should the application also reside on the server with client applications on the workstations?
    I am concerned that the latter may be best but more programming.
    Looking for advice and opinions.
    TIA

    import java.sql.*;
    public class ProdUpdate
    private static final String
    SOURCE_URL = "jdbc:odbc:Produits"
    , DRIVER_CLASS_NAME = "sun.jdbc.odbc.JdbcOdbcDriver"
    private Connection dbConnection;
    public ProdUpdate ()
    dbConnection = null;
    CreateConnection ();
    public void CreateConnection ()
    // Possible exception cases:
    // -- driver class not found (Class.forName (String))
    // -- SQL problem (database not there!)
    try
    // -- Load the driver class
    Class.forName (DRIVER_CLASS_NAME);
    dbConnection = DriverManager.getConnection (SOURCE_URL);
    catch (ClassNotFoundException cnfe)
    System.err.println (cnfe.getMessage ());
    catch (SQLException sqle)
    System.err.println (sqle.getMessage ());
    public void ListProdUpdate ()
    final String ProdNumb = "Select * From 04PRODUI";
    try
    System.out.println ("Connection:");
    if (dbConnection == null)
              System.err.println ("Connection not created properly");
    Statement stmt = dbConnection.createStatement ();
    ResultSet results = stmt.executeQuery (ProdNumb);
    System.out.println ("The ProdNumb are:");
    while (results.next ())
    System.out.println (results.getString ("PNUM"));
    results.close ();
    catch (SQLException sqle)
    System.err.println (sqle.getMessage ());
    public void CloseConnection ()
    if (dbConnection != null)
    // Possible exception cases:
    // -- SQL problem (database not open!)
    try
    dbConnection.close ();
    catch (SQLException sqle)
    System.err.println (sqle.getMessage ());
    dbConnection = null; // simplify garbage collection
    public static void main (String [] args)
    ProdUpdate pb = new ProdUpdate ();
    pb.ListProdUpdate ();
    pb.CloseConnection ();
    and I received
    Not data found
    Connection not created properly
    ... NullPointerException

  • Problem with queue and context change JAVA udf

    Hi all,
    MY scenorio is from source i get multiple instances and each instance i need to pass to different fields od target
    in one source instance i may get multiple values which i have to create multple nodes under one target instance.
    my source xml looka like below:
    - <CustomFieldsSegment>
    - <CustomFields Name="ForeignLanguageonPackaging">
      <Value Qualifier="en">English</Value>
      <Value Qualifier="fr">French</Value>
      </CustomFields>
    - <CustomFields Name="LayerHeight">
      <Value>5.0</Value>
      </CustomFields>
    - <CustomFields Name="LayerHeightUOM">
      <Value Qualifier="IN">Inches</Value>
      </CustomFields>
      </CustomFieldsSegment>
      </TargetMarketData>
      </ItemRegistration>
      </Payload>
      </ns:MT_TradeItemsExport>
    in the above xml the first custom field has qualifier "en' and "fr"
    i need to create 2 nodes under one target field.
    example:
    <AttrMany Name="ForeignLanguageonPackaging">
      <Value ="en">en</Value>
      <Value ="fr">fr</Value>
      </AttrMany>
    int eh source node <CustomFields Name="ForeignLanguageonPackaging"> may come in any matter .doesnt come always first
    and i wrote udf like below:
    public void queue(String[] a,String[] b,String[] c,ResultList result,Container container){
        // write your code here
    AbstractTrace traceObj = container.getTrace();
        int baseArrayIndex = 99;
        int ccCount = 0;
        boolean isfound = false;
        for (int i = 0; i < a.length; i++) {
               isfound = false;
            if (a<i>.equals(c[0])) {
            baseArrayIndex = i;
      traceObj.addInfo("initial  "+ i);
            for (int j = 0; j < b.length; j++) {
                if (b[j].equals(ResultList.CC)) {
                ccCount++;
                } else {
                if ( baseArrayIndex == ccCount ) {
                   result.addValue(b[j]);
      traceObj.addInfo("result  "+ b[j]);
                    isfound = true;
            break;
    if (!isfound)
    result.addSuppress();
      traceObj.addInfo("final result  "+ result);
    Please can anyone help me.
    Regards,
    jyothi

    Hi all,
    MY scenorio is from source i get multiple instances and each instance i need to pass to different fields od target
    in one source instance i may get multiple values which i have to create multple nodes under one target instance.
    my source xml looks like below:each ItemRegistration is one item at target
    -<ItemRegistration>
    - <CustomFieldsSegment>
    - <CustomFields Name="ForeignLanguageonPackaging">
    <Value Qualifier="en">English</Value>
    <Value Qualifier="fr">French</Value>
    </CustomFields>
    - <CustomFields Name="LayerHeight">
    <Value>5.0</Value>
    </CustomFields>
    - <CustomFields Name="LayerHeightUOM">
    <Value Qualifier="IN">Inches</Value>
    </CustomFields>
    </CustomFieldsSegment>
    </TargetMarketData>
    </ItemRegistration>
    -<ItemRegistration>
    - <CustomFieldsSegment>
    - <CustomFields Name="ForeignLanguageonPackaging">
    <Value Qualifier="en">English</Value>
    <Value Qualifier="fr">French</Value>
    </CustomFields>
    - <CustomFields Name="LayerHeight">
    <Value>5.0</Value>
    </CustomFields>
    - <CustomFields Name="LayerHeightUOM">
    <Value Qualifier="IN">Inches</Value>
    </CustomFields>
    </CustomFieldsSegment>
    </TargetMarketData>
    </ItemRegistration>
    </Payload>
    </ns:MT_TradeItemsExport>
    in the above xml the first custom field has qualifier "en' and "fr"
    i need to create 2 nodes under one target field.
    example:
    <AttrMany Name="ForeignLanguageonPackaging">
    <Value ="en">en</Value>
    <Value ="fr">fr</Value>
    </AttrMany>
    int eh source node <CustomFields Name="ForeignLanguageonPackaging"> may come in any matter .doesnt come always first
    and i wrote udf like below:
    public void queue(String] a,String[ b,String[] c,ResultList result,Container container){
    // write your code here
    AbstractTrace traceObj = container.getTrace();
    int baseArrayIndex = 99;
    int ccCount = 0;
    boolean isfound = false;
    for (int i = 0; i < a.length; i++) {
    isfound = false;
    if (a.equals(c[0])) {
    baseArrayIndex = i;
    traceObj.addInfo("initial "+ i);
    for (int j = 0; j < b.length; j++) {
    if (b[j].equals(ResultList.CC)) {
    ccCount++;
    } else {
    if ( baseArrayIndex == ccCount ) {
    result.addValue(b[j]);
    traceObj.addInfo("result "+ b[j]);
    isfound = true;
    if (!isfound)
    result.addSuppress();
    traceObj.addInfo("final result "+ result);
    if i have only one item at the source it is working but when 2items are comming from the source my udf is not working.
    can anyone help me if you have faced the similar problem or who is fimilar like this kind.
    Regards,
    jyothi
    Edited by: jyothi vonteddu on Oct 21, 2009 9:14 PM
    Edited by: jyothi vonteddu on Oct 21, 2009 9:22 PM

  • Tried to launch photoshop CS 5.1 suite, messages said I had to unistall it - and then reinstall it but needed to download Java se 6 I installed java and was given Java for Ox 2014-001 then uninstalled PS  I have been unable to reinstall PS 5.1 I don't kno

    I tried to launch photoshop CS 5.1 design premium suite. It did not launch.( Have not had a problem before this) Received a message which said that I had to uninstall it  and then reinstall....but first had to download Java se6. I installed Java...
    it gave me Java OX 2014-001.Message:   that version supercedes all previous versions of Java.
    Went back to PS suite icon and uninstalled all. I have been unable to figure out how to
    reinstall this program.  The only thing that I could find was a very grey icon with an arrow that said "finder".
    Went to the finder icon, searched with NO SUCCESS. Please help.  I have read several blogs and many people seem to be having
    this problem. Note. I recently upgraded to Yosemite.  jude obscure. Thank you

    Thanks for reply. Will search for the answer on forum .  Just found the forum website about 2 days ago.
    Adobe help contacted me. Offered an $1,800. upgrade to PS 6. Not a good choice. Was very happy
    with PS 5 design suite.  Will try to figure out how to download PS updates and manually apply them.
    Adobe person walked me thru a download process for PS 5....last night.
    After  2:30 am I installed PS 5  design suite.  I now have a PS 5 D.S. icon with a red disc on desktop..
    but am unable to install it.  Will continue to search for way to apply it. thanks again.

Maybe you are looking for