RMI + Observable/Observer trouble

I'm trying to develop the following:
Local:
A Swing JFrame object which contains some JPanels that should Observe the actions of server's BusinessLogic.java
Both sides:
An interface that contains the declaration of the methods in server's business logic.
RemoteObserver.java
RemoteObservable.java
RemoteObserverImpl.java
RemoteObservableImpl.java
Server:
One Observable class that contains the business logic and notifies some changes and implements the Interface.
Other classes.
I'm using the latest JDK version.
I have some classes to do the RMI + Observable/Observer thing but I don't know how to apply them to my application.
Here's what i've done so far:
public class MainFrame extends JFrame {
     public static final String serviceName = "RemoteServer";
     private String host = "localhost";
     private RemoteBusinessLogicInterface remoteLogic;
     public MainFrame(String frameTitle) {
          super();
          setTitle(frameTitle);
          setSize(700, 600);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          System.setProperty("java.security.policy", "client.policy");
          setRemoteServer();
          ObserverPanel observerPanel = new ObserverPanel(
                    remoteLogic);
          getContentPane().setLayout(new BorderLayout());
          getContentPane().add(observerPanel, BorderLayout.CENTER);
          this.setVisible(true);
     public void setRemoteServer(){
          try {
               if (System.getSecurityManager() == null)
                    System.setSecurityManager(new RMISecurityManager());
               String rmiUrl = "rmi://" + host  + "/" + serviceName;
               remoteLogic = (RemoteBusinessLogicInterface) Naming.lookup(rmiUrl);
          } catch (ConnectException ex) {
          } catch (UnknownHostException ex) {
          } catch (Exception ex) {
     public static void main(String[] args) {
          MainFrame f = new MainFrame("Title");
public class ObserverPanel extends JPanel{
     private DefaultListModel items;
     private JList list;
     public ObserverPanel(RemoteBusinessLogicInterface remoteLogic) {
          items = new DefaultListModel();
          list = new JList(items);
          list.setVisibleRowCount(24);
          JScrollPane scrollPane;
          scrollPane = new JScrollPane(list);
          setLayout(new BorderLayout());
          add(scrollPane,BorderLayout.CENTER);
     public void update(RemoteObservable observable, Object objektua) {
          System.out.println("Change notified");
public interface RemoteBusinessLogicInterface extends RemoteObservable{
     public void insertData(int number, String code, Date date) throws RemoteException;
     public void submit() throws RemoteException;
     public void clear() throws RemoteException;
class RemoteBusinessLogic extends RemoteObservableImpl implements
          RemoteBusinessLogicInterface {
     public static final String serviceName = "RemoteServer";
     public RemoteBusinessLogic() throws RemoteException {
     public void clear() throws RemoteException {
          setChanged();
          super.notifyObservers();
     public void insertData(int number, String code,
               Date date) throws RemoteException {
          System.out.println("Something");
          setChanged();
          super.notifyObservers();
     public void submit() throws RemoteException {
          System.out.println("Something");
          setChanged();
          super.notifyObservers();
     public static void main(String[] args) {
          System.setProperty("java.security.policy", "client.policy");
          if (System.getSecurityManager() == null)
               System.setSecurityManager(new RMISecurityManager());
          try {
               RemoteBusinessLogic serverObject = new RemoteBusinessLogic();
               try {
                    java.rmi.registry.LocateRegistry.createRegistry(1099);
                    Naming.rebind(serviceName, serverObject;
                    System.out.println("Server launched");
               } catch (MalformedURLException e) {
               } catch (Exception e) {
          } catch (RemoteException e1) {
}RMI works OK, but I don't know how to tell the server which are his observers. I know I have to use the addObserver (RemoteObserver ro) method but I don't know how to tell the server which are the GUI instances (which are the observers) so that I can add them.
Any help will be welcomed. Thanks.
Bye.

Hello Vitor,
Simply have your clients give your observable server object a remote reference to their observer object.
It would look something like this:
server.addObserver(new Remote(myObserver));Your server object would keep a list of its observers, and call them whenever it wants, using some interface method like:observer.stateChanged(someData);Essentially, design it just as if the observers were local.
John

Similar Messages

  • RMI observer problem

    Hello
    I want to write a client server application using rmi and eclipse, where many clients are able to register to the server. The server has a string attribute and a client should be able to pass a string object to the server and the server replaces the value of his attribute with the sent string and notifies all registered clients of the new value. In a later step the server writes to a mysql database and notifies the clients about changes in the database, but that is later...
    I use eclipse for developing.
    Here is the remoteinterface of the server:
    package com.iz.rmi.server;
    import java.rmi.*;
    import java.rmi.server.*;
    import com.iz.rmi.client.IObserver;
    public interface ISubject extends Remote
         public void registerClient(IObserver obs) throws RemoteException, ServerNotActiveException;
         public void notifyObervers() throws RemoteException, ServerNotActiveException;
    } the remoteinterface of the client:
    package com.iz.rmi.client;
    import java.rmi.*;
    import java.rmi.server.*;
    public interface IObserver extends Remote
         public void sendNotify(String notification) throws RemoteException, ServerNotActiveException;
    }the implementation of the server interface:
    package com.iz.rmi.server;
    import java.net.MalformedURLException;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.rmi.registry.*;
    import java.util.*;
    import com.iz.rmi.client.*;
    public class Subject extends UnicastRemoteObject implements ISubject
         private Vector<IObserver> obs;
         private String service;
         public Subject() throws java.rmi.RemoteException
              super();
              this.obs = new Vector<IObserver>();
         @Override
         public void notifyObervers() throws RemoteException, ServerNotActiveException
              Iterator<IObserver> obsIt = this.obs.iterator();
              while(obsIt.hasNext())
                   IObserver o = obsIt.next();
                   try
                        o.sendNotify("blabla");
                   catch (Exception e)
                        e.printStackTrace();
         @Override
         public void registerClient(IObserver obs) throws RemoteException, ServerNotActiveException
              System.out.println("client registered");
              this.obs.add(obs);
         public static void main(String[] args)
              if (System.getSecurityManager() == null)
                System.setSecurityManager(new SecurityManager());
              try
                String name = "Observable";
                ISubject engine = new Subject();
                //ISubject stub = (ISubject) UnicastRemoteObject.exportObject(engine, 0);
                LocateRegistry.createRegistry(1099);
                Registry registry = LocateRegistry.getRegistry(1099);
                registry.rebind(name, engine);
                System.out.println("ComputeEngine boundlll");
              catch (Exception e)
                System.err.println("ComputeEngine exception:");
                e.printStackTrace();
    } and the implementation of the client interface
    package com.iz.rmi.client;
    import java.rmi.*;
    import java.rmi.server.*;
    import com.iz.rmi.server.*;
    public class Observer extends UnicastRemoteObject implements IObserver
         private String host;
         private String service;
         private ISubject sub;
         public Observer(String host, String service) throws RemoteException
              this.host = host;
              this.service = service;
              System.out.println("Service: " + service);
              try
                   this.sub = (ISubject) Naming.lookup(this.service);
                   this.sub.registerClient(this);
                   System.out.println(" istered");
              catch(Exception e)
                   System.out.println("Unable to connect and register with subject.");
                   e.printStackTrace();
         @Override
         public void sendNotify(String notification) throws RemoteException,
                   ServerNotActiveException
         public static void main(String[] args)
              try {
                   new Observer("192.168.1.34:1099", "Observable");
              } catch (RemoteException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }Both programs get started with this vm-argument:
    -Djava.security.policy=C:\daten\noSpring\Obsv\wideopen.policy
    where wideopen.policy looks like this for testing:
    grant {
         // Allow everything for now
         permission java.security.AllPermission;
    };when I start the server all looks fine, but when I start the a client i become just the output.
    Service: Observable
    isteredinstead of
    Service: Observable
    client registerd
    isteredThere are no exceptions or something like that, but it seems that the registerClient()-method does not get called on the server when the client starts. There were many changes since the last time I used rmi, so I don't know what's wrong here. I hope some one can help me with this problem.
    Kind regards,
    Michael

    The server's System.out.prints will go to the server's console on the server host.
    Not interleaved wih the client's output on the client's console on the client host.

  • RMI Observer probs

    Hi, I'm having serious probs getting my head round using Observable/Observer classes as well as RMI. Because double-inheritance isn't allowed, you can't use both - I've search around for answers but they either don't explain directly what to do or not at all.
    I've read that you need to implement your own classes which have the functionality of the observerable/observer classes and use them. The problem is I have no idea how to go about this - the more I read the more confused I get as most sites seem to have a different way of doing it.
    Any help would be most appreciated. Thanks

    Well you just need a RemoteObserver interface and remote implementation class, and a RemoteObservable interface that specifies all the methods of Observable, and a remote implementation of that. How you do it is up to you.

  • Failure upon Socket.accept

    We are seeing our logs filling with the following exception:
    Wed Sep 20 20:23:14 PDT 2000:<E> <ListenThread> Listen failed, failure
    count: '1'
    java.net.SocketException: Software caused connection abort
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.socketAccept(Compiled Code)
    at java.net.PlainSocketImpl.accept(Compiled Code)
    at java.net.ServerSocket.implAccept(Compiled Code)
    at java.net.ServerSocket.accept(Compiled Code)
    at weblogic.t3.srvr.ListenThread.run(Compiled Code)
    Has anyone else experienced this?
    We are running WLS 5.1, Solaris 7, and Solaris_JDK_1.2.1_04. The soft
    limit for file descriptors is 1024, the hard limit is 4096. We are no
    where near the file descriptor limit.
    Thanks
    Kevin

    Adam,
    I am fairly new to WL development. Are you implying that the server my client startup class is connecting to is somehow calling close on my server? I am not sure how or where this would be possible as I am connecting to the remote server on a different port.
    During the 15 or so failure messages and reconnect attempts, my client can still receive messages from the remote server; I am just assuming that port 7001 just became unavailable for some reason.
    Any ideas?
    -Nathan
    "Adam Messinger" <[email protected]> wrote:
    Nathan,
    It appears that client socket is calling connect() and then close(). This
    makes the server's call to accept() fail because the socket is already
    closed.
    Regards,
    Adam
    "Nathan Yeager" <[email protected]> wrote in message
    news:3a314bee$[email protected]..
    Hi,
    I am running 4.5.1 SP13. I have a startup class which registers itself asan RMI observer with a remote server. It initially connects, and receives
    the first message.
    Not long after receiving the first message, the following is outputnumerous times before the server shuts itself down:
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Listen failed. Failurecount: 1
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> java.net.SocketException:socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:413)
    at java.net.ServerSocket.implAccept(ServerSocket.java:241)
    at java.net.ServerSocket.accept(ServerSocket.java:222)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:280)
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Attempting to close andreopen server socket
    This appears to be a fairly generic error message and I don't have much togo by. Any ideas?
    -Nathan Yeager

  • Socket Accept failure

    Hi,
    I am running 4.5.1 SP13. I have a startup class which registers itself as an RMI observer with a remote server. It initially connects, and receives the first message.
    Not long after receiving the first message, the following is output numerous times before the server shuts itself down:
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Listen failed. Failure count: 1
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> java.net.SocketException: socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:413)
    at java.net.ServerSocket.implAccept(ServerSocket.java:241)
    at java.net.ServerSocket.accept(ServerSocket.java:222)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:280)
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Attempting to close and reopen server socket
    This appears to be a fairly generic error message and I don't have much to go by. Any ideas?
    -Nathan Yeager

    Adam,
    I am fairly new to WL development. Are you implying that the server my client startup class is connecting to is somehow calling close on my server? I am not sure how or where this would be possible as I am connecting to the remote server on a different port.
    During the 15 or so failure messages and reconnect attempts, my client can still receive messages from the remote server; I am just assuming that port 7001 just became unavailable for some reason.
    Any ideas?
    -Nathan
    "Adam Messinger" <[email protected]> wrote:
    Nathan,
    It appears that client socket is calling connect() and then close(). This
    makes the server's call to accept() fail because the socket is already
    closed.
    Regards,
    Adam
    "Nathan Yeager" <[email protected]> wrote in message
    news:3a314bee$[email protected]..
    Hi,
    I am running 4.5.1 SP13. I have a startup class which registers itself asan RMI observer with a remote server. It initially connects, and receives
    the first message.
    Not long after receiving the first message, the following is outputnumerous times before the server shuts itself down:
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Listen failed. Failurecount: 1
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> java.net.SocketException:socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:413)
    at java.net.ServerSocket.implAccept(ServerSocket.java:241)
    at java.net.ServerSocket.accept(ServerSocket.java:222)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:280)
    Fri Dec 08 14:53:39 CST 2000:<E> <ListenThread> Attempting to close andreopen server socket
    This appears to be a fairly generic error message and I don't have much togo by. Any ideas?
    -Nathan Yeager

  • Observer:SelectableChildProvider on tabnavigator trouble when close tab

    Hi,
    I've got a tabNavigator wired with SelectableChildProvider component which bind my PM's "tabs collection" in order to reflect new tab to be displayed/tab's updates/tab to be closed by updating the "tabs collection" thru the PM.
    Each tab owns its Context (created dynamically) in order to be able to dispatch event thrue tabs children targetted (no tabs interraction by catching event comming from other tabs).
    Everything seems to work fine : new entry in the arraycollection thru my PM is OK but the trouble comes when I close a tab other than the lastest one :
    Imagine I've got
    - Tab1 owning a context Ctx1 where there's defined PM1 used by inner children of Tab1
    - Tab2 owning a context Ctx2 where there's defined PM2 used by inner children of Tab2
    - Tab3 owning a context Ctx3 where there's defined PM3 used by inner children of Tab3
    In the MXML where is defined my tabnavigator and my observer I set tabNavigator's property like that tabClose="{model.removeTab(event)}" where model is the PM linked to the component which owns my tabnavigator and Observer.
    In this PM I've defined the removeTab event like this :
    public function removeTab(event:SuperTabEvent):void {
         event.preventDefault(); //prevent tabnavigator to deal with child to remove
         tabs.removeItemAt( event.tabIndex ); //update the tabs arraycollection -> will call Observer to change the tabnavigator content
    In this way closing the tab2 will affect PM2 to tab3 exactly as if the tabs where only "shift" and the selected Object binded again.
    To be clear : The selected Object (a VO) is rightly set (eg: tab2 now owns VO from 3) but the PM the "tab" should refer is not PM3 but PM2 !!!
    This means that if my PM contains some business method to check/select variable binded from the view this view will show the ones from PM2 and not PM3...
    The new situation after tabs2 closed :
    - Tab1 owning  PM1 used by inner children of Tab1
    - Tab3(in fact the second tab but it may not be the tab3...) owning  PM2 used by inner children of Tab3
    If I remove the event.preventDefault() line the behaviour is OK but when I add an other tab the previously closed one appears again (the arrayCollection was not set correctly by the closeTab event.
    I've tried several things to solve the problem but it seems it cannot be fixed easily...
    Could you please help me with that ?
    Thx

    Also i feel with the same difficulty. Can anyone help us?

  • ID-CS4: Trouble observing XMLTag changes to page elements (or rather their stories)...

    I have created a small project that uses the same approach to monitoring stories as the one used in the GotoLastTextEdit sample project.
    The GotoLastTextEdit project example does the following:
    - Sets up a responder that monitor open/close signals for documents basically to ensure stories in existing documents gets observers attached.
    - The responder also reacts to the NewStory/DeleteStory signals to attach observers to newly created stories.
    - The observer simply listen for IID_ITEXTMODEL events on the stories.
    Since I'm interrested in xml tagging related changes and not changes to the text, I've changed the IID_ITEXTMODEL to IID_IIDXMLELEMENT. I'm however still looking for events on the TextStoryBoss.
    This approach seems to work. If I create a new document and add some textframes i get notifications whenever I tag/untag/change (tagging) one of them. The really weird part is that if I open a previously saved document nothing works. I get no notifications neither for existing nor for new textframes. Debugging reveals that the observer seems to be attached correctly for both existing and new stories.
    If I change IID_IIDXMLELEMENT back to IID_ITEXTMODEL and listen for changes to the text everything works as expected for both new and existing documents.
    So how do I get IID_IIDXMLELEMENT notifications to work for existing documents?
    Any clues would be helpful...
    Additional info: This was only tested on Windows, InDesign CS4.

    I'm confused by your post and code.  Adobe has a function to do this.  In the Insert Toolbar under the Tab "Forms" there is an option to create a jump menu.  The only options that menu gives you is the same window or a frame on the page (a very outdated action looking at it now).  But with basic knowledge of links you insert the menu and you will get code like:
      <select name="jumpMenu" id="jumpMenu" onChange="MM_jumpMenu('parent',this,0)">
    The "parent" denotes that this will open in the same window.  If you change that to "blank" then it will open in a new window.  A "Go" button is optional and also available in the DW GUI when you set up a jump menu.
    http://www.w3schools.com/tags/att_a_target.asp

  • RMI Remote Observer

    Sorry for the cross-post but getting answers out of the JINI forum is like pulling teeth...
    I'm looking to improve performance of an application I wrote which has a server generating remote events and distributing them to clients who have previously signaled interest. One thing I noticed is that when one of the clients has a slow connection the whole system suffers. So I was wondering if introducing a threaded architecture would help in the following piece of code.
    currently...
    Iterator hashMapKeySetIterator = hashMap.keySet().iterator();
    while ( hashMapKeySetIterator.hasNext() )
    Object key = hashMapKeySetIterator.next();
    Observer observer = (Observer)hashMap.get(key);
    try
    observer.notify( event[] ); <-------- Thread this???????
    } catch (RemoteException re)
    try
    removeObserver( key, observer );
    }catch(Exception e)
    //handle exception
    System.out.println("Provider.notify() Error --> " + re.getMessage() );
    So, if I instead just created a new thread for each of the calls to notify(), would that improve the overall performance? Would it introduce any problem areas or would there be anything I should be concerned about? Thanks in advance.
    Dave

    Yes. Your solution seems to be the way to solve this type of problem.
    I would recommend some type of Thread pool so that you don't have as much Thread creation overhead.

  • My observations ( for people that have indexing and connection issues )

    Since cisco takes an awful lot of time doing anything about these problems i decided to investigate the box myself today.
    I followed advice from various threads and did some digging aroudn with network traffic snoopers and some other tools.
    First ( and this is buried somewhere deep in the documentation ) you can NOT have ANY file or folder name that is longer than 32 characters. This is a limitation of the stupid linux they are running on ! If you have a file with longer name or foldername it may screw up the indexing.
    Second : file and path names can only have alphanumerical characters and numbers and spaces in them. DO NOT USE ANY other character. it messes up the indexing  I had folders named -= folder 1 =-. they never got indexed. as soon as i removed teh  -= and =- the indexing kicked in .... This is again a twonkyvision / loonix problem
    The box has tremendous problems with ghost devices on the network. I have on my network at home : 4 pc's running XP ( some pro some home edition )  2 laptops with Vista. One box with Win7. One Windows home Server. One linksys Skype phone , One Roku soundbridge, one Dlink DNS323 , one ADS network drive , one Simpletech Simplestor , A HP color laserjet , a Hp 6250 , 7650 and some other HP network printer. Thru the wireless link my PDA ( iPaq) and iPhone connect once in a while too. My blu ray player is also hooked up (netflix streaming). And then there are various experimental systems ( i am an electronics engineer and i have built some gadgets that are network connected that allow me to remotely turn on lights monitor temperature etc. )
    Now , the NMH does not detect correctly most of the devices. It keeps on trying to feed information to the printers ... it also tries feeding information to other NAS devices as well as to the Windows Homeserver ... It falsely identifies one of the printers as a dlink ethernet connected dvd player ...
    It also has problems with devices that use static ip addresses on the network ( i set up the printers and other NAS devices with hardcoded ip addresses. so no dhcp )
    So here is what i did : go to twonky configuration ( port 9000 see tony's article )
    Step 1 : Yank out the ethernet cable to ANY OTHER DEVICE except the pc you are working on , your router and the NMH <- this is important
    step 2 : Hit the button to erase all the devices it discovered.  (reset list)
    Step 3 : hit the SAVE button
    step 4: UNCHECK the box next to the 'reset list' button
    step 5: hit the SAVE button
    Now , on the left hand side click on Maintenance
    Click on ALL checkboxes under Log level. they should ALL be checked
    Hit the Clear Logs button
    Hit Save changes
    Hit RESTART server. you wil get a file not foound error page. you will see in your browsers titlebar that the url changes to an ip address with some text behind it. remove all that text and key in :9000 and hit return. it will take you back to tonky. ( i don't know how important this step is , but i did not go in throught the device name , i used the ip address from this point on. normally it should not matter but you never know ( i have a suspicion i will explain later )
    Write down this IP address. it is usefull to know.
    Now since we are back in wonkyvision ( stupid half baked program ) Go back to the maintenance screen.
    now hit the rebuild databse button.
    You should hear disk activity now.
    Hit the Show log  button once. the log files should open.
    you can refresh this screen by hitting the reload button in your browser.
    you should see messages fly by like
    21:14:40:317 LOG_SYSTEM:fsmon_add_watch inotify_add_watch (12, /share/media/photos/Moorea May 1998) returns 2045
    21:14:40:317 LOG_DB:watch wd=2045 added on /share/media/photos/Moorea May 1998
    21:14:40:379 LOG_DB:upnp_folder_watch_add_dir /share/media/photos/Moorea May 1998/New Folder
    thnis means it is probin the entire directory structure and adding files and paths.
    Let it run for a while. hitting refresh on your browser once in a while. it took a couple of hours on mine ( 76000+ pictures ... ) and a couple of hundred songs + some videos.
    once disc activity ceases : go back to twonky port 9000 , go in to maintenance and hit Clear Logs button.
    HitSave button
    Hit restart server. you will again get an error page. get rid of the rubbish behind the ip address.and key in :9000
    go to the clients and security page.
    Make sure Automatic discovery is still turned OFF ( if it is on you will see in the logbooks that it attempts several times a second to connecto to anything it can find. Since the detection process is flawed it bombs out. this may overload the poor cpu in the NMH... )
    Hit the reset list once more
    hit save
    Now turn automatic discovery on and hit Save.
    go back to maintenacne and hit restart server. again on the error page : erase the garbage after the ip address and go back to port 9000.
    if you now go back to client/sharing page you should see 2 possibly 3 device. one is your router , one is the pc you are working on, and the last one is the same ip address as you see in the browser. ( the ipaddress you are using to talk to the nmh )
    make sure all the checkboxes before these devices are checked. and hit the save button once more.
    at this point i unchecekd the automatic discovery and hit save once more. i go back to maintenance and hit restart server for the last time.
    At this point the nmh restarted twonky and immediately there was a ton of disc activity. i opened the normal nmh user interface and lo and behold : the green spinning arrow started to move and progress was going forward. it increased 1% roughly ever 10 seconds or so. when it finally hit 100% everything was there. as it should be.
    Now. speculation on my part
    - this thing has trouble with long file names and non alphanumerical characters.
    - this thing has trouble with device it incorrectly identiefies or cannot identify. this screws up wonkymedia.
    - the communication between the process on the NMH (that serves the flash user interface running on your browser ) and winkymedia is going through a network port itself. There are problems. thye do not do inter process communication but go via network messages... ( this is kind of dumb as it loads the network... )
    proof :
    21:01:03:625 filescanner thread started
    21:01:03:628 LOG_SSDPSDP_notify_packet ### SSDP sending:
    NOTIFY * HTTP/1.1
    HOST: 239.255.255.250:1900
    CACHE-CONTROL: max-age=99999
    LOCATION: http://192.168.1.66:9000/DeviceDescription.xml
    NT: urn:schemas-upnp-org:service:ContentDirectory:1
    NTS: ssdp:alive
    SERVER: Linux/2.x.x, UPnP/1.0, pvConnect UPnP SDK/1.0
    the filescanner sends messages through network port 1900 to the NMH. Since the filescanner is running on the NMH ... i also have no clue what 239:255:255:250 at 190 is ...
    i also see sometimes the following messages fly by
    21:01:03:894 [Error] - LOG_HTTP:HTTP_get_header Cannot receive header, clientSocket=13, nBytesReceived=0
    21:01:03:894 LOG_HTTP:HTTP_send_receive received no header in HTTP_send_receive, propably client closed socket, URL=http://192.168.1.66:9000/
    my suspicion is that , since the various processes running on the NMH ( the indexer , the UI server and all the twonky processes) all intercommunicate through the network port , this is a problem. if the network settings get corrupted ( because false identification , notwork overload or whatever ) the thing jams up.
    by cleaning out all the false identieis , letting it identify itself ( important for its own process communication ) and a pc , and then turning off the detection .this solves that problem.
    limiting the filesstem to 'clean 32 char max' names solves another problem.
    I also see a lot of keep-alive message fly by on the netowrk ( several a second. )
    i eventually plugged in my other computers and the roku , let it autodetect for a while and turned this feature back off. Then i plugged in all other devices the NMH has no business with.
    So far it still works fine.
    I still do see a ton of messages fly by where the NMH is probing the network on existing devices. tey come back with 'device already validated
    21:01:04:140 LOG_CLIENT_DB:The entry found in known clients list is already validated (ip=192.168.1.76)
    21:01:04:140 LOG_CLIENT_DB:checking http header for entry ip=192.168.1.76, mac=
    21:01:04:140 LOG_CLIENT_DB:Checking http header to find a matching client.db entry (ip=192.168.1.76)
    21:01:04:141 LOG_CLIENT_DB:Ignoring client with fixed flag = TRUE (ip=192.168.1.76)
    ( .76 is the pc i am working on right now. )
    i don't know why they keep probing. i am not streaming anything and auto detect is turned off ..
    anyway i will keep you guys posted on how this evolves.
    One thing is for sure. this is another half baked ' broken source' based system.

    further observations :
    22:24:31:868 LOG_CLIENT_DB:checking http header for entry ip=192.168.1.66, mac=
    22:24:31:868 LOG_CLIENT_DB:Checking http header to find a matching client.db entry (ip=192.168.1.66)
    22:24:31:869 LOG_CLIENT_DB:HHetting client adaptation to 49 (ip=192.168.1.66)
    22:24:36:878 LOG_CLIENT_DB:The entry found in known clients list is already validated (ip=192.168.1.66)
    22:24:36:878 LOG_CLIENT_DB:checking http header for entry ip=192.168.1.66, mac=
    22:24:36:878 LOG_CLIENT_DB:Checking http header to find a matching client.db entry (ip=192.168.1.66)
    22:24:36:879 LOG_CLIENT_DB:HHetting client adaptation to 49 (ip=192.168.1.66)
    22:24:37:926 LOG_CLIENT_DB:The entry found in known clients list is already validated (ip=192.168.1.76)
    22:24:37:926 LOG_CLIENT_DB:checking http header for entry ip=192.168.1.76, mac=
    22:24:37:926 LOG_CLIENT_DB:Checking http header to find a matching client.db entry (ip=192.168.1.76)
    22:24:37:927 LOG_CLIENT_DB:Ignoring client with fixed flag = TRUE (ip=192.168.1.76)
    22:2
    thisnthing keeps on probing itself ... i wonder why. (.66 is the NMH  .76 is my pc ... ) it is also strange it cannot retrieve its own mac address....
    Oh , you can turn off the logging features again when done. it only takes time and diskspace on the NMH
    And before i get flamed : the comments i make about 'broken source' : i have no gripe with linux. I have a problem with companies that grab a bunch of stuff that is free ,slap it together, sell it for a lot of money and give no support to the people that bought it. They want all the money for no effort .. they turn open source into broken source ...

  • Colour Display - an observation

    The display of colour, colour profiling and calibration are frequently asked about in these forums. I've always felt that as Elements is not a colour managed application it is not usually worthwhile spending too much time on it. Working in full Photoshop today, the following screenshot really demonstrates this. All three images are of the identical PSD format file, produced from a RAW file in full Photoshop. All three are clearly very different. The leftmost is from the PSE Editor, the centre from full Photoshop, and the (truly awful) rightmost from the Elements Organiser.
    Both the Elements Editor and Organiser are set to 'Optimize for Printing', Photoshop for 'Europe Prepress 3'.
    I'm posting this as an observation, rather than a question, but would be interested to hear other opinions about colour management in Elements.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

    MichelBParis wrote:
    What I can't say is why the PSE Editor and PS views of the same file have clearly different tones (you may need to click the screenshot to see this more obviously).
    Yes, I can see that, and there must be a reason, perhaps a bug.
    While I generally try and resist the notion that problems may be bugs, preferring to find a logical reason for software behaviour, I think you may be right.
    I thought I'd try and recreate the scenario. As the screenshots were all of a RAW Image opened in full PS, cropped and saved as a .PSD (no jpegs involved anywhere) I went back to the original RAW image to start again - and saw it's thumbnail in the Organizer is also now showing as oversaturated. I deleted its sidecar file in case that had affected it somehow and refreshed the thumbnail but to no avail - it stays showing as oversaturated. However viewing its thumbnail in Windows Explorer looks fine, so  somewhere in the workflow the Organizer view of the image just goes wrong.
    Tomorrow I'll recover the original from backup, rename it and reimport it to see what happens.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • Jdev9irc initial observations

    I just downloaded the Jdev9irc and installed it on my Win 2000
    machine.
    I migrated my BC4J/JSP project from Jdev 3.2.3 and then deployed
    it to the newest OC4J 2.0. Here are my observations:
    1. The new Jdev9irc software looks very promising. The
    connections pooling has been fixed and it works reaaly well.
    2. The migration was also not very difficult.
    3. I had some <%@ include file="pagehdr.html" %> statements in
    my jsp. Jdev 3.2.3 would find this file under
    myhtml\soJsp_html\pagehdr.html, but under the jdev9irc, the file
    has to be under myhtml.
    But this cuases a problem when you deploy the project, OC4J
    expects it to be under \soJsp_html directory. I had to put the
    file in both locations.
    4. I was also referring to some images
    under /webapp/images/MDCHBanner.gif. I had tough time locating
    where this should go. Under development it needs to go under
    %jdev_home%\jdev\system\oc4j-
    config\applications\bc4j\webapp\images.
    For production(deployed to OC4J) it needs to be located under %
    jdev_home\bc4j\redist\bc4j\webapp\images.
    Maybe this is because I am referring to "webapp" which is a
    defined virtual web-app.
    5. I had some trouble with PCST_TXN and PCOLL_CONTROL tables. I
    dropped the tables but JSP app would not re-create them. I then
    recreated them using jdev 3.2.3
    6. I had some trouble with <jbo:SetAttribute dataitem="*" />. I
    was using this tag to create an auditlog of my original table.
    In jdev 9i setattribute dataitem="*" checks for entity name and
    would allow you to duplicate the data to another entity.
    7. Some trouble with jbo:ShowValue tag. If the value is null,
    jdev 3.2.3 used &nbsp but jdev 9i puts blank. If you are using
    html tables, this does not look nice.
    8. Deployment to OC4J documentation is still not very clear. It
    talks about a sitename for the URL e.g
    http://hostname:<portnumber>/<virtul path>/<sitename>/main.html.
    But there is no explanation what a sitename is. The sitename is
    the default packgae name. In my case soJsp_html.
    9. Overall the docs have improved a lot.
    10. Built in OC4J(inside jdev IDE) seems to work most of the
    time,but sometimes I would get "file not found" error. I have to
    then terminate the OC4J server (from run manager) and then it
    would work.
    11. Appmodule now has releasemode clause and that clears up all
    the confusion about stateless and stateful modes.
    12. Use of webbean has improved and it now use the datasource
    tag. This integrates the webbeans with appmodule and datasource.
    All in all a great product and it very close to being a usable
    product for production JSP applications.
    Thank you Jdev team.

    Going through the same thing. we have to find all the loops holes to be able to gets stuff. our group is small enough that we just made everyone one set up their own account using their work email. if we want to buy apps we just have the person who has the credit card by online gift cards and let people load the money to their account.
    from what I haVe read Apple does not intend to change their way to making Apple friendly to enterprise use. which is a shame because more and more companies want to use them for that way and are having the same issues.

  • [CS3] Observing assigned story deletion

    I'm attempting to monitor the deletion of assigned stories but am having trouble finding out which protocol and/or boss to monitor.
    I've created an observer on kDocBoss and from the spy & command logger in the debug build, it looks like I should be able to watch for kDeleteAssignedStoryCmdBoss in my Update() method. However, the observer isn't catching this change. I've had it attach on any protocol that I think might apply (e.g., IID_STORYLIST, IID_IHIERARCHY_DOCUMENT, IID_IASSIGNMENTMGR,...) but I haven't seen kDeleteAssigned[Story|Frame]CmdBoss on any of them.
    Does anyone know the right boss, protocol, and change to monitor for deleted assigned stories? More generally, is there a way to find more information about which bosses & protocols to observe for any given command?

    Please describe the situation in UI terms, e.g.
    In the assignment panel, select an assignment story and choose the "Unlink Content" menu.
    This will cause a
    kRemoveLinksCmdBoss, which sends a
    kBeforeRemoveLinksSignalResponderService signal before firing off a
    kRemoveAssignedStoryCmdBoss that notifies
    kDocBoss observers as change=kRemoveAssignedStoryCmdBoss, protocol = IID_IASSIGNMENTMGRCHANGED.
    In earlier versions (until CS2) there used to be a wildcard protocol, but unfortunately that has gone the way of optimizations, probably too many uses in production code slowing down the application.
    Dirk

  • Collection of Tips and Observations

    Being quite new to DPS and having just completed a 100 page brochure I wanted to share some observations and hopefully get some back.
    Some of these may not be true as there may be better ways of working that we haven't discovered yet, and some may be blatently obvious but this is what we have found.
    If you have lots of pages that make use of the same interactivity, setting this up on a master page saves a lot of time, but as you make each new page make sure you release from the master straight away otherwise elements like buttons and actions will not be linked to the right element on the page and will cause In Design to crash when uploading the article
    Using layers for different interative elements can really help organise the interacivity, but make sure all layers are active before you upload the article if you have buttons that link to an inactive layer then In Design will probably crash again
    Labelling buttons and MSO clearly saves a lot of time if you need to trouble shoot why something isnt behaving as you expect later on, In Design makes a good job of renaming duplicate buttons by adding a sequencial number, but if you have several duplicated elements on the same page naming them by their position on the page can help you when linking button actions, e.g. Image Slide Left, Image Slide Right. Having buttons with identical names can also cause crashes when uploading articles, but not always.
    Buttons inside MSO can only control elements inside the same MSO, a bit of lateral thinking (and forum help) can probably achieve the intended results
    If Video content is placed inside a frame that hides (crops) part of the video, the whole video is still shown when published (might be doing this wrong)
    Edge animations that rely on custom javascript need to be added as HTML not OAM (unless there is a way to embed the javascript into oam files?)
    anyway those are just my initial observations based on builing a publication that has a lot of identical layout product pages.

    If Video content is placed inside a frame that hides (crops) part of the video, the whole video is still shown when published (might be doing this wrong)
    You can crop the video as long as the mask is set to be an overlay object.

  • Some observations regarding passwords and the App Store

    It used to be that installing or upgrading an app, even free ones, required your inputting your AppleID. There would be a five- to ten-minute grace period during which you needn't enter it again, but afterwards you would be required to re-enter the password. Which made sense: No one wants unauthorized users to start buying up potentially expensive apps without permission.
    This is still the case with the iPhone. What's surprising is that this is no longer the case with the iPad. Recently I've noticed that after a good day or two without accessing the App Store, updating apps no longer asks for my password. Given virtually all updates are free, I'm assuming this applies to (free) updates. INSTALLING free apps may or may not require the re-entering of passwords; I don't know, I haven't tried it yet. I'm certainly hoping that password re-entry will be required with paid apps. (Cue story of kid purchasing a $100 app on mom's iPad.)
    I'm also assuming that the iPhone continues to ask for passwords -- (free) updates or not -- perhaps because as a truly mobile device, it needs to retain a bit more restrictiveness. I don't necessarily agree, since how much trouble can a free updates cause? (Unless of course you wanted to keep an older version for some reason.) As illustrated, the App Store on the iPad, at least, doesn't seem to require password re-entry anymore, at least for updates.
    Is this something anyone else has observed, or is it only my iPad that's somehow affected?

    Well, I pulled out my other iPad, and when I tried to update some apps, the App Store did require my password. So it may be this particular iPad that somehow has lost its ability to ask for my password when updating apps, or maybe even downloading paid apps. (I'm not eager to try that yet.) FWIW, this iPad also had the issue of updating apps resulting in long wait times before finally downloading; this was fixed by using "Reset All Settings" under General Settings. Perhaps the two phenomena are related? I may try erasing all settings are seeing if that fixes these nconsistencies once and for all. Let y'all know.

  • Observer pattern in J2EE

    I have a question about the Observer patterne.
    I have tried to implement it im my application but without result. First my idea was to save all the client Object references in A linked List in a bean on the server. Then each time a certain event ocurs on my server I will call a method fire() which iterate through my linked list and finds all my client references. Then I will make a "call back" to all the clients which are in my linked list. But my teacher tells my that is not the way to do. He belives that there is a much easier way to make sure that all the clients get updates. But he does't know how to do it. So my question is how do I implements Observer Design patterns in the J2ee enviroment ??

    It seems to that one of the solotions to this problem is to use RMI. Apperently it is not possible to make a regular callback to a client in the J2EE enviroment. That,s not good, because you have to make a call back if you want to implement the observer deign patterne. I think it is sad, because one of the most important design pattern is The observer pattern.

Maybe you are looking for