Don't forget the battery

How many people are now willing to give Apple $80.00 some dollars for a new battery that should cost more like $40.00?

What is happening is that your on-device battery meter is off-sync with the actual battery charge. Connect to your OEM wall outlet battery charger and while still connected and powered on, remove the battery a minute to reboot. After reboot leave to fully charge to 100%.
Thus will reset the false charge reading. You may need to do perform this procedure 2-3 times.
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4   Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA   Display/Scan Bar Code

Similar Messages

  • Forget the battery issue for a moment,

    I think the battery issue will be fixed, I think there are many reasons for it, I'm not going to speculate. What I would like to know is if you can forget the battery issue for a moment, What do you think of the 4S itself, the camera, mirroring onto apple tv etc...have you been happy with the phone and its functions and if it didn't have a battery issue right now would you reccomend it? I'm thinking about buying two of them and that is a substantial investment, just wondering if it's everything its cracked up to be...Thanks!

    Yeah it's a good phone.  It's my first iPhone.  I came from a Droid Bionic, so I am use to no battery life.  I usually charge it at my desk at work and it last all night until I get back to work.  I listen to music on my car, so it's tied to the USB input to my car, so I don't really have an issue with the battery.
    The camera is really good.  For a point and click, it's fast and the pictures are clear.  They only thing I run into, which is on every phone camera is smudges on the lense.
    It took a lot of getting use to going from the Bionic 4.3" screen to the 3.5" screen.
    I don't have the Aple TV set up, so I can't answer that.
    What I like about Apple products?  They work.  Very simply, they just work.

  • Why us don´t add the battery percentage on the iPod Touch?

    Why us don´t add the battery percentage on the iPod Touch?

    Apple has not said why. The terms of use for this Apple forum prohibit discussion about:
    Discussions of Apple policies or procedures or speculation on Apple decisions.

  • Macbook don't reconize the battery

    Need help!!
    the battery is at 100% charged, but if I unpluged goes off.

    Have you tried resetting the System Management Controller? That is a good first step for power related issues such as this.
    If that does not work, you might try using a different battery to test. If it works with a different battery, replace the battery.
    Best of luck.

  • Don't forget the Tango App

    You can FaceTime over 3G and with your Android friends a well.

    You can FaceTime over 3G and with your Android friends a well.

  • I don't feel safe replacing this. I don't think the customer service rep understood​.

    I just talked to an agent and described a Verizon box in our apartment. We just moved in and this is a utility box in our apartment that we are dealing with. It's in no way connected to my current service as it was there before we moved in. The battery is low light is on so I called to have them come and replace it. She told me I would have to and said the battery would be here in 10 days. This battery has been beeping every 20 mins and it's frustrating to say the least. This is Verizon's utility box, not mine, and it's annoying that it's in our apartment closet instead of in a utility closet. 
    The last part is that I don't feel comfortable touching or moving this battery after I saw the warning labels on it. Someone from Verizon please help me get this resolved so I don't feel like I'm playing Russian roulette just trying to turn off a horrible beeping noise from Verizon's utility box.

    Note that this is a peer-to-peer forum. Verzion does not provide direct support here.  If you want an official Verizon answer, you'll have to contact them directly (see "contact us" at the bottom of these web pages).
    The box is called on ONT, which stands for optical network terminal.  The battery is a sealed lead acid battery.  It is really easy to replace.  Just pull it out and swap connectors.
    The primary safety message is don't open the battery as there is nasty stuff inside.  Unless you plan to take a hammer, saw or prying tool to see what's inside, you're safe.  You can easily recycle it at Home Depot or Lowes.
    Note that if you do not have Verizon FiOS phone, internet or TV service, you don't need the ONT to be powered.  You can remove the battery and unplug the ONT without concern.
    Also, don't be surprised if Verizon sends you a bill for the battery.  The battery is not Verizon equipment, it is owned by the occupant.  If you truly don't have an account with Verizon, you may never see the battery they promised you.  But no worries, just yank out the old one and unplug the ONT.
    Enjoy!
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.

  • Is it better for your battery if you let it run down all the way and then charge it? Or to charge it whenever you have the opportunity?  Which is better for the life of the battery?

    I was wondering it the life of the battery would last longer if you let the battery run down all the way and then charge it? Or to charge it whenever you have the opportunity even if it doesn't have a low battery?  Which is better for the life of the battery and prolong the life of the battery?

    I've had a iPhone 4s since March 2012, and it's battery is pretty useless now.  I was using the app Battery Doctor (Battery Saver, Battery Life) by Beijing Kingsoft Internet Security software, which encourages the user to charge more often, whenever battery life drops below 100% full and greater than 20% full, and gives ratings according to the number of full, partial & overcharges done, but I'm concerned that charging like that actually results in worse battery life??
    I now have an new iPhone 5 and don't want the battery to only last as short as the last one did
    Any advice/comments please

  • What's the deal with the battery?

    I just bought a new video iPod a few days ago. I've loaded all of my songs onto it, and loaded a few videos on it also. I've FULLY charged it, and I watched about 15 minutes of video on it. After that video is done, it says the battery is at about 1/3rd full. 1/3rd battery life after 15 minutes of video, then I play a few songs, and the battery meter goes up to about half full. Then after a few songs I play another video and the battery meter immediately goes to 0% full. What in the world is the deal with this thing? Is it accurate? If it is, can this really be that I can only watch about 20 minutes of video on it until the battery is completely dead? Anyone else having this issue?
    Thanks in advance.
    Danny
    iMac    

    First you really need to try charging your ipod to full then run it empty then charge it again, do this three or four times and it will sync your meter to your ipod. Please note though that the meter is a guide and just a guide, it does not always acuratly display the correct charge of your battery. I have noticed when I have my video on, my meter is lower then when I am playing songs. But I have found that mine is fairly acurate when I first turn it on before I play songs or do anything. I always check it that way so I have a good idea of where I am at. It takes out all the variables, but I have had my nano in the red and gotten 5 hours out of it... so go figure... my video when it hits red, has maybe 1 hr tops.. depending on what I am doing, if it is video... like 20 mins or less.

  • MacBook does not "see" the battery. Poweradapter won't charge it ..

    Hello, my Macs seem to be at war with me. Today, it's my MacBook playing up. I plugged it in this morning and was surprised to find that it switched off the moment I took the poweradapter out. I then realized that it only works when powered off the power adapter. "No battery" is what the computer thought. I took the battery out and put it in again but nothing changed. I switched the computer off and on again and it nows recognizes that a battery is in but it shows me that it is at 0% and says that "battery is not charging". The power adapter is attached at all times .... It is an older computer (end of 2006), perhaps an old battery, but hey .. is it normal for things to go so out of order from a moment to moment?

    Hi, m.g.h. Have you ever tried a different, known-good AC adapter, just to eliminate the possibility that the problem resides there? If you plug the adapter in and the adapter ringlight glows green, turn the Powerbook over and press the button on the battery. The lights on the battery should glow green and stay on if the adapter is working correctly.
    I don't see the Battery Info in "About this Mac..." (it's not listed at all; is this because I'm in OS 10.3.9...?
    Yes, it is. That info doesn't appear in Panther's System Profiler, so you were right to check it in Terminal.
    Your battery is obviously connected to the Powerbook, given the Terminal readouts. That being the case, it would seem that the possible causes include a bad (though new) battery; a bad PMU; a bad DC-In board, if you have a DVI Tibook; and a bad AC adapter.

  • Playlist disappears when the battery runs down ...

    Anyone experienced this? The battery runs flat, then when you recharge, the playlist is empty, and it's impossible to use the iPod. But when you connect it to a computer ... any computer, using a USB ... bingo! Back comes the playlist! Lesson? Don't let the battery die down. But this is kind of hard to control.

    Thanks for the reply.
    Doesn't Apple recommend that you do exercise the battery by using its full capacity? They even recommend running it down from full until the computer saves the contents of memory to the special file, then leaving it 5 hours before charging fully again.
    I have never heard of the 20% threshold before.
    The odd behaviour in my case is that the computer sometimes does what is should: saves the memory then shuts down and when started restores that data, but at others does not save the data first, and starts up normally when I plug in the power and switch on.

  • Playbook doesn't power on and the battery is full....

    Hi,
    I have just bought a playbook couple days a go. My problem is : The battery is full.. I press the power off bottom and now i can't power on my playbook. The battery is full and there is not led power on ... Is dead....
    Someone can help me to resolve this problem?

    I think there are others who have helped people troubleshoot this sort of problem numerous times, so I hope they step in with better advice if mine is not quite right, but here goes:
    1. Don't assume the battery is definitely full. There's no way to know for certain with just what the PlayBook OS shows you, and obviously if it's OFF, you don't know for sure.
    2. Plug the thing into the charger, being careful to make sure the USB connector is not misaligned. It can be easy to plug the little thing in slightly crooked (or to jog it to one side without realizing), if you're not careful. If you have an after-market charger that plugs into the dedicated charging port, possibly use that instead.
    3. Leave it sitting for an hour.
    4. Now try to turn it on again. You're probably aware the little power button can be hard to press, but if you press it correctly you can at least feel it go down, or possibly hear a little click. Don't bother pressing it dozens of times in quick succession... it takes at least a few seconds to power on.
    5. If all goes well, you'll see the red LED come on for a second, then it will go off again. It's always at this point that I think it isn't working.
    6. If you did see the red LED, a few seconds later you should finally see the "BlackBerry PlayBook" logo show up onscreen and it will start to boot up.
    7. If you saw nothing, I think there may be some weird magic you can do involving plugging it into the PC *after* you've done that one-hour charge with it off, and use the Desktop Manager software to bring it back to life. I've never done that, never read in detail any of the posts about it, and may have misread when I skimmed, but I thought I'd seen people describing how to do that. Consider searching the forum carefully.
    I hope some of that helps... if not, have you tried contacting tech support?
    Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
    Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!

  • Have I cooked my phone or just the battery?

    I connected my Z10 to the supplied charger and within several minutes smelt something strange.  I disconnected the phone and found that the back casing had ever so slightly begun to melt.   I took the battery out and found small traces of liquid which I believe to have come from the battery.  I touched the tip of the charger, which nearly burnt my finger.   My question is this: is it possible that the only damage done is to the battery or is it more likely that the phone has been cooked? 

    i'd get it replaced.

  • Leave the Battery In or Out

    I suppose this applies to all laptops, but since I have my T400 connected to the power supply almost exclusively, should I leave the battery in or out?
    In other words, is the battery aging faster because it's in a constant state of charging (In) or would it last longer if I removed it while the computer connected to the power supply?
    Thanks.
    Solved!
    Go to Solution.

    leaving the battery in won't hurt it, if you don't use your battery that much keep the battery at around 40 to 60 %. So go into your thinkvantage power manager under battery maintenance. Set the minimal charge level to around say 20% and maximum charge level at 40 to 60%.
    Now unplug your AC power, then run the battery to around 60%, then replug back your AC power. This should maximise your battery life.
    Also, if you use the 65 watt adapter, the laptop would speed throttle (CPU speed will be capped) if you don't have the battery plugged in. 
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • It sees the battery but won't charge it: brand new battery

    I had an old (~4-yr-old) battery that had been holding up pretty well. Then one morning, it would no longer hold a charge at all -- if I unplugged the AC adapter, the laptop shut off immediately. The computer still "saw" the battery in the menubar, but was stuck on "Calculating..." and never got above 0%.
    I reset the PMU, no help. I ordered a new battery.
    The new battery just came, and it has about 10% charge on it as indicated in the menubar. It is stuck on "Calculating..." and the charge is not increasing.
    The computer knows the battery is there (no "X" through it) and can even run off it (if I unplug the adapter, computer stays on and shows red-line level in battery icon) but will not charge it.
    I've reset the PMU (several times), zapped the PRAM, and reset the nvram. The battery contacts look clean (no obvious dirt or corrosion).
    I don't see the Battery Info in "About this Mac..." (it's not listed at all; is this because I'm in OS 10.3.9 or is something else wrong here?) but using ioreg at the command line I get
    "IOBatteryInfo" = ({"Capacity"=4200,"Amperage"=0,"Current"=435,"Voltage"=15282,"Flags"=325,"Absol uteMaxCapacity"=4200})
    Any suggestions are greatly appreciated! Especially since for the last few weeks I've been stuck using my laptop essentially as a desktop computer, very frustrating. Thank you
    Powerbook G4 15" Titanium Mac OS X (10.3.9)
    Powerbook G4 15" Titanium   Mac OS X (10.3.9)  

    Hi, m.g.h. Have you ever tried a different, known-good AC adapter, just to eliminate the possibility that the problem resides there? If you plug the adapter in and the adapter ringlight glows green, turn the Powerbook over and press the button on the battery. The lights on the battery should glow green and stay on if the adapter is working correctly.
    I don't see the Battery Info in "About this Mac..." (it's not listed at all; is this because I'm in OS 10.3.9...?
    Yes, it is. That info doesn't appear in Panther's System Profiler, so you were right to check it in Terminal.
    Your battery is obviously connected to the Powerbook, given the Terminal readouts. That being the case, it would seem that the possible causes include a bad (though new) battery; a bad PMU; a bad DC-In board, if you have a DVI Tibook; and a bad AC adapter.

  • Re: [iPlanet-JATO] Re: Use Of models in utility classes - Pease don't forget about the regular expression potential

    Namburi,
    When you said you used the Reg Exp tool, did you use it only as
    preconfigured by the iMT migrate application wizard?
    Because the default configuration of the regular expression tool will only
    target the files in your ND project directories. If you wish to target
    classes outside of the normal directory scope, you have to either modify the
    "Source Directory" property OR create another instance of the regular
    expression tool. See the "Tool" menu in the iMT to create additional tool
    instances which can each be configured to target different sets of files
    using different sets of rules.
    Usually, I utilize 3 different sets of rules files on a given migration:
    spider2jato.xml
    these are the generic conversion rules (but includes the optimized rules for
    ViewBean and Model based code, i.e. these rules do not utilize the
    RequestManager since it is not needed for code running inside the ViewBean
    or Model classes)
    I run these rules against all files.
    See the file download section of this forum for periodic updates to these
    rules.
    nonProjectFileRules.xml
    these include rules that add the necessary
    RequestManager.getRequestContext(). etc prefixes to many of the common
    calls.
    I run these rules against user module and any other classes that do not are
    not ModuleServlet, ContainerView, or Model classes.
    appXRules.xml
    these rules include application specific changes that I discover while
    working on the project. A common thing here is changing import statements
    (since the migration tool moves ND project code into different jato
    packaging structure, you sometime need to adjust imports in non-project
    classes that previously imported ND project specific packages)
    So you see, you are not limited to one set of rules at all. Just be careful
    to keep track of your backups (the regexp tool provides several options in
    its Expert Properties related to back up strategies).
    ----- Original Message -----
    From: <vnamboori@y...>
    Sent: Wednesday, August 08, 2001 6:08 AM
    Subject: [iPlanet-JATO] Re: Use Of models in utility classes - Pease don't
    forget about the regular expression potential
    Thanks Matt, Mike, Todd
    This is a great input for our migration. Though we used the existing
    Regular Expression Mapping tool, we did not change this to meet our
    own needs as mentioned by Mike.
    We would certainly incorporate this to ease our migration.
    Namburi
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    All--
    Great response. By the way, the Regular Expression Tool uses thePerl5 RE
    syntax as implemented by Apache OROMatcher. If you're doing lotsof these
    sorts of migration changes manually, you should definitely buy theO'Reilly
    book "Mastering Regular Expressions" and generate some rules toautomate the
    conversion. Although they are definitely confusing at first,regular
    expressions are fairly easy to understand with some documentation,and are
    superbly effective at tackling this kind of migration task.
    Todd
    ----- Original Message -----
    From: "Mike Frisino" <Michael.Frisino@S...>
    Sent: Tuesday, August 07, 2001 5:20 PM
    Subject: Re: [iPlanet-JATO] Use Of models in utility classes -Pease don't
    forget about the regular expression potential
    Also, (and Matt's document may mention this)
    Please bear in mind that this statement is not totally correct:
    Since the migration tool does not do much of conversion for
    these
    utilities we have to do manually.Remember, the iMT is a SUITE of tools. There is the extractiontool, and
    the translation tool, and the regular expression tool, and severalother
    smaller tools (like the jar and compilation tools). It is correctto state
    that the extraction and translation tools only significantlyconvert the
    primary ND project objects (the pages, the data objects, and theproject
    classes). The extraction and translation tools do minimumtranslation of the
    User Module objects (i.e. they repackage the user module classes inthe new
    jato module packages). It is correct that for all other utilityclasses
    which are not formally part of the ND project, the extraction and
    translation tools do not perform any migration.
    However, the regular expression tool can "migrate" any arbitrary
    file
    (utility classes etc) to the degree that the regular expressionrules
    correlate to the code present in the arbitrary file. So first andforemost,
    if you have alot of spider code in your non-project classes youshould
    consider using the regular expression tool and if warranted adding
    additional rules to reduce the amount of manual adjustments thatneed to be
    made. I can stress this enough. We can even help you write theregular
    expression rules if you simply identify the code pattern you wish to
    convert. Just because there is not already a regular expressionrule to
    match your need does not mean it can't be written. We have notnearly
    exhausted the possibilities.
    For example if you say, we need to convert
    CSpider.getDataObject("X");
    To
    RequestManager.getRequestContext().getModelManager().getModel(XModel.class);
    Maybe we or somebody else in the list can help write that regularexpression if it has not already been written. For instance in thelast
    updated spider2jato.xml file there is already aCSpider.getCommonPage("X")
    rule:
    <!--getPage to getViewBean-->
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[getViewBean($1ViewBean.class]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    Following this example a getDataObject to getModel would look
    like this:
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[getModel($1Model.class]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    In fact, one migration developer already wrote that rule andsubmitted it
    for inclusion in the basic set. I will post another upgrade to thebasic
    regular expression rule set, look for a "file uploaded" posting.Also,
    please consider contributing any additional generic rules that youhave
    written for inclusion in the basic set.
    Please not, that in some cases (Utility classes in particular)
    the rule
    application may be more effective as TWO sequention rules ratherthan one
    monolithic rule. Again using the example above, it will convert
    CSpider.getDataObject("Foo");
    To
    getModel(FooModel.class);
    Now that is the most effective conversion for that code if that
    code is in
    a page or data object class file. But if that code is in a Utilityclass you
    really want:
    >
    RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
    So to go from
    getModel(FooModel.class);
    To
    RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
    You would apply a second rule AND you would ONLY run this rule
    against
    your utility classes so that you would not otherwise affect yourViewBean
    and Model classes which are completely fine with the simplegetModel call.
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[getModel\(]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[getModel\(]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[RequestManager.getRequestContext().getModelManager().getModel(]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    A similer rule can be applied to getSession and other CSpider APIcalls.
    For instance here is the rule for converting getSession calls toleverage
    the RequestManager.
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[getSession\(\)\.]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[getSession\(\)\.]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[RequestManager.getSession().]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    ----- Original Message -----
    From: "Matthew Stevens" <matthew.stevens@e...>
    Sent: Tuesday, August 07, 2001 12:56 PM
    Subject: RE: [iPlanet-JATO] Use Of models in utility classes
    Namburi,
    I will post a document to the group site this evening which has
    the
    details
    on various tactics of migrating these type of utilities.
    Essentially,
    you
    either need to convert these utilities to Models themselves or
    keep the
    utilities as is and simply use the
    RequestManager.getRequestContext.getModelManager().getModel()
    to statically access Models.
    For CSpSelect.executeImmediate() I have an example of customhelper
    method
    as a replacement whicch uses JDBC results instead of
    CSpDBResult.
    matt
    -----Original Message-----
    From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100208071048">vnamboori@y...</a>]
    Sent: Tuesday, August 07, 2001 3:24 PM
    Subject: [iPlanet-JATO] Use Of models in utility classes
    Hi All,
    In the present ND project we have lots of utility classes.
    These
    classes in diffrent directory. Not part of nd pages.
    In these classes we access the dataobjects and do themanipulations.
    So we access dataobjects directly like
    CSpider.getDataObject("do....");
    and then execute it.
    Since the migration tool does not do much of conversion forthese
    utilities we have to do manually.
    My question is Can we access the the models in the postmigration
    sameway or do we need requestContext?
    We have lots of utility classes which are DataObjectintensive. Can
    someone suggest a better way to migrate this kind of code.
    Thanks
    Namburi
    [email protected]
    [email protected]
    [Non-text portions of this message have been removed]
    [email protected]
    [email protected]

    Namburi,
    When you said you used the Reg Exp tool, did you use it only as
    preconfigured by the iMT migrate application wizard?
    Because the default configuration of the regular expression tool will only
    target the files in your ND project directories. If you wish to target
    classes outside of the normal directory scope, you have to either modify the
    "Source Directory" property OR create another instance of the regular
    expression tool. See the "Tool" menu in the iMT to create additional tool
    instances which can each be configured to target different sets of files
    using different sets of rules.
    Usually, I utilize 3 different sets of rules files on a given migration:
    spider2jato.xml
    these are the generic conversion rules (but includes the optimized rules for
    ViewBean and Model based code, i.e. these rules do not utilize the
    RequestManager since it is not needed for code running inside the ViewBean
    or Model classes)
    I run these rules against all files.
    See the file download section of this forum for periodic updates to these
    rules.
    nonProjectFileRules.xml
    these include rules that add the necessary
    RequestManager.getRequestContext(). etc prefixes to many of the common
    calls.
    I run these rules against user module and any other classes that do not are
    not ModuleServlet, ContainerView, or Model classes.
    appXRules.xml
    these rules include application specific changes that I discover while
    working on the project. A common thing here is changing import statements
    (since the migration tool moves ND project code into different jato
    packaging structure, you sometime need to adjust imports in non-project
    classes that previously imported ND project specific packages)
    So you see, you are not limited to one set of rules at all. Just be careful
    to keep track of your backups (the regexp tool provides several options in
    its Expert Properties related to back up strategies).
    ----- Original Message -----
    From: <vnamboori@y...>
    Sent: Wednesday, August 08, 2001 6:08 AM
    Subject: [iPlanet-JATO] Re: Use Of models in utility classes - Pease don't
    forget about the regular expression potential
    Thanks Matt, Mike, Todd
    This is a great input for our migration. Though we used the existing
    Regular Expression Mapping tool, we did not change this to meet our
    own needs as mentioned by Mike.
    We would certainly incorporate this to ease our migration.
    Namburi
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    All--
    Great response. By the way, the Regular Expression Tool uses thePerl5 RE
    syntax as implemented by Apache OROMatcher. If you're doing lotsof these
    sorts of migration changes manually, you should definitely buy theO'Reilly
    book "Mastering Regular Expressions" and generate some rules toautomate the
    conversion. Although they are definitely confusing at first,regular
    expressions are fairly easy to understand with some documentation,and are
    superbly effective at tackling this kind of migration task.
    Todd
    ----- Original Message -----
    From: "Mike Frisino" <Michael.Frisino@S...>
    Sent: Tuesday, August 07, 2001 5:20 PM
    Subject: Re: [iPlanet-JATO] Use Of models in utility classes -Pease don't
    forget about the regular expression potential
    Also, (and Matt's document may mention this)
    Please bear in mind that this statement is not totally correct:
    Since the migration tool does not do much of conversion for
    these
    utilities we have to do manually.Remember, the iMT is a SUITE of tools. There is the extractiontool, and
    the translation tool, and the regular expression tool, and severalother
    smaller tools (like the jar and compilation tools). It is correctto state
    that the extraction and translation tools only significantlyconvert the
    primary ND project objects (the pages, the data objects, and theproject
    classes). The extraction and translation tools do minimumtranslation of the
    User Module objects (i.e. they repackage the user module classes inthe new
    jato module packages). It is correct that for all other utilityclasses
    which are not formally part of the ND project, the extraction and
    translation tools do not perform any migration.
    However, the regular expression tool can "migrate" any arbitrary
    file
    (utility classes etc) to the degree that the regular expressionrules
    correlate to the code present in the arbitrary file. So first andforemost,
    if you have alot of spider code in your non-project classes youshould
    consider using the regular expression tool and if warranted adding
    additional rules to reduce the amount of manual adjustments thatneed to be
    made. I can stress this enough. We can even help you write theregular
    expression rules if you simply identify the code pattern you wish to
    convert. Just because there is not already a regular expressionrule to
    match your need does not mean it can't be written. We have notnearly
    exhausted the possibilities.
    For example if you say, we need to convert
    CSpider.getDataObject("X");
    To
    RequestManager.getRequestContext().getModelManager().getModel(XModel.class);
    Maybe we or somebody else in the list can help write that regularexpression if it has not already been written. For instance in thelast
    updated spider2jato.xml file there is already aCSpider.getCommonPage("X")
    rule:
    <!--getPage to getViewBean-->
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[getViewBean($1ViewBean.class]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    Following this example a getDataObject to getModel would look
    like this:
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[getModel($1Model.class]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    In fact, one migration developer already wrote that rule andsubmitted it
    for inclusion in the basic set. I will post another upgrade to thebasic
    regular expression rule set, look for a "file uploaded" posting.Also,
    please consider contributing any additional generic rules that youhave
    written for inclusion in the basic set.
    Please not, that in some cases (Utility classes in particular)
    the rule
    application may be more effective as TWO sequention rules ratherthan one
    monolithic rule. Again using the example above, it will convert
    CSpider.getDataObject("Foo");
    To
    getModel(FooModel.class);
    Now that is the most effective conversion for that code if that
    code is in
    a page or data object class file. But if that code is in a Utilityclass you
    really want:
    >
    RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
    So to go from
    getModel(FooModel.class);
    To
    RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
    You would apply a second rule AND you would ONLY run this rule
    against
    your utility classes so that you would not otherwise affect yourViewBean
    and Model classes which are completely fine with the simplegetModel call.
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[getModel\(]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[getModel\(]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[RequestManager.getRequestContext().getModelManager().getModel(]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    A similer rule can be applied to getSession and other CSpider APIcalls.
    For instance here is the rule for converting getSession calls toleverage
    the RequestManager.
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[getSession\(\)\.]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[getSession\(\)\.]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[RequestManager.getSession().]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    ----- Original Message -----
    From: "Matthew Stevens" <matthew.stevens@e...>
    Sent: Tuesday, August 07, 2001 12:56 PM
    Subject: RE: [iPlanet-JATO] Use Of models in utility classes
    Namburi,
    I will post a document to the group site this evening which has
    the
    details
    on various tactics of migrating these type of utilities.
    Essentially,
    you
    either need to convert these utilities to Models themselves or
    keep the
    utilities as is and simply use the
    RequestManager.getRequestContext.getModelManager().getModel()
    to statically access Models.
    For CSpSelect.executeImmediate() I have an example of customhelper
    method
    as a replacement whicch uses JDBC results instead of
    CSpDBResult.
    matt
    -----Original Message-----
    From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100208071048">vnamboori@y...</a>]
    Sent: Tuesday, August 07, 2001 3:24 PM
    Subject: [iPlanet-JATO] Use Of models in utility classes
    Hi All,
    In the present ND project we have lots of utility classes.
    These
    classes in diffrent directory. Not part of nd pages.
    In these classes we access the dataobjects and do themanipulations.
    So we access dataobjects directly like
    CSpider.getDataObject("do....");
    and then execute it.
    Since the migration tool does not do much of conversion forthese
    utilities we have to do manually.
    My question is Can we access the the models in the postmigration
    sameway or do we need requestContext?
    We have lots of utility classes which are DataObjectintensive. Can
    someone suggest a better way to migrate this kind of code.
    Thanks
    Namburi
    [email protected]
    [email protected]
    [Non-text portions of this message have been removed]
    [email protected]
    [email protected]

Maybe you are looking for