New implementations possible in LAN environment using RMI

In LAN setup of a college, what are the things I can implement using RMI?
I have developed a gaming interface and Database set up.
Other than the above mentioned things what can I develop?
Please help me with your valuable suggetions.

I did some more testing.
I setup a test environment with:
-Exchange 2013 SP1 on win2k12 r2
-Outlook 2010 SP2 on windows 7 sp1
-Outlook 2010 SP2 on windows 8.1
-Outlook 2013 SP1 on windows 8.1
Both windows 7 and windows 8.1 have the very slow upload issue to Exchange 2013. Windows 7 upload to Exchange 2013 is around 20-70KB/sec (bytes) via LAN. Windows 8.1 upload is a bit more responsive at around 500-600KB/sec (bytes) via LAN.
I changed the TcpAckFrequency to 1 for windows 7 and 8.1 and the problem went away. The upload on both Windows 7 and 8.1 was going at megabytes after the change.
I hope Microsoft fixes this soon.
PowerShell script to have this automated via GPO:
http://community.spiceworks.com/topic/571571-outlook-slow-after-migrating-to-exchange-2013
PowerShell Script:
$strGUIDS=[array](Get-WmiObject win32_networkadapter -filter "netconnectionstatus = 2" | select -expand GUID)
foreach ($strGUID in $strGUIDS) {New-ItemProperty -path HKLM:\System\CurrentControlSet\services\Tcpip\Parameters\Interfaces\$strGUID -propertytype DWORD -name TcpAckFrequency -value 1}

Similar Messages

  • Exception while sending mesg in a lan environment using PTP

    hi
         i have a problem while running the simpleQueueSender/Receiver in mutilple system(in Lan environment). i follow the steps given in the tutorial under (Running JMS Client Programs on Multiple Systems) where they have said .
    On sender end, create a connection factory with the same name that points to the server on receiver. Enter a command like the following:
    j2eeadmin -addJmsFactory jms/EarthQCF queue -props
    url=corbaname:iiop:earth:1050#earth
    * what i need to know is what command have i to give
    * what those corbaname:iiop and #earth mean here.
    note:: i work in a linux OperatingSystem so what command i have to give to run my application.
    when i try to run the application by giving the
    j2eeadmin -addJmsFactory jms/EarthQCF queue -props url=hostname of my m/c:1050#hostname of my m/c
    then i have changed the lookup to jms/EarthQCF and recomplied as told and while running the sender end the error what i got was,
    Queue name is MyQueue
    Java(TM) Message Service 1.0.2 Reference Implementation (build b14)
    SEVERE unable to locate resource bundle: com.sun.jms.LocalStrings
    SEVERE unable to locate resource bundle: com.sun.jms.LocalStrings
    Exception in thread "main" java.lang.NullSointerE ception     &at com.sun.jms.client.ConnectionImpl.invokeRemoteCreateConnection(ConnectionImpl.java:149)
    at com.sun.jms.ConnectionFactoryImpl.createConnection(ConnectionFactoryImpl.java:293)
    at com.sun.jms.QueueConnectionFactoryImpl.createQueueConnection(QueueConnectionFactoryImpl.java:77)
    at com.sun.jms.QueueConnectionFactoryImpl.createQueueConnection(QueueConnectionFactoryImpl.java:58)
    at com.sun.enterprise.jms.ConnectionFactoryWrapperStandalone.createQueueConnection(ConnectionFactoryWrapperStandalone.java:44)
    at SimpleQueueSender.main(SimpleQueueSender.java:90)
    advance thanx for the helping brain's
    perums

    hello
         this is perums y dont u help
    perums

  • New implementations using core java in a project in RMI

    hi, M a final year engineering student in Comp science.i wantu do a project of nearly 400hrs,can any one pls tel me the new things tat i can implement in RMI in LAN environment..most of the things i ve thought of ,were found to be pretty old.pls give ur suggestions.its as bit urgent.
    Thankyou,

    hi, M a final year engineering student in Comp science.i wantu do a project of nearly 400hrs,
    can any one pls tel me the new things tat i can implement in RMI in LAN environment..
    most of the things i ve thought of ,were found to be pretty old.
    pls give ur suggestions.its as bit urgent.
    Thankyou,http://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal - in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • Possible to use RMI to upload client side image files?

    Is it possible to use RMI to upload client side image files? My intent is to allow remote clients to upload a number of small image files (jpg & gif) to a central server DBMS, by modifying a "Customer" object (eg adding a new Image object to a vector of Images?) Is this possible? Any suggestions greatly appreciated :))

    Is it possible to use RMI to upload client side image
    files? One possibility is to implement a serializable image object that you can upload to the server as any other object. When your server receives this serialized image object, just generate a new gif/jpg from it.
    But if your client-program is an applet, the situation is different: how can applet read image-file from users harddrive?
    krera

  • To call methods inside the same application is possible to use RMI ?

    hello,
    What I should like to know is if RMI can easily be used to implement comunication (calling methods) inside classes that are part of the one same application... This should be a restrict case to use RMI...
    The reason to do it come from the need to use the instance of a class knonwing it only as Object... This can be good to do if some code is used for general pupose in many different contexts.
    In this case you can pass to the "server class" a parameter 'o' of type Object (all the classes extend Object) of the "customer class" to get back informations if some elaboration happen inside the "server class"...
    This purpose is generally implemented with event listeners, but perhaps it could be done easily using RMI too (I dont know it...).
    Using RMI in this simple situation, don't should require anything of complicate (stub, .... mashalling parametres....) to have the reference to method of the "customer class" to call. The "server class" already recives a reference of the "customer class" how parameter of type Object, and the mame of the method too.
    I propose a simple thoeric example to explain really what I said before:
    Class Server {
        String methodName;
        Object obj;
        pubic Server( Oject o , String metName){  // constructor
            obj = o;
            methodName = metName;
            // some thing is done and, at last, the method callbakMethod() is executed
            callbakMethod();
        }// constructor
        public void callbakMethod(){ // this method have the purpose to call customerMethod()
              Class c = owner.getClass();                            
              Method m = null;
                  try {
                          m = c.getMethod("callBackMethod",null);     
                         * // (1)
                          // I think that here we could have the possibility to call
                          // the method  customerMethod() belonging to class Customer..
                          // I don't know if it possible and  ...  (and if it is possible) I am not able to do it*
        }// callbakMethod()
    }  // class Server
    Class Custmer{
        public Customer() { // constructor
              Server s = new Server (this, "customerMethod");
        } // constructor
        customerMethod() {    // I would this method is called from class Server
            // do some thing.....
        }  //customerMethod
    }  // class CustomerMy ask is: it is possible to call customerMethod() from the Server class ?...
    If the aswer is yes, I wold know the sintax to use to do it, please.
    thank you
    regards
    tonyMrsangelo

    RMI doesn't help you in the slightest here. You can just realize it all using local method invocation. All RMI does is to make that remote. If the objects aren't remote there is no point.

  • Will multiple Lan cards cause problems using rmi?

    Will multiple Lan cards cause problems using rmi? If a host has two or more network cards (only one of which is Internet-enabled), how does RMI know which IP address to use? There seems to be a problem when such a client registers with an RMI service, and has a client-side callback method invoked by the server.

    You can tell RMI the address you want by defining java.rmi.server.hostname at the JVM which exports the remote object.

  • HT204266 Every time i try downloading anything from app store it gives an error message saying "This is not a Test User account. Please create a new account in the Sandbox environment."  and i didn't use jailbreak and never downloaded cracked software

    Everytime i try to download from app store it gives me an error message saying "This is not a Test User account. Please create a new account in the Sandbox environment." although i never used jailbreak or downloaded cracked software

    Yep, I've been reading through other threads on lots of different sites over the last few hours and I can't seem to find a working solution, even though some seem to have worked for other people.
    Most of them hadn't been updated in a while so I made my own post to see if anyone has anything new.

  • Set up new sales org/plant but without using Finance - is this possible?

    Hi,
    I was asked if the following is possible.
    Set up a new sales org/plant but without using Finance.
    It should be possible to create purchase order with goods in
    and sales orders with delivery and goods issue.
    But the invoice will be done in an external system.
    So, all what has to do with finance will be done in an external system
    also the goods in/goods out values.
    So the stock and stock movements should be visible in SAP, but the values for this stock
    will be posted in the external system manually.
    So the question is: Is it possible to set up a new sales org/plant
    but without using Finance?
    Thanks
    Regarfds
    Dieter

    Hi,
    really nobody has a hint?
    Most important: the stock movements should only consider only quantity no values?
    Isn´t there any way to say for a certain material it only consider quantities but no values?
    Regards
    Dieter

  • Possible to use RMI without IIOP for EJBs?

    Is it possble to use RMI on a client to connect to a remote EJB without using CORBA
    (IIOP)?
    How might I do it?
    I'd like to avoid the CORBA overhead if possible.
    Thanks.

    Do I just have to replace iiop:// with t3:// in the url?
    Andy Piper <[email protected]> wrote:
    "Tom Hennen" <[email protected]> writes:
    Is it possble to use RMI on a client to connect to a remote EJB withoutusing CORBA
    (IIOP)?
    How might I do it?
    I'd like to avoid the CORBA overhead if possible.Use t3
    andy

  • Chat Applet using RMI .... trouble running the Applet using the IE browser.

    Hi,
    I'm trying to run a chat application using RMI technology. Actually, this wasn't created from the scratch. I got this one from from the cd that comes with the book I bought and I did some refinements on it to suit what I wanted to:
    These are the components of the chat application:
    1. RApplet.html - invokes the applet
    html>
    <head>
    <title>Sample Applet Using Dialog Box (1.0.2) - example 1</title>
    </head>
    <body>
    <h1>The Sample Applet</h1>
    <applet code="RApplet.class" width=460 height=160>
    </applet>
    </body>
    </html>
    2. RApplet.java - Chat session client applet.
    import java.rmi.*;
    import java.applet.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    import java.rmi.server.*;
    //import ajp.rmi.*;
    public class RApplet extends Applet implements ActionListener {
    // The buttons
    Button sendButton;
    Button quitButton;
    Button startButton;
    Button clearButton;
    // The Text fields
    TextField nameField;
    TextArea typeArea;
    // The dialog for entering your name
    Dialog nameDialog;
    // The name the server knows us as
    String privateName;
    // The name we want to be known as in the chat session
    String publicName;
    // The remote chats erver
    ChatServer chatServer;
    // The ChatCallback
    ChatCallbackImplementation cCallback;
    // The main Chat window and its panels
    Frame mainFrame;
    Panel center;
    Panel south;
    public void init() {
    // Create class that implements ChatCallback.
    cCallback = new ChatCallbackImplementation();
         // Create the main Chat frame.
         mainFrame = new Frame("Chat Server on : " +
                        getCodeBase().getHost());
         mainFrame.setSize(new Dimension(600, 600));
         cCallback.displayArea = new TextArea();
         cCallback.displayArea.setEditable(false);
         typeArea = new TextArea();
         sendButton = new Button("Send");
         quitButton = new Button("Quit");
         clearButton = new Button("Clear");
         // Add the applet as a listener to the button events.
         clearButton.addActionListener(this);
         sendButton.addActionListener(this);
         quitButton.addActionListener(this);
         center = new Panel();
         center.setLayout(new GridLayout(2, 1));
         center.add(cCallback.displayArea);
         center.add(typeArea);
         south = new Panel();
         south.setLayout(new GridLayout(1, 3));
         south.add(sendButton);
         south.add(quitButton);
         south.add(clearButton);
         mainFrame.add("Center", center);
         mainFrame.add("South", south);
         center.setEnabled(false);
         south.setEnabled(false);
         mainFrame.show();
         // Create the login dialog.
         nameDialog = new Dialog(mainFrame, "Enter Name to Logon: ");
         startButton = new Button("Logon");
         startButton.addActionListener(this);
         nameField = new TextField();
         nameDialog.add("Center", nameField);
         nameDialog.add("South", startButton);
         try {
         // Export ourselves as a ChatCallback to the server.
         UnicastRemoteObject.exportObject(cCallback);
         // Get the remote handle to the server.
         chatServer = (ChatServer)Naming.lookup("//" + "WW7203052W2K" +
                                  "/ChatServer");
         catch(Exception e) {
         e.printStackTrace();
         nameDialog.setSize(new Dimension(200, 200));
         nameDialog.show();
    * Handle the button events.
    public void actionPerformed(ActionEvent e) {
         if (e.getSource().equals(startButton)) {
         try {
              nameDialog.setVisible(false);;
              publicName = nameField.getText();
              privateName = chatServer.register(cCallback, publicName);
              center.setEnabled(true);
              south.setEnabled(true);
              cCallback.displayArea.setText("Connected to chat server as: " +
                             publicName);
              chatServer.sendMessage(privateName, publicName +
                             " just connected to server");
         catch(Exception ex) {
              ex.printStackTrace();
         else if (e.getSource().equals(quitButton)) {
         try {
              cCallback.displayArea.setText("");
              typeArea.setText("");
              center.setEnabled(false);
              south.setEnabled(false);
              chatServer.unregister(privateName);
              nameDialog.show();
         catch(Exception ex) {
              ex.printStackTrace();
         else if (e.getSource().equals(sendButton)) {
         try{
              chatServer.sendMessage(privateName, typeArea.getText());
              typeArea.setText("");
         catch(Exception ex) {
              ex.printStackTrace();
         else if (e.getSource().equals(clearButton)) {
         cCallback.displayArea.setText("");
    public void destroy() {
         try {
         super.destroy();
         mainFrame.setVisible(false);;
         mainFrame.dispose();
         chatServer.unregister(privateName);
         catch(Exception e) {
         e.printStackTrace();
    3. Chatcallback.java - interface used by clients to connect to the server.
    import java.rmi.*;
    public interface ChatCallback extends Remote {
    public void addMessage(String publicName,
                   String message) throws RemoteException;
    4. ChatcallbackImplementation.java - implements Chatcallback interface.
    import java.rmi.*;
    import java.io.*;
    import java.awt.event.*;
    import java.awt.*;
    public class ChatCallbackImplementation implements ChatCallback {
    // The buttons
    // The Text fields
    TextArea displayArea;
    public void addMessage(String publicName,
                   String message) throws RemoteException {
    displayArea.append("\n" + "[" + publicName + "]: " + message);
    5. Chatserver.java - interface for the chat server.
    import java.rmi.*;
    import java.io.*;
    public interface ChatServer extends Remote {
    public String register(ChatCallback object,
                   String publicName) throws RemoteException;
    * Remove the client associated with the specified registration string.
    * @param registeredString the string returned to the client upon registration.
    public void unregister(String registeredString) throws RemoteException;
    * The client is sending new data to the server.
    * @param assignedName the string returned to the client upon registration.
    * @param data the chat data.
    public void sendMessage(String registeredString, String message) throws RemoteException;
    6. ChatServerImplementation.java - implements Chatserver interface.
    import java.rmi.*;
    import java.util.*;
    import java.rmi.server.*;
    import java.io.*;
    * A class that bundles the ChatCallback reference with a public name used
    * by the client.
    class ChatClient {
    private ChatCallback callback;
    private String publicName;
    ChatClient(ChatCallback cbk, String name) {
         callback = cbk;
         publicName = name;
    // returns the name.
    String getName() {
         return publicName;
    // returns a reference to the callback object.
    ChatCallback getCallback() {
         return callback;
    public class ChatServerImplementation extends UnicastRemoteObject
    implements ChatServer {
    // The table of clients connected to the server.
    Hashtable clients;
    // Tne number of current connections to the server.
    private int currentConnections;
    // The maximum number of connections to the server.
    private int maxConnections;
    // The output stream to write messages to.
    PrintWriter writer;
    * Create a ChatServer.
    * @param maxConnections the total number if connections allowed.
    public ChatServerImplementation(int maxConnections) throws RemoteException {
         clients = new Hashtable(maxConnections);
         this.maxConnections = maxConnections;
    * Increment the counter keeping track of the number of connections.
    synchronized boolean incrementConnections() {
         boolean ret = false;
         if (currentConnections < maxConnections) {
         currentConnections++;
         ret = true;
         return ret;
    * Decrement the counter keeping track of the number of connections.
    synchronized void decrementConnections() {
         if (currentConnections > 0) {
         currentConnections--;
    * Register with the ChatServer, with a String that publicly identifies
    * the chat client. A String that acts as a "magic cookie" is returned
    * and is sent by the client on future remote method calls as a way of
    * authenticating the client request.
    * @param object The ChatCallback object to be used for updates.
    * @param publicName The String the object would like to be known as.
    * @return The actual String assigned to the object for removing, etc. or
    * null if the client could not register.
    public synchronized String register(ChatCallback object, String publicString) throws RemoteException {
         String assignedName = null;
         if (incrementConnections()) {
         ChatClient client = new ChatClient(object, publicString);
         assignedName = "" + client.hashCode();
         clients.put(assignedName, client);
         out("Added callback for: " + client.getName());
         return assignedName;
    * Remove the client associated with the specified registration string.
    * @param registeredString the string returned to the client upon registration.
    public synchronized void unregister(String registeredString) throws RemoteException {
         ChatCallback cbk;
         ChatClient sender;
         if (clients.containsKey(registeredString)) {
         ChatClient c = (ChatClient)clients.remove(registeredString);
         decrementConnections();
         out("Removed callback for: " + c.getName());
         for (Enumeration e = clients.elements(); e.hasMoreElements(); ) {
              cbk = ((ChatClient)e.nextElement()).getCallback();
              cbk.addMessage("ChatServer",
                        c.getName() + " has left the building...");
         else {
         out("Illegal attempt at removing callback (" + registeredString + ")");
    * Sets the logging stream.
    * @param out the stream to log messages to.
    protected void setLogStream(Writer out) throws RemoteException {
         writer = new PrintWriter(out);
    * The client is sending new message to the server.
    * @param assignedName the string returned to the client upon registration.
    * @param data the chat data.
    public synchronized void sendMessage(String registeredString, String message) throws RemoteException {
         ChatCallback cbk;
         ChatClient sender;
         try {
         out("Recieved from " + registeredString);
         out("Message: " + message);
         if (clients.containsKey(registeredString)) {
              sender = (ChatClient)clients.get(registeredString);
              for (Enumeration e = clients.elements(); e.hasMoreElements(); ) {
                   cbk = ((ChatClient)e.nextElement()).getCallback();
                   cbk.addMessage(sender.getName(), message);
         else {
              out("Client " + registeredString+ " not registered");
         catch(Exception ex){
         out("Exception thrown in newData: " + ex);
         ex.printStackTrace(writer);
         writer.flush();
    * Write s string to the current logging stream.
    * @param message the string to log.
    protected void out(String message){
         if(writer != null){
         writer.println(message);
         writer.flush();
    * Start up the Chat server.
    public static void main(String args[]) throws Exception {
         try {
         // Create the security manager
         System.setSecurityManager(new RMISecurityManager());
         // Instantiate a server
         ChatServerImplementation c = new ChatServerImplementation(10);
         // Set the output stream of the server to System.out
         c.setLogStream(new OutputStreamWriter(System.out));
         // Bind the server's name in the registry
         Naming.rebind("//" + args[0] + "/ChatServer", c);
         c.out("Bound in registry.");
         catch (Exception e) {
         System.out.println("ChatServerImplementation error:" +
                        e.getMessage());
         e.printStackTrace();
    Using my own machine (connected to a network), I tried to test this one out by setting mine as the server and also the client. I did the following:
    1. Compile the source code.
    2. Use rmic to generate the skeletons and/or stubs from the ChatCallbackImplementation and ChatServerImplementation.
    3. Start the rmiregistry with no CLASSPATH
    4. Start the server successfully.
    5. Start the applet using the AppletViewer command.
    It worked fined.
    The problem is when I ran the applet using the browser, IE explorer, the dialog boxes, frame and buttons did appear. I was able to do the part of logging on. But after that, the applet seemed to have hang. No message appeared that says I'm connected (which appeared using the appletviewer). I clicked the send button. No response.
    I double-checked my classpath. I did have my classpath set correctly. I'm still trying to figure out the problem. Up to now, I don't have any clue what it is.
    I will appreciate much if someone can help me figure what's could have possibly been wrong ....
    Thanks a lot ...

    Hi Domingo,
    I had a similar problem running applet/rmi with IE.
    Looking in IE..view..JavaConsole error messages my applet was unable to find java.rmi.* classes.
    I checked over java classes in msJVM, they're not present.
    ( WinZip C:\WINDOWS\JAVA\Packages\9rl3f9ft.zip and others from msVM installed )
    ( do not contain the java.rmi.* packages )
    I have downloaded and installed the latest msJVM for IE5. ( I think its included in later versions)
    @http://www.objectweb.org/rmijdbc/RJfaq.html I found ref to rmi.zip download to provide
    these classes. I couldn't get the classes from the site but I managed to find a ref to IBM
    site @http://alphaworks.ibm.com/aw.nsf/download/rmi which had similar download.
    The download however didn't solve my problems. I was unable to install rmi.zip with
    RmiPatch.exe install.
    I solved this by extracting the class files from rmi.zip and installing them at C:\WINDOWS\JAVA\trustlib ( msJVM installation trusted classes lib defined in
    registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Java VM\TrustedLibsDirectory )
    This solved the problem. My rmi/applet worked.
    Hope this helps you.
    Chris
    ([email protected])

  • Should may application use RMI?

    Here is the client of a news ticker i have produced. i wish to use client/ server to some how update the news items the client displays. At the moment i am 80% into implementing sockets but with further research am now considering RMI. My only problem is that i have around 2 weeks till my deadline so will not pursue this if it is too much work.
    i am using a 2d array in the client code that holds he news item title and URL. Would the RMI server hold this array instead and the client ask for this information at fixed intervals?
    help would be greatly appreciated.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.net.*;
    import java.io.*;
    public class Test7 extends JFrame
      private JFrame tickerFrame;
      private JPanel tickerpanel,stocktickerpanel;
      private JTextField displayArea;
      //private Socket client;
      //private String NewsServer;
      private ObjectOutputStream output;
      private ObjectInputStream input;
            public Test7 ()
                    super("client");
                    tickerFrame = new JFrame("Notification Ticker");
                    tickerFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    tickerFrame.setSize(new Dimension(100, 100));
                    displayArea = new JTextField();
                    tickerFrame.getContentPane().add(new JScrollPane( displayArea ), BorderLayout.NORTH );
                    tickerFrame.getContentPane().add(new Marquee( getTexts() ), BorderLayout.CENTER);
                    tickerFrame.getContentPane().add(new Stock( getStocks() ), BorderLayout.SOUTH);
                    tickerFrame.pack();
                    tickerFrame.setVisible(true);
                    //stocktickerpanel = new JPanel ();
                    //stockpanel.setSize (stockpanel.getPreferredSize ());
                    //add (stockpanel);
            public String[][] getStocks ()
              return new String[][]
                  {"BARC", "+2.1"},
                  {"PFC", "0.5"},
                  {"HDF", "-3.2"},
                  {"DDF", "+3.8"}
            public String[][] getTexts ()
                    return new String[][]
                            {"National","This is a national headline", "http://news.bbc.co.uk/1/hi/world/middle_east/3665775.stm"},
                            {"Busines","This is a business headline", "http://news.bbc.co.uk/1/hi/business/3665193.stm"},
                            {"Political","Here is a political headline", "http://news.bbc.co.uk/1/hi/uk_politics/3697675.stm"},
                            {"Enterainment","Entertainment headline here", "http://news.bbc.co.uk/1/hi/entertainment/music/3665545.stm"}
           private class Stock extends JPanel
                   private boolean paused;
                   public Stock (String[][] stocks)
                            MouseListener listener = new MouseAdapter ()
                                    public void mouseEntered (MouseEvent event)
                                            paused = true;
                                    public void mouseExited (MouseEvent event)
                                            paused = false;
                            addMouseListener (listener);
                            stocktickerpanel = new JPanel ();
                            stocktickerpanel.addMouseListener (listener);
                            for( int i = 0; i < stocks.length;  i ++ )
                                    if( i > 0 )
                                            stocktickerpanel.add (Box.createHorizontalStrut (20));
                                    }StockDisp stck = new StockDisp (stocks[0],stocks[i][1]);
    stck.addMouseListener (listener);
    stocktickerpanel.add (stck);
    add (stocktickerpanel);
    paused = false;
    new Thread (new Runnable ()
    public void run ()
    while( true )
    if( ! paused )
    int x = stocktickerpanel.getX () - 1;
    if( x < -stocktickerpanel.getWidth () )
    x = getWidth ();
    stocktickerpanel.setLocation (x, 0);
    }try
    Thread.sleep (22);
    catch( InterruptedException exception )
    }).start ();
    private class StockDisp extends JLabel
    URL url;
    public StockDisp (String name, final String price)
    setText ("<html><u>"+ name +(" : ") + price + "</u></html>");
    setForeground (Color.RED);
    addMouseListener (new MouseAdapter ()
    private class Marquee extends JPanel
    {              //private JPanel panel;
    private boolean paused;
    public Marquee (String[][] texts)
    MouseListener listener = new MouseAdapter ()
    public void mouseEntered (MouseEvent event)
    paused = true;
    setCursor( Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    public void mouseExited (MouseEvent event)
    paused = false;
    addMouseListener (listener);
    tickerpanel = new JPanel ();
    tickerpanel.addMouseListener (listener);
    for( int i = 0; i < texts.length; i ++ )
    if( i > 0 )
    tickerpanel.add (Box.createHorizontalStrut (20));
    }Link link = new Link (texts[i][0],texts[i][1],texts[i][2]);
    link.addMouseListener (listener);
    tickerpanel.add (link);
    tickerpanel.setLocation (0, 0);
    tickerpanel.setSize (tickerpanel.getPreferredSize ());
    add (tickerpanel);
    paused = false;
    new Thread (new Runnable ()
    public void run ()
    while( true )
    if( ! paused )
    int x = tickerpanel.getX () - 1;
    if( x < -tickerpanel.getWidth () )
    x = getWidth ();
    tickerpanel.setLocation (x, 0);
    }try
    Thread.sleep (30);
    catch( InterruptedException exception )
    }).start ();
    public Dimension getPreferredSize ()
    Dimension preferredSizeOfPanel = tickerpanel.getPreferredSize ();
    return new Dimension (preferredSizeOfPanel.width / 2, preferredSizeOfPanel.height);
    private class Link extends JLabel
    URL url;
    public Link (String type,String text, final String surl)
    setText ("<html>"+ type +(" : ") + text + "</html>");
    setForeground (Color.BLUE);
    addMouseListener (new MouseAdapter ()
    public void mouseClicked (MouseEvent event)
    {                                   //System.out.println (text);
    try
    url = new URL( surl );
    catch( MalformedURLException e )
    //System.out.println (url);
    //BrowserControl.displayURL(text);
    BrowserControl.displayURL(surl);
    private static void createAndShowGUI()
    {        //Make sure we have nice window decorations.
    JFrame.setDefaultLookAndFeelDecorated(true);
    Test7 ticker = new Test7();
    //ticker.runClient();
    public static void main(String[] args)
    //Schedule a job for the event-dispatching thread: //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable()
    public void run()
    createAndShowGUI();

    Yeah, I would say you could use RMI no problem. You might use UDP if you need more speed, but RMI is fine and will gaurantee message delivery. You could just use JMS or messaging I suppose, or even JMX, or other of a million possible solutions.
    I guess I'd do it like this:
    Central data (network/data model) is on some server.
    When data changes on the server, push out to client (multicast if needed?)
    How and what you push (the data) depends on how much data needs to be sent and how often

  • Is there any problems in IE if using RMI.?

    Hello buddies,
    this is my 3rd attempt to get answer. before it i tried 2 times but didn't get answered.
    actually i m making a chat application. in that there is a canvas on which we can draw something and send it to all users. i make an applet and from within the applet i m calling a frame. all this awt components like canvas and buttons etc. displays in the frame. applet is just a platform do call the frame. i m using RMI to do the chat. i tried to run it first in appletviewer and it works fine. but when i tried to run in IE from <applet> tag no frame is displays. i am trying to solve it from last 20 days but still unsolved. here is the code if anybody wishes to try it.
    // clinet frame...
    import java.rmi.*;
    import java.rmi.server.*;
    import canvas.Drawer;
    import java.awt.*;
    import java.applet.*;
    import java.applet.Applet;
    import java.awt.event.*;
    import java.util.*;
    import ru.zhuk.graphics.*;
    /*<applet code="ChatClient" width=600 height=300>
    </applet>
    public class ChatClient extends Frame implements IChatClient,ActionListener,MouseListener,MouseMotionListener
         // GLOBAL VARIABLES USED IN THE PROGRAMME...
         boolean flag=false;
         int n;
         String str="";
         String Coord=null;
         IChatService service=null;
         FrameApplet fa=null;
         TextField servername,serverport,username;
         Button connect,disconnect;
         TextField message;
         Button send,sendText;
         TextArea fromserver;
         int i=0,j=0;
         int x[] = new int[1000];
         int y[] = new int[1000];
         Drawer canvas;
         boolean connected=false;
         String title,user="";
         // Class Members //
         public ChatClient()
         public ChatClient(String str)
              super(str);
              setBounds(50,20,600,450);
              setLayout(new FlowLayout(FlowLayout.CENTER,45,10));
              title=str;
              setStatus();
              // Create controls //
              add(new Label("Chat Server Name : "));
              servername=new TextField(20);
              add(servername);
              servername.setText("localhost");
              add(new Label("Chat Server Port : "));
              serverport=new TextField(20);
              add(serverport);
              serverport.setText("900");
              add(new Label("Your User Name : "));
              username=new TextField(20);
              add(username);
              username.setText("Umesh");
              connect=new Button("Connect");
              connect.addActionListener(this);
              add(connect);
              disconnect=new Button("Disconnect");
              disconnect.addActionListener(this);
              add(disconnect);
              message=new TextField(30);
              add(message);
              sendText=new Button("Send Text");
              sendText.addActionListener(this);
              add(sendText);
              fromserver=new TextArea(10,50);
              add(fromserver);
              fromserver.setEditable(false);
    canvas = new Drawer();
              canvas.setSize(250,250);
              canvas.setBackground(Color.cyan);
              add(canvas);
              canvas.addMouseListener(this);
              canvas.addMouseMotionListener(this);
              send=new Button("Send");
              send.addActionListener(this);
              add(send);
              try
                   UnicastRemoteObject.exportObject(this);
              catch(Exception e)
              setVisible(true);
              for(j=0;j<1000;j++)
                   x[j]=0;
                   y[j]=0;
              Coord = new String();
              Coord = "";
    //          fa=new FrameApplet();
         public void mousePressed(MouseEvent me){}
         public void mouseReleased(MouseEvent me)
              Coord = Coord + "r";
         public void mouseClicked(MouseEvent me){}
         public void mouseEntered(MouseEvent me){}
         public void mouseExited(MouseEvent me){}
         public void mouseDragged(MouseEvent me)
              if (Coord == "")
                   Coord = me.getX() + "," + me.getY();
              else
                   Coord = Coord + " " + me.getX() + "," + me.getY();
         public void mouseMoved(MouseEvent me){}
         // RMI connection //
         private void connect()
              try
                   service = (IChatService)Naming.lookup("rmi://pcname/ChatService");
                   service.addClient(this);
                   connected=true;
                   setStatus();
                   user=username.getText();
                   Coord = "";
              catch(Exception e)
                   fromserver.append("Error Connecting ...\n" + e);
                   System.out.println(e);
                   connected=false;
                   setStatus();
                   service=null;
         private void disconnect()
              try
                   if(service==null)
                        return;
                   service.removeClient(this);
                   service=null;
              catch(Exception e)
                   fromserver.append("Error Connecting ...\n");
              finally
                   connected=false;
                   setStatus();
         private void setStatus()
              if(connected)
                   setTitle(title+" : Connected");
              else
                   setTitle(title+" : Not Connected");
         // IChatClient methods //
         public String getName()
              return user;
         public void sendMessage(String msg)
              fromserver.append(msg+"\n");
         public void SendCanvasObject(String str)
              this.str = str;
              fromserver.append(str + "\n");
              Graphics g = canvas.getGraphics();
              paint(g);
         // Actionlistener //
         public void actionPerformed(ActionEvent e)
              if(e.getSource()==connect)
                   connect();
                   if(connected)
                        servername.setEnabled(false);
                        serverport.setEnabled(false);
                        username.setEnabled(false);
                        connect.setEnabled(false);
                        Coord = "";
              else
              if(e.getSource()==disconnect)
                   disconnect();
                   servername.setEnabled(true);
                   serverport.setEnabled(true);
                   username.setEnabled(true);
                   connect.setEnabled(true);
              else
              if(e.getSource()==send)
                   flag = true;
                   if(service==null)
                        return;
                   try
                        fromserver.append("Sending an image...\n");
                        service.SendCanvasObject(this,Coord);
                        i=0;
                        for(j=0;j<1000;j++)
                             x[j]=0;
                             y[j]=0;
                        Coord = "";
                        fromserver.append("\n" + "Image Sent...");
                   catch(RemoteException re)
                        fromserver.append("Error Sending Message ...\n" + re);
                   catch(Exception ee)
                        fromserver.append("Error Sending Message ...\n" + ee);
              else
              if(e.getSource()==sendText)
                   if(service==null)
                        return;
                   try
                        service.sendMessage(this,message.getText());
                        message.setText("");
                   catch(RemoteException exp)
                        fromserver.append("Remote Error Sending Message ...\n" + exp);
                   catch(Exception ee)
                        fromserver.append("Error Sending Message ...\n" + ee);
         public void paint(Graphics g)
              if(flag==true)
                   i=0;
                   StringTokenizer stoken = new StringTokenizer(str,"r");
                   String strin = "";
                   while(stoken.hasMoreTokens())
                        strin = stoken.nextToken();
                        fromserver.append("\n" + strin + "\n");
                        StringTokenizer stoken1 = new StringTokenizer(strin," ");
                        String strin1 = "";
                        j=0;
                        while(stoken1.hasMoreTokens())
                             strin1 = stoken1.nextToken();
                             fromserver.append("\n" + strin1 + "\n");
                             x[j]=Integer.parseInt(strin1.substring(0,strin1.indexOf(",")));
                             y[j]=Integer.parseInt(strin1.substring(strin1.indexOf(",")+1,strin1.length()));
                             j++;
                        for(int k=0;k<j-1;k++)
                             g.drawLine(x[k],y[k],x[k+1],y[k+1]);     
                   i++;
    import java.rmi.*;
    import java.rmi.server.*;
    import canvas.Drawer;
    import java.util.*;
    import ru.zhuk.graphics.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class FrameApplet extends Applet implements ActionListener
         ChatClient f;
         public void init()
              Button b = new Button("Start Chat");
              b.addActionListener(this);
              add(b);
         public void actionPerformed(ActionEvent ae)
              f=new ChatClient("Chat");
              f.show();
              f.setSize(400,400);
    here is html file which i calls from IE
    <html>
    <title>Micky Chat</title>
    <body>
    <br>
    <br>
    <center>
    <applet code="FrameApplet.class" width=200 height=200>
    </applet>
    </center>
    </body>
    </html>
    and at last a shocking thing is it is runs in Netscape displaying frames but not calling paint method.
    pls. help me
    thanks a lot
    umesh

    Hi Umesh!
    Sorry that I cannot be too concrete about that since it has to be centuries ago when I fell over this problem.
    As far as I can remember, the JDK provided by MS has no RMI built-in. These was probably one of the main reasons why Sun sued Microsoft concering its handling of Java.
    Afterwards MS released a path for its Java Runtime that included RMI support, but AFAIK they never included it in the standard package. So much luck when searching for the ZIP! (-;
    A little bit of googling might help, e.g.:
    http://groups.google.com/groups?hl=de&lr=&ie=UTF-8&oe=UTF-8&threadm=37f8ddf6.4532124%40news.online.no&rnum=17&prev=/groups%3Fq%3Dmicrosoft%2Bjvm%2Brmi%2Bsupport%26start%3D10%26hl%3Dde%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D37f8ddf6.4532124%2540news.online.no%26rnum%3D17
    cheers,
    kdi

  • Badi implementation in ECC 6 version using Enhancement spot

    Hi,
              I've to create an implementation for an already existing BADI in ECC 6.0 version.The interface method of the badi is getting called in main program in a standard include.Is it possible to create that using New badi Enhancement spot option in se19? If so where should i create the enhancement point because when i'm trying to create implementation i'm getting the message Enhancement point zbadi_le_shipment does not exist .
    Thanks in advance
    poornima

    Hi,
       First u need to implement the BADI badi_le_shipment
    Implementing Business Add-Ins (BADI)
    The use of object orientated code within SAP has lead to new method of enhancing standard SAP code called
    Business Add-Ins or BADI's for short. Although the implementation concept is based on classes, methods and
    inheritance you do not really have to understand this fully to implement a BADI. Simply think of methods
    as a function module with the same import and export parameters and follow the simple instructions below.
    Steps:
    1. Execute Business Add-In(BADI) transaction SE18
    2. Enter BADI name i.e.badi_le_shipment  and press the display
    button
    3. Select menu option Implementation->Create
    4. Give implementation a name such as Zbadi_le_shipment
    5. You can now make any changes you require to the BADI within this
    implementation, for example choose the Interface tab
    6. Double click on the method you want to change, you can now enter
    any code you require.
    7. Please note to find out what import and export parameters a
    method has got return the original BADI definition
    (i.e. badi_le_shipment ) and double click on the method name.Under this AT_SAVE  is the method put break point.
    8. When changes have been made activate the implementation
    YOu can go through these links...
    http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
    http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    Regards
    Kiran Sure

  • Here's a tough one: can Infotype data be loaded into a new implementation?

    We have an R/3 system that is going to be replaced with Netweaver; not upgraded, but a new implementation, and that’s because there was too much customizing, and we're only using the HR module.
    Can we load all of the infotype data from the old R/3 system into the new ECC system? Normally it is impossible to re-create all the history from a previous system in SAP, but for Infotypes, maybe? No?  Assuming that the infotype configurations are the same?
    I see infotypes as fairly static tables that are only added to by changes, or by certain actions.  No changes could be made to these older infotype records, but at least BW could extract all of these and present in an ODS a continuous view of history.
    Am I right? Is this possible to load up the infotype tables?
    I know there will be problems with double infinity records, but I think we can handle that one.

    We have an R/3 system that is going to be replaced with Netweaver; not upgraded, but a new implementation, and that’s because there was too much customizing, and we're only using the HR module.
    Can we load all of the infotype data from the old R/3 system into the new ECC system? Normally it is impossible to re-create all the history from a previous system in SAP, but for Infotypes, maybe? No?  Assuming that the infotype configurations are the same?
    I see infotypes as fairly static tables that are only added to by changes, or by certain actions.  No changes could be made to these older infotype records, but at least BW could extract all of these and present in an ODS a continuous view of history.
    Am I right? Is this possible to load up the infotype tables?
    I know there will be problems with double infinity records, but I think we can handle that one.

  • How to use RMI Stub class in programming?

    Hi all,
    I'm new on RMI.
    Is there anyone can explain to me how to use RMI Stub class which is generated by invoking rmic command?
    For my testing, I can only invoke rmi object nethod via its remote interface. Then what is stub used for when we are coding?
    I do appreciate anyone's help.
    Thanks very much,
    Xianyi.Ye

    When the remote object binds itself to the registry, what is actually bound is the stub.
    So when the client does a registry lookup, what it gets is the stub. However from the client's point of view it is just some mystery object that implements the remote interface.
    So you never have to use it directly, it is all automatic.

Maybe you are looking for