Listening for new/removed NetworkInterfaces at runtime?

Hey everybody good morning,
Are there any good solutions or libraries for detecting dynamically at run-time when a new NetworkInterface gets created(or removed) - due to things such as the end-user physically plugging in a new Ethernet rj45 cable into their NIC(s)?
Does java provide any listeners to use that would receive an event being fired when a new NetworkInterface has been created / made available?
Right now, I have to run a thread and call NetworkInterface.getNetworkInterfaces() at my predefined interval of seconds throughout the lifetime of the program (which is wasting cpu/memory resources)
I also have to do this to detect when a NetworkInterface has been "taken away" / made unavailable.
Thanks!

I'm not sure your typical operating system offers a signaling mechanism for unplugged network cables.
Right now, I have to run a thread and call NetworkInterface.getNetworkInterfaces() at my predefined interval of seconds throughout the lifetime of the program (which is wasting cpu/memory resources)I tried NetworkInterface.getNetworkInterfaces() on a couple of computers. On Windows one call to that method took about 0.001 seconds, on Linux about 0.00007 seconds. If done every few seconds, that is a rather insignificant percentage of CPU time. Are you sure you have a problem with resource waste?

Similar Messages

  • Listener for new incoming SMS

    Hi,
    Can you tell me how to make or use (may be a library ) a listener that can response if an incoming sms received.
    Thanks.

    What's the listener that listens for new tabs being
    added to JTabbedPane?ContainerListener

  • Listening for new cachings getting created?

    I'd like to be able to register my own MBeans on each distributed CacheServer for each cache that lives on that server. Is it possible to register a listener anywhere that gets called when a new cache gets created? Alternatively, is it possible to register a listener that is called after the cache factory has finished starting all the "autostart" caches?
    I'm using version 3.3
    thanks
    sam
    ps - I'm already registering my own custom global mbeans... but they are created before any of the caches get created.

    Sam
    You can specify your custom CacheFactory class in the override file so you can still use DefaultCacheServer
    When I needed to intercept cache creation I extended DefaultConfigurableCacheFactory and overrode this method:
    public NamedCache configureCache(CacheInfo cacheInfo, XmlElement xmlScheme, ClassLoader classLoader)
    Then just call the super class version before or after doing whatever you need to.
    The XML for the override file looks like this
    <coherence>
         <configurable-cache-factory-config>
              <class-name>com.oracle.coherence.common.configuration.AdvancedConfigurableCacheFactory</class-name>
              <init-params>
                   <init-param>
                          <param-type>java.lang.String</param-type>
                          <param-value system-property="tangosol.coherence.cacheconfig">coherence-cache-config.xml</param-value>
                   </init-param>
              </init-params>
         </configurable-cache-factory-config>
    </coherence>The above snippet is taken from the Incubator common library. You would replace com.oracle.coherence.common.configuration.AdvancedConfigurableCacheFactory with the name of your class.
    You need to call the override file tangosol-coherence-override.xml and put it on the class path or if you call it anything else then specify the name as a JVM argument with -Dtangosol.coherence.override=<name of your file>
    Jonathan

  • Configure listener for new database

    When trying to setup my database I get a warning "Configuring the dababase with dbcontrol requires a listener to be configured in the current oracle home"
    I run netca and there is a LISTENER there, any ideas what is going wrong?
    Many thanks

    I get:
    [oracle@localhost bin]$ env | sort
    COLORTERM=gnome-terminal
    CVS_RSH=ssh
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-9Kh3kqcDHI,guid=800cb935a576ed1285a9fb004d695dac
    DESKTOP_SESSION=default
    DESKTOP_STARTUP_ID=
    DISPLAY=:0.0
    G_BROKEN_FILENAMES=1
    GDMSESSION=default
    GDM_XSERVER_LOCATION=local
    GNOME_DESKTOP_SESSION_ID=Default
    GNOME_KEYRING_SOCKET=/tmp/keyring-nvX8Sx/socket
    GTK_RC_FILES=/etc/gtk/gtkrc:/home/oracle/.gtkrc-1.2-gnome2
    HISTSIZE=1000
    HOME=/home/oracle
    HOSTNAME=localhost.localdomain
    INPUTRC=/etc/inputrc
    LANG=en_US.UTF-8
    LESSOPEN=|/usr/bin/lesspipe.sh %s
    LOGNAME=oracle
    LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
    MAIL=/var/spool/mail/oracle
    OLDPWD=/home/oracle/app/oracle/product/11.2.0/dbhome_1
    ORACLE_UNQNAME=student
    PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/oracle/bin
    PWD=/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin
    SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/3940
    SHELL=/bin/bash
    SHLVL=2
    SSH_AGENT_PID=3976
    SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
    SSH_AUTH_SOCK=/tmp/ssh-dpPyeG3940/agent.3940
    TERM=xterm
    USERNAME=oracle
    USER=oracle
    _=/usr/bin/env
    WINDOWID=23068753
    XAUTHORITY=/tmp/.gdm27QDRV
    XMODIFIERS=@im=none
    [oracle@localhost bin]$

  • Remove stage listener for multiple movieclips

    I would like to completely remove personalized stage listeners, for each movieclip as soon as they are placed where they need to be, but the listeners remain every single time a new clip is dragged.
    Thank you for any help!
    function clickToDrag(targetClip:MovieClip):Function {
              return function(e:MouseEvent):void {
                        startingPosition[targetClip.name] = new Point(targetClip.x, targetClip.y);
                        targetClip.startDrag(false, new Rectangle(0,0,800,600));
                        setChildIndex(targetClip,numChildren - 1);
                        trace('clickToDrag function invoked\ntargetClip: ' + targetClip.name + '\startingPosition: ' + startingPosition[targetClip.name] + '\n\n');
                        stage.addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
    /*          releaseToDrop
              @function          stopDrag for current clip, if dropped off stage, returns to recorded beginning location
              @param                     targetClip:MovieClip
              @param                     startPosition:int
              @returns          event:void
    function releaseToDrop(targetClip:MovieClip):Function {
              return function(e:MouseEvent):void {
                        targetClip.stopDrag();
                        trace('releaseToDrop function invoked\ntargetClip: ' + targetClip.name + '\n\n');
                        stage.removeEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
                        stage.addEventListener(Event.MOUSE_LEAVE, mouseGone);
                        function mouseGone () {
                                  TweenLite.to(targetClip, .2, { x: startingPosition[targetClip.name].x });
                                  TweenLite.to(targetClip, .2, { y: startingPosition[targetClip.name].y });
                                  //toggle comments to ease or not ease back to startingPosition
                                  //targetClip.x = startingPosition[targetClip.name].x;
                                  //targetClip.y = startingPosition[targetClip.name].y;
                                  stage.removeEventListener(Event.MOUSE_LEAVE, mouseGone);
                                  trace('releaseToDrop function invoked\ntargetClip dragged out of bounds: ' + targetClip.name + '\n\n');
    /*          checkTarget
              @function          checks if current clip is dragged to drag1target(dock), updates boat weight and waterline, remove listeners
              @param                     targetClip:MovieClip
              @param                     lbsAmount:int
              @param                     targetLocation:MovieClip
              @returns          event:void
    function checkTarget(targetClip:MovieClip,lbsAmount:int,targetLocation:MovieClip):Function {
              return function(e:MouseEvent):void {
                        if (targetClip.hitTestObject(drag1target)) {
                                  targetClip.x = targetClip.x;
                                  targetClip.y = targetClip.y;
                                  drop.play();
                                  TweenLite.to(targetClip, .5, { alpha: 0, onComplete:fadein });
                                  function fadein() { TweenLite.to(targetLocation, .5, { alpha: 1 }); }
                                  noMC.waterlineMC.y = noMC.waterlineMC.y - 3;
                                  lbs -= lbsAmount;
                                  lbsTxt.htmlText = lbs + "<font size='16'>lbs</font>";
                                  targetClip.buttonMode = false;
                                  targetClip.mouseEnabled = false;
                                  targetClip.removeEventListener(MouseEvent.MOUSE_UP, checkTarget);
                                  targetClip.removeEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
                                  /* TODO: Issue with stage listener for every clip, opportunity to handle programmatically? */
                                  /* check to see if eventListenter is still present */
                                  if(targetClip.hasEventListener(MouseEvent.MOUSE_DOWN)) {
                                            trace(targetClip.name + ' still has MOUSE_DOWN event listener');
                                  if(targetClip.hasEventListener(MouseEvent.MOUSE_UP)) {
                                            trace(targetClip.name + ' still has MOUSE_UP event listener');
                        } else if (borderMC.hitTestPoint(targetClip.x, targetClip.y, true)){
                                  /*targetClip.y = startingPosition[targetClip.name].y;
                                  targetClip.x = startingPosition[targetClip.name].x;                              */
                                  TweenLite.to(targetClip, .2, { x: startingPosition[targetClip.name].x });
                                  TweenLite.to(targetClip, .2, { y: startingPosition[targetClip.name].y });
                        } else {
                                  /*targetClip.y = startingPosition[targetClip.name].y;
                                  targetClip.x = startingPosition[targetClip.name].x;          */
                                  TweenLite.to(targetClip, .2, { x: startingPosition[targetClip.name].x });
                                  TweenLite.to(targetClip, .2, { y: startingPosition[targetClip.name].y });

    i will try to show you a way that might help you to understand how the event-model in as3 is meant to work.
    look at this code:
    //with a MovieClip "DragClip" in the Library exoported for ActionScript
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    for (var i:int = 0; i<10;i++){
        var mc:DragClip = new DragClip();
        addChild(mc);
        mc.mouseChildren = false;
        mc.addEventListener(MouseEvent.MOUSE_DOWN, dragStart);
        mc.addEventListener(MouseEvent.MOUSE_UP, dragStop);
        addChild(mc);
    function dragStart(e:MouseEvent):void {
        e.currentTarget.startDrag();
        trace("dragging started");
    function dragStop(e:MouseEvent):void {
        e.currentTarget.stopDrag();
        trace("dragging stopped");
        e.currentTarget.removeEventListener(MouseEvent.MOUSE_DOWN, dragStart);
        e.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, dragStop);
    //it places hundred Movieclips on the stage
    //makes them draggable
    //but after they are dragged once
    //they stay in place

  • [svn] 3120: When you point Flex Builder at a local sandbox trunk build, it couldn' t generate the html-templates folder correctly for new projects so we moved all the html templates up one level and removed the html-templates directory and adjusted build

    Revision: 3120
    Author: [email protected]
    Date: 2008-09-05 10:44:10 -0700 (Fri, 05 Sep 2008)
    Log Message:
    When you point Flex Builder at a local sandbox trunk build, it couldn't generate the html-templates folder correctly for new projects so we moved all the html templates up one level and removed the html-templates directory and adjusted build.xml's to accommodate the directory change
    Modified Paths:
    flex/sdk/trunk/build.xml
    flex/sdk/trunk/webapps/webtier/build.xml
    Added Paths:
    flex/sdk/trunk/templates/client-side-detection/
    flex/sdk/trunk/templates/client-side-detection/AC_OETags.js
    flex/sdk/trunk/templates/client-side-detection/index.template.html
    flex/sdk/trunk/templates/client-side-detection-with-history/
    flex/sdk/trunk/templates/client-side-detection-with-history/AC_OETags.js
    flex/sdk/trunk/templates/client-side-detection-with-history/history/
    flex/sdk/trunk/templates/client-side-detection-with-history/history/history.css
    flex/sdk/trunk/templates/client-side-detection-with-history/history/history.js
    flex/sdk/trunk/templates/client-side-detection-with-history/history/historyFrame.html
    flex/sdk/trunk/templates/client-side-detection-with-history/index.template.html
    flex/sdk/trunk/templates/express-installation/
    flex/sdk/trunk/templates/express-installation/AC_OETags.js
    flex/sdk/trunk/templates/express-installation/index.template.html
    flex/sdk/trunk/templates/express-installation/playerProductInstall.swf
    flex/sdk/trunk/templates/express-installation-with-history/
    flex/sdk/trunk/templates/express-installation-with-history/AC_OETags.js
    flex/sdk/trunk/templates/express-installation-with-history/history/
    flex/sdk/trunk/templates/express-installation-with-history/history/history.css
    flex/sdk/trunk/templates/express-installation-with-history/history/history.js
    flex/sdk/trunk/templates/express-installation-with-history/history/historyFrame.html
    flex/sdk/trunk/templates/express-installation-with-history/index.template.html
    flex/sdk/trunk/templates/express-installation-with-history/playerProductInstall.swf
    flex/sdk/trunk/templates/metadata/
    flex/sdk/trunk/templates/metadata/AC_OETags.js
    flex/sdk/trunk/templates/metadata/readme.txt
    flex/sdk/trunk/templates/no-player-detection/
    flex/sdk/trunk/templates/no-player-detection/AC_OETags.js
    flex/sdk/trunk/templates/no-player-detection/index.template.html
    flex/sdk/trunk/templates/no-player-detection-with-history/
    flex/sdk/trunk/templates/no-player-detection-with-history/AC_OETags.js
    flex/sdk/trunk/templates/no-player-detection-with-history/history/
    flex/sdk/trunk/templates/no-player-detection-with-history/history/history.css
    flex/sdk/trunk/templates/no-player-detection-with-history/history/history.js
    flex/sdk/trunk/templates/no-player-detection-with-history/history/historyFrame.html
    flex/sdk/trunk/templates/no-player-detection-with-history/index.template.html
    Removed Paths:
    flex/sdk/trunk/templates/html-templates/

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • My new Dell PC running Windows 8 does not recognize my iPad or iPhone. Worked OK for iPhone for months but would not work for new iPad.  I removed /relaoded iTunes and now it won't recognize either iPad or iPhone.

    My new Dell PC running Windows 8 does not recognize my iPad or iPhone. Worked OK for iPhone for months but would not work for new iPad.  I removed /relaoded iTunes and now it won't recognize either iPad or iPhone. Got any suggestions?

    Hi there Lizabethfromaz,
    You may find the troubleshooting steps in the article below helpful.
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    -Griff W. 

  • Requesting guidance on how best to deal with removal of CreateElementSteps for tables when option to 'script validation for new constraints' is enabled during schema compare

    I have a DeploymentPlanModifer subclass that is responsible for removing certain tables from a deployment plan under specific conditions. It is relatively trivial to find the
    CreateElementSteps I need and subsequently remove them via
    DeploymentPlanModifier.Remove(), but...
    ... if in my comparison I have enabled the 'Script validation for new constraints' option, the deployment plan will contain a
    DeploymentScriptDomStep with a Batch containing AlterTableConstraintModificationStatements for tables with foreign key constraints. My problem starts here - there will be an orphaned
    AlterTableConstraintModificationStatement for each of the tables that I removed. Obviously, execution of the generated script comes to a grinding halt when asking SQL Server to to alter a table that is never created.
    I'm able to get around this by digging around in the aforementioned batches and removing the orphaned alter statements, but this seems really hacky, which makes me think I'm missing the proper way of dealing with this.
    So... if anyone is aware of a more correct way of avoiding this problem, I would really appreciate finding out more about it.
    Thanks in advance for any help. :-)

    Hi Greg. Unfortunately there is not an easy solution here. Walking the deployment model, spotting potential issues and excluding them really is what you have as an option here. The alternative is to pre-process the dacpac to have it in the form you want,
    but I'm not sure if this is an option in your case and it also has limitations.
    Regards,
    Kevin

  • I want to keep songs on my main iTunes but remove them from the Cloud to make more room in the Cloud for new stuff.  HOW?

    I want to keep songs on my main iTunes but remove them from the Cloud to make more room in the Cloud for new stuff.  HOW?

    Are these purchased songs from iTunes?  If so they do not count against your cloud storage.

  • Removing folders that Itunes monitors for new music

    How do I make it so Itunes wil stop looking for music in a particular folder that I did and "add folder to Library" on? I added a removable drive as a folder that Itunes searches for music on. Now I don't want itunes to look for music in that foler anymore how do I remove it from the folders that Itunes searches?

    iTunes does not automatically watch folders for new music. The only exceptions are the one-time scan on a new install, and the new Automatically Add to iTunes folder that is new in iTunes 9. What are you trying to do?

  • Register new listener for newDB(with new Home) in existing 10.2.0.2 cluster

    Dear Friends,
    UAT Instance:
    i have installed 10g cluster (10.2.0.2) and i have cretaed new 10g home and cretaed listener (with port ) and cretaed UAT database
    No issues on the above
    DEV Instance:
    Now we have another database DEV and for this i have differnt oracle home (not same as UAT) and i created databases and converted to RAC but i want this database to be registered in the 10g existing cluster and the listener also i want to have new one with different port (not same as UAT)
    so when we try to cretae new listener from new DB home it's throwing error.
    "CRS-0215: could not start resource"
    so please let me know how to
    creating new listener with different port for new database having new DB home
    and register it with the existing 10g cluster
    Regards,
    DB

    Hi,
    Is the database part of the cluster or not?
    srvctl config database -d ... to find out if not add it to cluster
    srvctl add database -d and then the instances
    srvctl add instance -d dbname -i instance name
    have a look in here for information related to listener/port
    Changing Default Listener Port Number [ID 359277.1]
    How to Create Multiple Oracle Listeners and Multiple Listener Addresses [ID 232010.1]

  • Listening for UncaughtErrorEvents from SubApp loaded by SWFLoader

    I can't seem to get my uncaughtErrorEvents listener to fire when attached to the loader.uncaughtErrorEvents  or loaded content's loaderInfo.uncaughtErrorEvents when loading a swf via SWFLoader.
    I have a main Flex Application ('A.swf') loading a SubApplication  (defined in' B.swf') via a SWFLoader and I need to listen for  UncaughtErrorEvent from the SubApplication. I'm not able to get my event  listeners to be called when I throw an error from within the SubApp  ('B.swf').
    After reading the asDoc for UncaughtErrorEvent and  UncaughtErrorEvents It states that the UncaughtErrorEvent should go through the normal capture, target, and bubble phases through the loaderInfo hierarchy. This doesn't seem to be the case or I'm not understanding the documentation/usage.
    I have added an event listener to A.swf's loaderInfo  (The 'outter' main app) and also to B.swf's loaderInfo (though the Docs  say not to do it here it is part of the event sequence in the capture  and bubble phase...) as well as the SWFLoader internal  FlexLoader.uncaughtErrorEvent (per Docs) like so:
    SWFLoader's internal FlexLoader uncaughtErrorEvents
    swfLoader.content.loaderInfo.loader.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorFunction );
    and the loaded SWF's loaderInfo:
    swfLoader.content.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorFunction );
    When I throw an Error from the SubApplication (B.swf). Only the 'outter' main app's (A.swf) event listener gets called. Which you expect, at first, if it is in the capture phase, but it isn't in that eventPhase at all. When debugging the eventPhase is in the EventPhase.AT_TARGET phase while being handled by A.swf's LoaderInfo, howeever the ASDoc says the Target phase should be B.swf's LoaderInfo.
    Is this a bug between Flash player and Flex where the event isn't flowing correctly as stated in the ASDoc for UncaughtErrorEvent?

    Thanks for the reply Alex.
    The Outer main swf and the SubApp swf are in different ApplicationDomains (sibilings to each other) so they should not be sharing the class that is throwing the error. I should note that these two Applications are purely based on MX components, this is important later on.
    I was originally throwing the error from a Button click handler from B.swf:
    <mx:Button label="Throw Error" click="callLater( throwUncaughtError )" />
    I was wrapping the handler function in a callLater because without it the error is not caught at all and the default flash dialog console just appears with the error. The A.swf's loaderInfo.uncaughtErrorEvents handler was not even firing unless I wrapped it a callLater.
    I realized that Flash Builder's default to link the 4.1 SDK library via Runtime shared libraries was what was causing the A.swf's loaderInfo.uncaughtErrorEvent to fire in the AT_TARGET phase when using callLater. This is because the UIComponent's callLater method queue structure is shared between the two SWFs and therefore inside a function executing off the method queue A.swf's loaderInfo IS the TARGET... explainable, but at first thought that isn't how I'd expect this to work.
    I then decided to test this out by setting the SDK library to merge into the code for both A.swf and B.swf and removing the  callLater. IT WORKS!  B.swf's (the SubApp) loaderInfo.uncaughtErrorEvents handler fires and I prevent the default (flash error console from appearing) and can stopImmediatePropagation so A.swf's loaderInfo.uncaughtErrorEvents handler doesn't fire.
    Perfect besides having to merge the SDK libraries into each swf independently.... size killer.
    In summary, using the same exact code for A.swf and B.swf:
    1. When the SDK libraries are RSL - no UncaughtErrorEvents, neither A.swf's or B.swf's, is called. Instead the default flash error console appears with no chance to handle the uncaught error.
    2. When the SDK libraries are Merged into the code - both A.swf's and B.swf's uncaughtErrorEvents  will be called, according to the asDoc documented sequence; B.swf's uncaughtErrorEvents in the AT_TARGET phase and A.swf's uncaughtErrorEvents in the BUBBLE phase.
    Moreover, if I build a pure Spark implementation everything works even when referencing the SDK libraries as RSL.
    Does this indicate a bug in the globalplayer (flash player code)'s logic for handling UncaughtErrorEvents listeners within the loaderInfo hierarchy when the Flex SDK is Shared code between the SWFs?
    OR
    Since it works in Spark, is it an issue with how the flex2.compiler.mxml.Compiler turns MX based mxml components into generated AS classes (it hooks up the inline event listeners of child UIComponentDescriptor using a generic object and the click function is specified as a STRING and has to use untyped bracket notation to lookup on the UICompoent when adding it as a listener:
    new mx.core.UIComponentDescriptor({
                  type: mx.controls.Button
                  events: {
                    click: "___B_Button1_click"
                  propertiesFactory: function():Object { return {
                    label: "Throw Error"
    Where as Spark does this correctly and generates Factory functions for setting up child UIComponents when converting Spark component mxml to AS:
    private function _B_Button1_c() : spark.components.Button
        var temp : spark.components.Button = new spark.components.Button();
        temp.label = "Throw Error";
       temp.addEventListener("click", ___B_Button1_click);
        if (!temp.document) temp.document = this;
        mx.binding.BindingManager.executeBindings(this, "temp", temp);
        return temp;
    * @private
    public function ___B_Button1_click(event:flash.events.MouseEvent):void
        throwUncaughtError()
    Sadly, moving to pure Spark would be a big hit is my project's schedule and at this point and likely isn't feasible. I have examples (with view source) built in MX for both the RSL and MERGE cases, I just don't know how to attach them here.
    Sorry for the long comments and thanks again!

  • Helpful hints for new Creative Zen MP3 2/4/8/16/32 GB (flash) Users On

    Summary of helpful hints (from this forum and me) for new Creative Zen MP3 2/4/8/6/32 GB (flash) Users Only!
    Rev..
    Date: 4/28/2008
    Author: ZenAndy
    Creative terminology:
    MP3 Player Recovery Tool - A program that resolves the majority of player problems quickly.
    One click is all it takes to update your player to the latest available firmware, and to give your player a clean bill of health.
    Link: http://www.creative.com/products/mp3...me.asp region=
    Note: You can also go to "Creative" "Support" "downloads" choose your MP3 Player type to obtain the latest firmware and software releases.
    Note: On your Zen you can look under "System" & "Information" and then compare the firmware download
    releases OR you can have the "MP3 Player Recovery Tool" (above) do it for you automatically.
    Note: Creative Zen 4/8/6 GB "MP3 Recovery Tool" DOES NOT stop on a firmware comparison match.
    Note: All firmware releases/revisons for the 4/8/6 GB Zen also works (is the same as) for the 2 GB & 32 GB Zen.
    Recovery Mode - If you experience one or more of the following symptoms, it is recommended that you boot the player into its unique Recovery Mode, and then clean up, format or reload the firmware.
    . The player is not detected in Creative MediaSource or Windows Media Player
    2. The battery does not last as expected
    3. Your computer stops responding during file transfers
    4. There is a power outage during file transfers
    5. There is an error about firmware
    6. LCD displays a "Firmware Problem" message
    7. Your player is not responding.
    8. The player is performing erratically.
    Getting Started
    . Load your Creative Zen software from CD FIRST and BEFORE plugging the Zen MP3 player, using the short cable, into the PC USB port to charge it.
    2. Try charging the Zen MP3 player directly from the USB port on the PC. If not, make sure the USB Hub you are using is adequately powered to provide full charging current to the Zen player. Also, try to have the Zen MP3 player as the only USB device, if possible, on the USB hub.
    Some/most Creative Zen flash MP3 Music players come "fully discharged" so, in the mean time, just read the manuals.
    FULLY charge the Zen MP3 player for several hours (~4.0 hrs max) until the battery symbol is NOT flashing AND the battery symbol/icon has a small plug/key symbol in the middle.
    After the first full charge - additional charging is much quicker about 2 /4 hours. (From 0% empty to full)
    3. Go to Creative/Support/Downloads and check for the latest software releases for the Creative Zen. Then check on your Zen MP3 player under System/Information for your firmware revision. Make sure you have the latest software downloaded on your PC and firmware on your Zen MP3 player. < Latest revision [.2.0] 28Feb08>
    OR
    You can run MP3 Player Recovery Tool - see above.
    4. In some cases you might have to do the Recovery Mode "paper clip reset" to get the Zen MP3 flash player started.
    See the Zen User's Guide FAQ. The paper clip reset hole is on the bottom edge below the music pause/run switch.
    (Not the slotted mic hole on the top edge of the player near the earphone jack and SD card slot!!!)
    5. My preference is to have the player shutdown/off before inserting and removing the earphone/headphone plug.
    Recovery Mode Using The Paper Clip OR
    Alternati've Method For Recovery Mode Without The Paper Clip.
    Why use it's
    If you experience one or more of the following symptoms:
    . The player is not detected in Creative MediaSource or Windows Media Player
    2. The battery does not last as expected
    3. Your computer stops responding during file transfers
    4. There is a power outage during file transfers
    5. There is an error about firmware
    6. LCD displays a "Firmware Problem" message
    7. Your player is not responding.
    8. The player is performing erratically.
    Save a copy of your player's content, if possible, before cleaning up the memory!
    Recovery Mode Using The Paper Clip Reset Method
    #. Turn off player if not already turned off
    #2. Press/hold play/pause button. If you accidentally release
    the button, start this reset procedure over again.
    #3. Gently push the end of a metal paper clip into the reset hole on
    the botton edge below the play/pause switch.
    (Do not use the slotted mic hole at the top edge near the earphone jack)
    #4. Slide the on/off/lock switch towards the on position - slide it to the botton hold
    until the display lights up and then release.
    #5. The recovery mode screen appears and four menu items are shown - see below
    <Alternati've Method For Recovery Mode Without The Paper Clip>
    #. Turn off player if not already turned off
    #2. Press/hold play/pause button. If you accidentally release
    the button, start this reset procedure over again.
    #3. Slide the on/off/lock switch towards the on position - slide it to the botton hold
    until the display lights up and then release. Be patient and wait!
    #4. The recovery mode screen appears and four menu items are shown:
    < Clean Up> - cleans, rebuilds and reorganizes your player's memory and restores it to optimal efficiency.
    When the cleanup is complete, select Reboot. Your player restarts and starts rebuilding its music library.
    Note: Your player's firmware is reset to default settings after your player's memory is cleaned up.
    Note: This procedure the hide/show password is reset.
    <2 Format All>- Warning - Formatting your player erases all content on your player's memory and resets your player's firmware to default settings. If possible, back up all data on your player before proceeding.
    Also, you can do this from the PC see Zen User's Guide. FAQ
    <3 Reload Firmware> - Caution !!!! Selecting Reload Firmware erases your player's firmware.
    DO NOT select Reload Firmware unless you have downloaded a newer firmware version for your player, or have been advised to do so by Creative Customer Support.
    Note: My advice when loading/replacing firmware is to connect directly
    to the PC USB port without using a USB hub.
    <4 Reboot> Restarts the player just like the "on/off/lock switch" when switched ON.
    Note: Having NO battery energy/charge/juice this procedure will not work.
    Lithium-Ion Polymer Battery Hints
    Ref:
    http://www.omnica.com/omniview_electronics2.htm
    http://en.wikipedia.org/wiki/Lithium_ion_battery
    . Allow the battery to completely discharge from time-to-time then recharge it fully.
    2. Lithium-Ion batteries loses about 5%- 0% capacity per month.
    3. Lithium-Ion polymer batteries have about 300-500 discharge/charge cycles.
    4. A half full battery indication (50% @ /2 the battery color) used up about 24 hrs worth of battery. Below 50% the indication goes fairly fast to the max of 30 hrs. Note: The battery level indication seems non-linear through out its range.
    5. Battery is Empty~0% - warning screen will appear on LCD and player might shutdown.
    6. Battery is Full- 00% with battery symbol NOT flashing AND plug/key symbol in the center of the battery.
    7. It takes about 2 /4 hours to charge the battery from empty to full.
    8. It takes about 4 hours max to charge a "New" Zen player shipped from the factory.
    9. There is a battery manufactuer's failure rate, which is normal ~ % or less, in which the Lithium-Ion Polymer battery refuses to charge. Creative, ships the Zen MP3 players with some or no charge so there is very small probability that you could have one. I call it the "Deep Six Discharge Battery" Contact/call Creative for replacement.
    Documentation
    There are several pieces of documentation you might need to read to fully understand and use your Creative Zen MP3 flash player to its fullest capabilities.
    #. Zen Users Guide "English" - For Zen MP3 Player - download from Creative/Support/Product documentation
    #2. Zen Quick Users Guide /Front/Back - download from Creative/Support/Product documentation
    #3. Sync Manager (Creative Zen) Click on sync symbol on PC task bar then help
    #4. Creative Zen Media Explorer - Just look under the main help menu
    #5. Windows Media Player <if used>(Microsoft)Use the help files with this program.
    General Tips to increase/decrease the playing time on your Creative Zen flash player.
    <Creative Battery Spec: 5 Hrs. Video & "UP TO" 30 Hrs. Audio/Songs>
    Please do the following:
    . Volume control lower/higher - higher volume settings will decrease playing times. This is logical. More output "volume power" decreases the battery juice.
    2. Audio Settings: EQ, Smart Vol, & Bass Boost will effect your playing time but I believe they are not critical as the Volume & Bit Rates(28 kbsp and others) / File Format (MP3,WMA) & Lock Switch.
    3. Bit Rates & File Formats Do Matter. Bit Rates and File formats will increase/decrease your playing time.
    Per Catherina-CL
    "WMA files will use up more power than MP3 files, and higher bitrates more so than standard ones (like 28kbps MP3). Best thing to do is rip an album in 28kbps MP3 and leave it playing in a loop on a normal volume level. See how long the battery lasts then."
    Please Note: The main difference between MP3 and WMA is the compression. According to Microsoft a 64KBPS WMA file is the same quality 28KBPS MP3. This is of course up to a person's preference but you may find you can get better compression out of WMA.
    4. FULLY CHARGE your Zen. This means the battery symbol is NOT flashing AND there is a plug/key symbol embedded within the battery symbol. The battery is 00% FULL under BOTH conditions. Having just the battery symbol all green will not do it.
    From the link:
    http://www.omnica.com/omniview_electronics2.htm
    Regarding lithium-ion shelf life, one of our engineers recently met with a battery-house representati've. It has come to their attention that repeated charging and re-charging of a less than fully discharged Li-ion cell affects the battery "gas gauge" included with many devices. Over a number of cycles there is a resultant loss in accuracy. Frequently, the indicated remaining charge has little relationship to the actual amount of life left in the cell! Fortunately, according to the battery expert, the gauge will reset itself if the battery is allowed to completely discharge from time-to-time.
    5. Having different types of earphones/headphones will increase or decrease the playing time by how much "electronic load" the earphones/headphones create on the Zen player. There are some power hungry earphones/headphones out there.
    The 6 ohm earbuds conserves battery power more than the 32 ohm earbuds supplied by Creative. (About 0% more)
    6. Always, always lock your Zen player while playing music. This cuts off the power drain from the color 2.5" LCD and blank the LCD screen. After all, you can't read the LCD screen if it is in your shirt pocket and playing music!
    7. Make sure you have the latest firmware upgrades in order to get the best of your Creative Zen Flash MP3 Player.
    Troubleshooting
    Your Creative Zen is extremely complex.
    Check this link to peek inside player http://www.anythingbutipod.com/archi...isassembly.php
    Also, this link:
    http://arstechnica.com/journals/hard...ssor-behind-it
    There could be a million things that could go wrong with your player so you will not be the FIRST or LAST to have a problem. Keep in mind, there are many, many others that have the Zen with no problems whatsoever. Things happen, but Creative is there to help.
    Dropping a Zen or any other player might/will/possibly ruin the player for good!!!
    Since this player is solid-state (no moving parts e.g. mini-disk dri've) then the only thing that will keep it from running for years is the non-user replaceable Lithium-Ion battery. I will concentrate on some troubleshooting tips which are battery related but I hope you have already the latest firmware downloaded and installed on your player
    Battery - Lithium-Ion Polymer
    #. Battery won't charge "out of the box" new player.
    A. First, read above "Getting Started"
    B. Next, try a different USB mini cable.
    C. Next, there is a battery manufactuer's failure rate < %, in which the Lithium-Ion Polymer battery refuses to charge.
    Creative, ships the Zen MP3 players with no charge so there is very small probability thatyou could have one.
    I call it the "Deep Six Discharge Battery" Call / Contact Creative.
    #2. Battery won't charge properly after using the player for some time.
    A. When you plug in your player into the USB port via mini USB patch cable, the connection resets the player to the "docked screen" with the battery level gas guage , in the right hand corner.
    Sometimes this action does not reset the player properly but there is no indication to you that the player is charging.
    Just disconnect/connect the USB cable again.
    B. Sometimes, the Zen player gets confused and you have to do a Recovery Mode "paper clip reset" which forces the player into a "special menu screen" to clean-up the player and to reset the player which allows showing the "docked screen" while charging the unit. See Zen User's Guide for explicit instruction und FAQ.
    C. Since the Zens came out late in 2007, the maximum of 300-500 charge/discharge should not apply YETbut users beware, as with any other Lithium-Ion Polymer battery it will not charge fully "like new"because of a " fixed shelf life" (2-3 yrs) OR too many charge/discharge cycles. A battery replacement is in order.
    Methods of charging the Creative Zen MP3
    . The short mini-standard USB cable provided by Creative from the factory. Plugs into a PC USB port.
    2. Uni'versal Power Adapter (Creative) plugs into the wall. Works "anywhere in the world"
    Note: Different countries have different wall AC voltages and hertz requirements. This has adapters for different countries/locations wall outlets and a uni'versal power supply for all voltage and hertz requirements.
    Note: This is a heavy duty high/fast charging wall outlet charging adapter. (2400 ma)
    3. Auto/Vehicle 2 VDC charger (Creative) or other compatible vehicle 2 VDC to USB charger.
    4. EARHUGGER IPOD POWER POD - MP3-8370 (White compact module)
    http://www.earhugger.com/powerPod.html
    http://www.amazon.com/Earhugger-MP3-.../dp/B000QTTKSS
    This compact module will solve all the following travel modes and conditions:
    . Camping, hiking or outdoor travel - no PC or noAC or maybe no auto/car.
    2. Airplane travel - no PC or no AC or no auto/car.
    3. Train/subway travel - no PC or no auto/car
    4. Car travel - no PC or no AC
    5. Foot travel - no PC or no AC or no auto/car
    It uses 4 ways to charge the Zen:
    . Retractable mini-standard USB cord for PC charging. <--- does not communicate with PC! - only for charging
    2. Retractable mini USB cord for auto/vehicle charging (Fused)
    3. Retractable mini USB cord for wall 0-20 VAC 50/60Hz charging. (non-international use plug style)
    4. 9 VDC battery terminal for using standard alkaline 9 VDC or high ma Lithium 9 VDC to charge the Zen via
    mini USB cable. Note:You might need several alkaline batteries to charge the internal 550 ma hr Zen battery!
    Great for remote destinations.
    5. Rechargeable portable battery packs.
    Black & Decker has several "Power To Go"models CPI0B-C & CPI20XB (not for international use because of 20 AC 60Hz only charging wall wart)
    Note: There are other brands that also do this method of charging.
    http://www.blackanddecker.com/Produc...Path=4033.4040
    You charge this portable NiMH battery pack from the AC wall outlet so you can carry with you on trips to charge the Zen.
    6. Mobile phone chargers. Some have a mini-USB plug for charging the phone but it could be used to charge the Zen BUT BEWARE IT COULD RUIN THE ZEN IF IT IS NOT COMPATIBLE! The output should have a voltage of 5 VDC +- 5% (4.75-5.25 VDC) ON THE PROPER MINI-USB PINS and a charging current at least 200 ma to 2400 ma. See this forum for the recommend phone phone chargers to use with the Zen.
    Note: You are charging an internal Lithium-ion polymer 550 mahr battery in the Zen so the lower the charging current the longer it takes to charge.
    Note: You will find that charging the Zen from the wall charger is much faster than the "current limited" charging on the standard PC USB port.
    Note: For diagnostic purposes and emergency charging of the Zen it is wise to have an external (non-PC) charging device for your Zen.
    Note: Only the battery charging symbol shows up on the Zen when using an external charger.
    Scratches
    All plastic screens will scratch, doesn't matter which type you have.
    For minor scratches you could use the Novus three part cleaner, polish and scratch remover system. Do not use the #3 coarse abrasi've in this system! Be extremely careful in using this product !!!! Please check the web.
    OR
    Low abrasi've toothpase <--- some say this works
    OR
    CD scratch remover/repair kit <---- have not tried this.
    The Zen (Flash) MP3 glass LCD screen is covered by the overlay plastic you see on the front. Worst case, you can have only the outer shell repaired and replaced by Creative.
    To prevent scratches in the first place:
    Use the Zen cloth bag which comes with the unit (sometimes ) to prevent scratches.
    OR
    Buy the Zen clear plastic case (Clear Case #70AB2600002). Sold by Creative.< I use this>
    OR
    Buy an clear plastic overlay. (Screen protector #70AB2600003) which goes over the LCD protector screen for protection. Sold by Creative.
    OR
    Also, you can cut up a "generic" PDA screen protector to fit the Zen.
    OR
    Obtain a "digital camera lcd screen protector" from a camera store or internet
    OR
    "Invisible shield" -The best protection money can buy
    http://www.zagg.com/invisibleshield/...ns-shields.php
    How to destroy your Zen - WHAT NOT TO DO
    . Leave it in the auto/car/vehicle - the vehicle inside heats up 20-35 F higher than the outside temperature.
    2. Leave it outside in freezing temperature 0C 32F. The LCD will freeze/discolor/absorb water.
    Note: It is remotely possible it could recover when warm-up at room temperature.
    Note: Just keep the Zen near your body heat when outside in freezing temperatures.
    3. Dropping it might cause the LCD screen to crack or loosen up the internal connections to the electronics or short out the internal electronics.
    Note: Use a protecti've case to cushion the blow from dropping the Zen.
    4. Dropping or submerging or getting the Zen wet in water might short out the electronics and battery.
    You could prevent destruction by immediately shaking the Zen vigorously in open air to dry it out.
    5. Sitting on it could flex the electronics and short or open circuits which would cause a defecti've/faulty Zen.
    <A bit of humor ... There is No Santa Claus, Easter Bunny or Tooth fairy and Creative does NOT give away money. If you destroy or damage your Zen you will pay not Creative>
    How can you tell if your Zen is defecti've/faulty
    . A "white screen" or a "totally blank black screen" shows up on the Zen LCD.
    2. You cannot force the Zen into the special "Recovery Mode" menu screen.
    3. The Zen refuses to "take a charge"(To charge up the internal Lithium-Ion Polymer battery)
    4. The Zen LCD is cracked or distorted due to dropping or handling abuse.
    5. The Zen clock does not keep accurate time (within 2 mins max per month)
    Contact Creative if any of the above faults occur - the Zen is bad and nothing you can do will fix it!
    WSOD "White Screen of Death"
    The "White Screen of Death" is really caused by a hardware problem. You see, the internal Freescale/SigmaTel STMP3700 MP3 processor has to write to the LCD. If this operation is prevented by internal electronic opens or shorts, bad STMP3700, locked-up firmware, bad LCD or any other electronic component failure then the CPU might/will halt and refuse to write to the LCD which will be reflected in a "white screen of death" I cannot cover all the causes of the "white screen of death" but rest assured Creative should pick these problems up in their quality control manufacturing process with a 99% success rate. Problems do show up after the manufacturing process but Creative has warranty protection for this other % fault rate. (Which is normal in electronics manufacturing)
    Media Content
    Listening to the built-in music on the Zen is OK but after a while your question now becomes "What else can I do with my Zen "
    Note: The "How to" instructions for adding Media content can be found in the Zen documentation.
    Terminology:
    Album: Collection of tracks or songs under one "album" title.
    Artist: Track or song artist
    DRM: Digital rights management - copy protection scheme - Zen cannot use music with this music protection scheme. (itunes) (But "itunes plus" will work)
    Genres: Type or kind of music
    <The following genres are defined in ID3v>
    Blues,Classic Rock,Country,Dance,Disco,Funk,Grunge,Hip-Hop,Jazz,Metal,New Age,Oldies,Other,Pop,
    R&B,Rap,Reggae,Rock,Techno,Industrial,Alternati've ,Ska,Death Metal,Pranks,Soundtrack,Euro-Techno,
    Ambient,Trip-Hop,Vocal,Jazz+Funk,Fusion,Trance,Classical,Instru mental,Acid,House,Game,Sound Clip,
    Gospel,Noise,AlternRock,Bass,Soul,Punk,Space,Medit ati've,Instrumental Pop,Instrumental Rock,
    Ethnic,Gothic,Darkwave,Techno-Industrial,Electronic,Pop-Folk,Eurodance,Dream,Southern Rock,
    Comedy,Cult,Gangsta,Top 40,Christian Rap,Pop/Funk,Jungle,Nati've American,Cabaret,New Wave,
    Psychadelic,Rave,Showtunes,Trailer,Lo-Fi,Tribal,Acid Punk,Acid Jazz,Polka,Retro,Musical,Rock & Roll,
    Hard Rock
    <The following genres are Winamp extensions>
    Folk,Folk-Rock,National Folk,Swing,Fast Fusion,Bebob,Latin,Revival,Celtic,Bluegrass,Avantg arde,
    Gothic Rock,Progressi've Rock,Psychedelic Rock,Symphonic Rock,Slow Rock,Big Band,Chorus,
    Easy Listening,Acoustic,Humour,Speech,Chanson,Opera,Cha mber Music,Sonata,Symphony,
    Booty Bass,Primus,Porn Groove,Satire,Slow Jam,Club,Tango,Samba,Folklore,Ballad,Power Ballad,
    Rhythmic Soul,Freestyle,Duet,Punk Rock,Drum Solo,A capella,Euro-House,Dance Hall
    <A bit of humor: I think the above Genres lists are missing two - "elevator music" & Crying and Whining e.g. Country Western>
    ID3 Tags: Internal file information associated with an Mp3 or wav audio file. This format contains
    Track number, Album name/title, Genre, Artist and Song Title which can be sorted and indexed by
    the Zen device.
    IPTV: Is a system where a digital television service is deli'vered using Internet Protocol over a network infrastructure, which may include deli'very by a broadband connection. http://zencast.com/
    JPEG: Is a commonly used method of compression for photographic images.
    This is the only photo format used by the Zen.
    MP3 and WMA music tracks: Music format used by the Zen.
    Note: Having the wrong bit rates will drain the Zen battery faster. (See above)
    MP3: Is a digital audio encoding format using a form of lossy data compression.
    Non-protected AAC: Files are regular AAC files without any DRM: they can be converted to other formats (like MP3) and can be played on an unlimited amount of devices and burned an unlimitd amount of times. They have no restrictions.
    Podcast: Is a series of digital-media files which are distributed over the Internet using syndication feeds for playback on portable media players and computers. http://zencast.com/
    Protected AAC: Files are AAC audio files that contain DRM (Digital Rights Management), most often music purchased from the iTunes store. The Creative Zen cannot use these files.
    Note: "Itunes Plus Store" have songs without DRM which the Zen can use.
    Ripping CDs: Copying tracks from an audio CD on a PC and downloading tracks to the Zen.
    Note: Use the Creative Zen Media Explorer for ripping audio CD is one method.
    Song Title: Name of song or track
    Track Number: Numerical number of track of CD album.
    Track: General name for song or song title.
    Unprotected AAC format: Music format used by the Zen
    WMA:Is an audio data compression technology developed by Microsoft. The name can be used to refer to its audio file format or its audio codecs.
    WAV: (or WAVE), short for Waveform audio format, is a Microsoft and IBM audio file format standard for storing an audio bitstream on PCs.
    Note: The Zen's built-in microphone produces this audio file format.
    Zen Audio Format:MP3, WMA, WAV, non-protected AAC (.m4a), Audible (2, 3, 4)
    Zen Media Content: Video, Music, Audio, Photos/Images transferred/dowloaded into the Zen
    Zen Photo Format:JPEG
    Note: You can copy/drag/paste JPEG photos from your PC to your Zen for viewing.
    Note: You can import photos & view photos from the SD card.
    Zencast Organizer: Seamlessly integrates ZENcast media files with Creative portable media players and/or your computer
    Zen Video Format:MJPEG, WMV9 and (with transcoding - MPED4-SP, DivX 4/5 and XviD)
    Warning - In some countries (including the US) its illegal to do:
    Copying audio DVD & DVDs
    Defeating DRM MP3 Music (Digital Rights Management)
    Intercepting/copying (non purchased) music.
    Downloading music/songs from an illegal or "free" rouge website.
    General Media Content links:
    http://pro-music.org/Content/GetMusi...lineStores.php
    Note: Check to see if your music files/tracks contains ID3 tags.
    Note: ZEN also supports iTunes Plus tracks from the iTunes store,
    Note: The following media content is only a small fraction of means and ways
    of collecting/dowloading media content to the Zen.
    Media Content from Creative Website(s)
    Note: The Media Content can be found under "Fill your Zen" on the bottom of the Creative Zen product page.
    http://zencast.com/
    ZENcast is the ultimate source for free IPTV channels, video blogs and podcasts on the Internet. It provides quick and easy access to a wide range of interesting and entertaining video and audio content online.
    http://www.audible.com/adbl/site/cre...seBVCookie=Yes
    Audible.com - Audible.comis the Internet s leading audio provider of bestselling audio books, comedy programs and today s most relevant magazines and newspapers
    http://creative.vongo.com/
    VONGO is the video download service that gives you instant access to over 2500 hit movie and video selections from Starz .
    Watch movies whenever, wherever on your ZEN. A great entertainment venue for watching movies while on the road or on the go.
    http://www.napster.com/creative/
    Transfer unlimited music to your ZEN without paying per song.
    With Napster To Go you can:
    Choose from over 5 million songs, plus new releases every week
    Play music instantly from any internet-connected computer
    Find old favorites and discover new music by exploring playlists, radio, Billboard charts and more
    Create a library of your favorite music and build custom playlists.
    http://www.emusic.com/ZEN
    Choose from over ,500,000 songs
    Burn unlimited CDs
    Compatible with every MP3 player
    No confusing restrictions-Own your music!
    http://www.lala.com/frontend/action/...=user:2672@223
    Why pay 99per song when you can get the whole album for $At lala.com, you can trade your used CDs for new music.
    .8 million titles available for trade. CD quality guaranteed.
    Every CD you receive is yours to keep - no restrictions.
    Pay only $ per CD received. No monthly fees or commitments. Sign up is FREE.
    http://www.amazon.com/b/ &node=62663
    Buy or Rent Movies Online
    Watch DVD-quality video downloads on your PC or ZEN
    Conveniently download from your PC at work to your PC at home
    Discover thousands of TV shows & movies available for download
    I started this thread in April 08 to help other new Creative Zen MP3 (Flash) users. If there are common threads that are posted from new users then I try to make a section to inform other new users in solving their similar problems. I cannot believe that this thread was viewed over 0,000 times! Thank you for your "viewing" support.
    Please note: This thread is constantly changing so check back for any new helpful hints, problem solving, troubleshooting and practical solutions for the Creative Zen.
    "The Creative ZenR O C K S"
    Zenandy
    Message Edited by Zenandy on 08--2008 08:26 AM

    Hi,
    I'm from germany so no 'best buy' but I think I will lock around sleeve/bag for a different product with same measures. Any tip?
    The clear plastic case is not what I want. I would like to use the player without such protections. I just want a sleeve to protect the player while its in my jacket/pants.
    Btw, i have bought this version: Creative Zen (maybe european version?). I also doesn't seem to have your mentioned sleeve. I also couldn't find it on the website.
    Anyway, thank you,
    Chris

  • Huge performance differences between a map listener for a key and filter

    Hi all,
    I wanted to test different kind of map listener available in Coherence 3.3.1 as I would like to use it as an event bus. The result was that I found huge performance differences between them. In my use case, I have data which are time stamped so the full key of the data is the key which identifies its type and the time stamp. Unfortunately, when I had my map listener to the cache, I only know the type id but not the time stamp, thus I cannot add a listener for a key but for a filter which will test the value of the type id. When I launch my test, I got terrible performance results then I tried a listener for a key which gave me much better results but in my case I cannot use it.
    Here are my results with a Dual Core of 2.13 GHz
    1) Map Listener for a Filter
    a) No Index
    Create (data always added, the key is composed by the type id and the time stamp)
    Cache.put
    Test 1: Total 42094 millis, Avg 1052, Total Tries 40, Cache Size 80000
    Cache.putAll
    Test 2: Total 43860 millis, Avg 1096, Total Tries 40, Cache Size 80000
    Update (data added then updated, the key is only composed by the type id)
    Cache.put
    Test 3: Total 56390 millis, Avg 1409, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 4: Total 51734 millis, Avg 1293, Total Tries 40, Cache Size 2000
    b) With Index
    Cache.put
    Test 5: Total 39594 millis, Avg 989, Total Tries 40, Cache Size 80000
    Cache.putAll
    Test 6: Total 43313 millis, Avg 1082, Total Tries 40, Cache Size 80000
    Update
    Cache.put
    Test 7: Total 55390 millis, Avg 1384, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 8: Total 51328 millis, Avg 1283, Total Tries 40, Cache Size 2000
    2) Map Listener for a Key
    Update
    Cache.put
    Test 9: Total 3937 millis, Avg 98, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 10: Total 1078 millis, Avg 26, Total Tries 40, Cache Size 2000
    Please help me to find what is wrong with my code because for now it is unusable.
    Best Regards,
    Nicolas
    Here is my code
    import java.io.DataInput;
    import java.io.DataOutput;
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Map;
    import com.tangosol.io.ExternalizableLite;
    import com.tangosol.net.CacheFactory;
    import com.tangosol.net.NamedCache;
    import com.tangosol.util.Filter;
    import com.tangosol.util.MapEvent;
    import com.tangosol.util.MapListener;
    import com.tangosol.util.extractor.ReflectionExtractor;
    import com.tangosol.util.filter.EqualsFilter;
    import com.tangosol.util.filter.MapEventFilter;
    public class TestFilter {
          * To run a specific test, just launch the program with one parameter which
          * is the test index
         public static void main(String[] args) {
              if (args.length != 1) {
                   System.out.println("Usage : java TestFilter 1-10|all");
                   System.exit(1);
              final String arg = args[0];
              if (arg.endsWith("all")) {
                   for (int i = 1; i <= 10; i++) {
                        test(i);
              } else {
                   final int testIndex = Integer.parseInt(args[0]);
                   if (testIndex < 1 || testIndex > 10) {
                        System.out.println("Usage : java TestFilter 1-10|all");
                        System.exit(1);               
                   test(testIndex);               
         @SuppressWarnings("unchecked")
         private static void test(int testIndex) {
              final NamedCache cache = CacheFactory.getCache("test-cache");
              final int totalObjects = 2000;
              final int totalTries = 40;
              if (testIndex >= 5 && testIndex <= 8) {
                   // Add index
                   cache.addIndex(new ReflectionExtractor("getKey"), false, null);               
              // Add listeners
              for (int i = 0; i < totalObjects; i++) {
                   final MapListener listener = new SimpleMapListener();
                   if (testIndex < 9) {
                        // Listen to data with a given filter
                        final Filter filter = new EqualsFilter("getKey", i);
                        cache.addMapListener(listener, new MapEventFilter(filter), false);                    
                   } else {
                        // Listen to data with a given key
                        cache.addMapListener(listener, new TestObjectSimple(i), false);                    
              // Load data
              long time = System.currentTimeMillis();
              for (int iTry = 0; iTry < totalTries; iTry++) {
                   final long currentTime = System.currentTimeMillis();
                   final Map<Object, Object> buffer = new HashMap<Object, Object>(totalObjects);
                   for (int i = 0; i < totalObjects; i++) {               
                        final Object obj;
                        if (testIndex == 1 || testIndex == 2 || testIndex == 5 || testIndex == 6) {
                             // Create data with key with time stamp
                             obj = new TestObjectComplete(i, currentTime);
                        } else {
                             // Create data with key without time stamp
                             obj = new TestObjectSimple(i);
                        if ((testIndex & 1) == 1) {
                             // Load data directly into the cache
                             cache.put(obj, obj);                         
                        } else {
                             // Load data into a buffer first
                             buffer.put(obj, obj);                         
                   if (!buffer.isEmpty()) {
                        cache.putAll(buffer);                    
              time = System.currentTimeMillis() - time;
              System.out.println("Test " + testIndex + ": Total " + time + " millis, Avg " + (time / totalTries) + ", Total Tries " + totalTries + ", Cache Size " + cache.size());
              cache.destroy();
         public static class SimpleMapListener implements MapListener {
              public void entryDeleted(MapEvent evt) {}
              public void entryInserted(MapEvent evt) {}
              public void entryUpdated(MapEvent evt) {}
         public static class TestObjectComplete implements ExternalizableLite {
              private static final long serialVersionUID = -400722070328560360L;
              private int key;
              private long time;
              public TestObjectComplete() {}          
              public TestObjectComplete(int key, long time) {
                   this.key = key;
                   this.time = time;
              public int getKey() {
                   return key;
              public void readExternal(DataInput in) throws IOException {
                   this.key = in.readInt();
                   this.time = in.readLong();
              public void writeExternal(DataOutput out) throws IOException {
                   out.writeInt(key);
                   out.writeLong(time);
         public static class TestObjectSimple implements ExternalizableLite {
              private static final long serialVersionUID = 6154040491849669837L;
              private int key;
              public TestObjectSimple() {}          
              public TestObjectSimple(int key) {
                   this.key = key;
              public int getKey() {
                   return key;
              public void readExternal(DataInput in) throws IOException {
                   this.key = in.readInt();
              public void writeExternal(DataOutput out) throws IOException {
                   out.writeInt(key);
              public int hashCode() {
                   return key;
              public boolean equals(Object o) {
                   return o instanceof TestObjectSimple && key == ((TestObjectSimple) o).key;
    }Here is my coherence config file
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>test-cache</cache-name>
                   <scheme-name>default-distributed</scheme-name>
              </cache-mapping>
         </caching-scheme-mapping>
         <caching-schemes>          
              <distributed-scheme>
                   <scheme-name>default-distributed</scheme-name>
                   <backing-map-scheme>
                        <class-scheme>
                             <scheme-ref>default-backing-map</scheme-ref>
                        </class-scheme>
                   </backing-map-scheme>
              </distributed-scheme>
              <class-scheme>
                   <scheme-name>default-backing-map</scheme-name>
                   <class-name>com.tangosol.util.SafeHashMap</class-name>
              </class-scheme>
         </caching-schemes>
    </cache-config>Message was edited by:
    user620763

    Hi Robert,
    Indeed, only the Filter.evaluate(Object obj)
    method is invoked, but the object passed to it is a
    MapEvent.<< In fact, I do not need to implement EntryFilter to
    get a MapEvent, I could get the same result (in my
    last message) by writting
    cache.addMapListener(listener, filter,
    true)instead of
    cache.addMapListener(listener, new
    MapEventFilter(filter) filter, true)
    I believe, when the MapEventFilter delegates to your filter it always passes a value object to your filter (old or new), meaning a value will be deserialized.
    If you instead used your own filter, you could avoid deserializing the value which usually is much larger, and go to only the key object. This would of course only be noticeable if you indeed used a much heavier cached value class.
    The hashCode() and equals() does not matter on
    the filter class<< I'm not so sure since I noticed that these methods
    were implemented in the EqualsFilter class, that they
    are called at runtime and that the performance
    results are better when you add them
    That interests me... In what circumstances did you see them invoked? On the storage node before sending an event, or upon registering a filtered listener?
    If the second, then I guess the listeners are stored in a hash-based map of collections keyed by a filter, and indeed that might be relevant as in that case it will cause less passes on the filter for multiple listeners with an equalling filter.
    DataOutput.writeInt(int) writes 4 bytes.
    ExternalizableHelper.writeInt(DataOutput, int) writes
    1-5 bytes (or 1-6?), with numbers with small absolute
    values consuming less bytes.Similar differences exist
    for the long type as well, but your stamp attribute
    probably will be a large number...<< I tried it but in my use case, I got the same
    results. I guess that it must be interesting, if I
    serialiaze/deserialiaze many more objects.
    Also, if Coherence serializes an
    ExternalizableLite object, it writes out its
    class-name (except if it is a Coherence XmlBean). If
    you define your key as an XmlBean, and add your class
    into the classname cache configuration in
    ExternalizableHelper.xml, then instead of the
    classname, only an int will be written. This way you
    can spare a large percentage of bandwidth consumed by
    transferring your key instance as it has only a small
    number of attributes. For the value object, it might
    or might not be so relevant, considering that it will
    probably contain many more attributes. However, in
    case of a lite event, the value is not transferred at
    all.<< I tried it too and in my use case, I noticed that
    we get objects nearly twice lighter than an
    ExternalizableLite object but it's slower to get
    them. But it is very intersting to keep in mind, if
    we would like to reduce the network traffic.
    Yes, these are minor differences at the moment.
    As for the performance of XMLBean, it is a hack, but you might try overriding the readExternal/writeExternal method with your own usual ExternalizableLite implementation stuff. That way you get the advantages of the xmlbean classname cache, and avoid its reflection-based operation, at the cost of having to extend XMLBean.
    Also, sooner or later the TCMP protocol and the distributed cache storages will also support using PortableObject as a transmission format, which enables using your own classname resolution and allow you to omit the classname from your objects. Unfortunately, I don't know when it will be implemented.
    >
    But finally, I guess that I found the best solution
    for my specific use case which is to use a map
    listener for a key which has no time stamp, but since
    the time stamp is never null, I had just to check
    properly the time stamp in the equals method.
    I would still recommend to use a separate key class, use a custom filter which accesses only the key and not the value, and if possible register a lite listener instead of a heavy one. Try it with a much heavier cached value class where the differences are more pronounced.
    Best regards,
    Robert

  • Issue with setting an Action Listener for a Command Button

    Hi all,
    I'm trying to set an action listener for a CoreCommanButton in a backing bean. Here's my code:
         CoreCommandButton editBtn = new CoreCommandButton();
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",null);
              editBtn.setActionListener(mb);
    //Action listener method
         public void doButtonAct(ActionEvent actionEvent)
    I keep getting a javax.faces.el.MethodNotFoundException error. However when I remove the ActionEvent parameter in doButtonAct(), I get a wrong number of arguments error.
    So i'm guessing there is something wrong with the parameters i accept in my action listener method. what can be causing this issue?
    Cheers.

    I figured this out.
    Since doButtonAct() requires an ActionEvent object as a parameter, i needed to define the parameter type when I create the method binding.
    Solution:
         Class argsString[] = new Class[] { ActionEvent.class };
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",argsString);

Maybe you are looking for