Aaargh!  BC4J issue: caches not clearing properly?

Okay, I've spent a day on this already - perhaps someone can help?
In a nutshell:
I've designed myself a View Object and put it in an application module.
I programmatically execute the VO and loop through it deleting each row with remove();
I re-executeQuery on the View Object, and when I loop through it using while next() not null I get one row returned, even though I'd just deleted them all?!
But the real cruncher is, when I step through the code in debug mode my results are different: then (seemingly as long as I've given the IDE a rest between the getTransaction().commit() and the re-execution of the view), I get the correct 0 rows returned. (If instead I keep hitting f8 sufficiently quickly that the IDE can't keep up, I get 1 row returned.)
My hunch is that garbage collection is doing something in the gap, but I can't think what would that would be....
HELP!!!!! (Please.)
More info:
Imagine a Role table and an Operation table and the Role_Operation table effecting a many-to-many join between them. The view is drawn with the Role_Operation table as its "primary" entity, then it read-only-reference links to the Role and Operation entities to get the relevant descriptions. It's not an expert view. (Some of mine are because I'm using MySQL. What can I say? It was forced upon me!)
Things are a little less straightforward than the above (because I'm still using my real-world code) - between the delete and the re-query I use another simple view based on the role entity to update its description... I guess my next step will be to try it with this out.
When the problem originally surfaced after the commit I was checking the appmodule back into the pool (stateless) and checking it (the pool was giving me the same one) out again before requerying, so the problem seemed to survive that. I also tried setting the transaction's clearCacheOnCommit(true) and that didn't help.
I'm using JDeveloper 9.0.3 production release. I tried BC4J diagnostics and can't see any difference there. I've got MySQL logging queries and they seem to be the same (and give the correct results) in both cases (as you'd expect). I've run the code under Tomcat on both Oracle and Sun JVMs and get the erroneous row in both cases.
Any ideas????
Thanks, Mike.

Steve,
I've read your whitepaper several times. Each time a little more sinks in...
Passivation is unfortunately one for the future - I've been told to use MySQL and I'm doing everything statelessly...
IIRC, the whitepaper is in favour of passing the view objects directly to the JSP(view) layer, rather than (deep breath) using the view objects to access data to populate into collections of JavaBeans to pass to the view.
Based on the keep-it-simple principle I agree with you: it's a lot more straightforward to use a view object and as long as my application has a decent <i>logical</i> separation between the MVC layers I'm reasonably happy to forget a <i>physical</i> one. (It makes it a lot easier to explain to people coming from a non-J2EE direction; also, I think it'd be quite difficult to respond to an "Okay, so for every view-row we have you want me to define a Bean and before we forward to the JSP we pack everything into Beans and then in the JSP we unpack everything out of the Beans, and I'm doing this because it makes things easier?")
[Note that I don't consider that the ViewObject provides a hard physical separation because in the general case a JSP (view)layer could still add/update/delete rows and therefore affect the database/model.]
Beans seem to provide one real advantage above the fact that they provide type-safety at compile time (which BC4J does if you java-generate the row-class - which I have): once I've defined a bean I can populate it from anywhere I want.
I was trying to extend this "populate from anywhere" to ViewObjects. After all, once I've decided to use ViewObjects why do I want to use JavaBeans <i>at all</i> to pass anything to the JSP?
The particular scenario I was thinking of was where I've written a JSP to produce an HTML form containing all the current data about an entity, where the information is supplied to it in a view-row. The user then changes some of the values and asks to save..... but wait, there's an error in one of the fields! So what my application should do is redisplay the form (on which there's a message detailing the problem) along with all the "new" data that the user submitted. To have it do that, the simplest way is if I pass it the data in exactly the same way as I did to start - in a ViewObject. It seems to me that'll have to be the same ViewObject or I lose my type-safety, so I can't downgrade to AttributeList, and even if I could that'd mean almost identically duplicating many of the Views in my application.
And dammit... I've just seen that BC4J already allows this when you have statefulness. You can part populate the "database-linked" view-row and pass it back to the JSP. Dammit. But it doesn't help poor old stateless me: if I want that functionality I'll have to have the JSP expect either a VO <b>or</b> a bean-collection, or I'll have to extract everything into beans.
Two other things, not related to the above.
The first is that, despite having tried to take in as much documentation as I could, I didn't initially understand that when you use application modules to findViewObject you always get back the same VO and that if you change the Where clause then it affects all rowsets based on that VO. (In fact I'm not even exactly certain that what I just said is true - I just know I have to be careful!) This actually seems like slightly strange behaviour to me (and should be made clearer)! The reason being, in the same way as you said (elsewhere) that you'd taken to defining a method on the specific-view's Impl class to encapsulate the setting of the where-clause-parameters, I thought it made sense to have a number of methods encapsulating the setting of the parameters AND the where-clause itself. (And the order-by too!) In that way I have one view object, in general designed without a where clause, that allows me to execute it as VO.executeQuery() or VO.executeQueryForID(...) or VO.executeQueryOrderByDeptDesc().
Having read something that led me to the understanding above, I've taken to using findViewObject (or the container's getter when inside the AppModuleImpl, since this gives type-safety), getting its DefFullName via it's ViewDef object, and then using createViewObject to get my own copy (giving it a name that includes the name of the method that instantiated it, so I don't have to look for clashes beyond that method). I trust you approve?
Oh, and the second one is that I still don't exactly understand what the parameter means in SessionCookie's useApplicationModule(true/false), despite having read the javadoc. My best guess is that whichever I use the application module instance is dedicated for the use of only that session-cookie instance (until it's checked back in), but that if I use "true" to obtain a lock then the pool is going to block the same session-cookie from checking out that same(?) application module (probably from a different thread) until it's been checked back in?
Does that sound correct? (In my web-app I'm currently checking out my appmodules (in servlets) with a "true" argument.)
Phew! Sorry about all that feedback. I'm feeling bad that I'm slowing the book up...
Regards,
Mike.

Similar Messages

  • Cache not cleared when branching to a page with before-header branch?

    I tried to make up and example in apex.oracle com.
    http://apex.oracle.com/pls/apex/f?p=20469:112
    Assign some value to items and experiment the with the buttons.
    The first button:
    Action: Redirect to Page in this application
    Page: 112
    Clear Cache: APP
    Set These Items: P112_TEST_ITEM_1
    With these values: 1
    The second button is identical to the first except that the page it branches to is 113 instead of 112.
    Page 113 has nothing more on it than a Before Header branch branching back to page 112.
    Its seems a bit inconsistent that assigning values to the items survives with the before_header branch - but clearing them does not.
    Andres

    Welcome to my thread Varad!
    As I wrote in my previous reply, the button branching to page two is part of the report and totally independent from the buttons that call the Ajax script.
    The forwarding to page two takes place after item P1_SORT has been set!
    I have no more ideas what is causing this problem. The item that is supposed to be bound on page two is of type text without session saving property. It doesn't have a standard value and neither an item source that could potentially cause the problem!
    Regards,
    Sebastian
    PS: Do you know if it's recommendable and possible to store the value of the Ajax code in an application item!?
    Edited by: skahlert on 20.09.2009 18:19

  • Embedded font issues -- Flex not measuring properly

    I started this out in one thread ( http://forums.adobe.com/thread/470702 ) and it has progressed into a new, bigger issue. I embedded fonts using the code below.  Flex is not measuring them properly or the font I'm using is vertically challenged.  I suspect the font I am embedding has different vertical spacing than the default font.  I have determined the fonts are embedding by rotating the containers.
    Here's an example of what I'm getting:
    The right side radio button is the raw display (height works out to 23), the left side radio button I forced the height to 15.  Both the radio buttons are set to exactly the same y coordinate.  You can see the right hand text is not centered on the radio button.  I don't want to go thru the hassle of adjusting every single component height to make the font look centered plus that's an ugly workaround.
    I don't think there is anything wrong with my code nor do I think a font swf will help.  I sure would like to know what's going on but it is beyond my understanding.  Here's my thought.  I like the default font the compiler uses when I DON"T embed fonts, looks like this:
    I figure if I could embed this font, everything would work properly.  I just don't where this font lives.  The docs indicate the default font is _serif but it looks more like _sans to me.  And I don't know the hierarchy for my platform.
    So...  Does anyone know either how to fix this measurement issue or where I can find THE True Type font or swf or something that Flex uses as a default so I could embed it?
    /* CSS file */
    @font-face {
    font-family: MainFont;
    src: url("assets/fonts/verdana.TTF");
    unicode-range: U+0020-U+007E;
    advancedAntiAliasing: true;
    @font-face {
    font-family: MainFont;
    src: url("assets/fonts/verdanab.TTF");
    unicode-range: U+0020-U+007E;
    advancedAntiAliasing: true;
    fontWeight: bold;
    @font-face {
    font-family: MainFont;
    src: url("assets/fonts/verdanai.TTF");
    unicode-range: U+0020-U+007E;
    advancedAntiAliasing: true;
    fontStyle: italic;
    @font-face {
    font-family: MainFont;
    src: url("assets/fonts/verdanaz.TTF");
    unicode-range: U+0020-U+007E;
    advancedAntiAliasing: true;
    fontWeight: bold;
    fontStyle: italic;
    global {
    font-family: MainFont;

    First off, yes there was a correction to the left hand radio button.  I forced the height of the button to be different and that seemed to help center things
    After a bit of beating my head against the way, I decided to run a simpler test.  I set up a case where I had default fonts side by side with embedded fonts.  Since my default.css file had Verdana I decided to use a Verdana embedded font.  I figured I could compare them directly and maybe play with advanced anti-aliasing at the same time.  I've attached the files (change the txt extension to mxml)
    The result was a somewhat of a surprise.  I didn't realize that all text really wasn't centered on the component (eg radio button, checkbox) at my default size and below.  I do see the small pixel shift, especially in the Button.
    So...  I have found the "real" font declaration in the defaults.css file, am seeing the small pixel shift with embedded fonts, that using advanced anti-aliasing  can help on smaller text, and realized I have to be very careful where I use font sizes smaller than default.  I'm guessing that the "perfect" default size on my system would be 12 since that appears what my Verdana.ttf font is based on.  My defaults.css file has the font size set at 10.  The inability to measure properly is exacerbated when the fonts are embedded.
    Now the real question -- anyone have a clever fix?

  • Report Cache not clearing

    Created a report that executes 3 stored procedures:
    first one deletes data from a tablex
    second one adds data to tablex based on a query
    third one adds data to tablex based on different query
    report is run based on a date range.
    date range1 returns proper results
    date range2 returns proper results
    date range1 returns double results?  cache flag is set to clear.  according to rules, if parameterized, report should not use cache.
    Help?

    there is one dataset -> tablea
    parameter date range - 06/30/2014 - 07/24/2014, returns 24516 records   first time program is executed
    parameter date range - 05/23/2014 - 06/29/2014, returns 29823 records   second time program is executed
    parameter date range - 06/30/2014 - 07/24/2014, returns 49032 records   third time program is executed    --> expected 24516
    report is defined with sql statements as follows:
    stored procedure execute a delete data from tablea
    stored procedure execute sqla insert to tablea
    stored procedure execute sqlb insert to tablea
    produce report layout
    I view the data in tablea in sql to know my record counts.

  • GR/IR Acccount not Clearing properly.

    HI,
    I have 2 GR's for a Purchase order, and the user has done IR and due to some reason he reversed the IR and did the IR again with less invoice value.
    Now the system did not the clear the GR for which the reversal of IR is done instead ir cleared the 2nd GR.
    Note: Both the GR's are of same quantity and Amount.
    clearing GR/IR using automatic clearing functinality the below criteria is working on 1.ZUONR    Assignment 2) GSBER            Business Area, 3) VBUND     Trading partner which is part of global Design.
    PLease Help me
    Thanks
    Ramakrishna

    Check if XREF1 field is same for both the documents.
    In F.13, have you selected "Process for GRIR" - i.e. some special handling of GRIR.
    I guess, at MIGO/ML81n and MIRO, it assigns XREF1 field with document nr. and use it to automatically clear.
    BR

  • LOV Cache not working properly

    Hello Community,
    We are currently with BO Edge 3.1 SP 2 latest FP.
    I am expierencing that the LOV Cache is not working as expected::
    1. I am using InfoView in Edit-Mode or Webi Rich Client. If I execute the report, the prompt for the QueryFilter is taking ages to load. This is caused by the fact the each and every Dimension is loaded from BW - no Cache used.
    2. I am using InfoView in View-Mode and the prompt for the QueryFilter is taking like 5 Seconds. No connection to BW for every dimension - only on demand by pressing the refresh button of the filter dimension.
    When we were on 3.1 SP1 the system was working as expected (2.) regardless the mode of the tool we were using.
    Anyone got an idea how to avoid the loading of the data from BW  or to activate the cache in design mode ?
    Regards,
    Andreas

    The delegate search option on the list of values properties presents the user with an empty list of values at query run time. The user enters search criteria to limit the number of values returned in the list of values.
    To activate the delegated search option for a list of values, edit the list of values properties on the object properties page of the object to which the list of values applies.
    Note: The delegated search is not supported for cascading lists of values.
    This is what you are looking for??
    Thank You!!

  • JTextArea not clearing properly

    Hi all,
    What is the proper way to clear a JTextArea of all text?
    Right now, I am doing
        String sendText = currentMessage.getText();But for some reason, a carriage return remains in the JTextArea. I have tried moving the carriage return, etc, but nothing is working. Is this a bug in Java?
    I am using JDK 1.4.2_06
    Max

    Found the solution! The code for processing the key event should go to keyReleased() method instead of keyPressed() methodThe default Action for the Enter key is to insert a new line character into the text area.
    If you don't want this Action to occur, then you should replaced the default with your own Action. This is the recommended approach instead of using a KeyListener. For more information see the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html]How to Use Key Bindings.

  • Screensaver does not clear properly after sleep mode

    henever I start my iMac up from sleep mode the screensaver doesn't clear so that I can enter my password. Instead, wherever my mouse is hovering the screensaver is erased in a sort of block by block mode? Then when I hit enter after typing in my password it goes onto the desktop and everything is fine. Anyone know why??

    Where is the screen saver picture saved? If it's on an external HD that could be the  problem, move it to the internal drive in that case. This is explained in http://reviews.cnet.com/8301-13727_7-57354082-263/q-a-macfixit-answers/?tag=mnco l;txt

  • Just updated my MacBook Pro to 10.6.8 and now my Filemaker 11 databases (.fp7) do not view properly on my desktop.  Is this a java issue?

    Hi,
    Wondering if anyone knows what's going on with my Filemaker Database that will not view properly on my desktop after upgrading from 10.5 to 10.6.8 on
    my MacBook Pro.   Is this a Java issue?  The data is all there but all I see is blank boxes when I open or click on a specific area in the database.
    My Java version is SE 6 1.6.0.37-bo6-434.

    Let me understand:
    - you have purchased named canon, which is conencted to your PC running windows xp
    - downloaded driver for win xp, and canon works fine
    - canon is connected to that PC via USB
    - that Canon is also activated as network printer, by allowing print sharing in windows; how did you set that option?
    - now, you are in Mac OS x 10.6.8, downloaded Canon driver for Mac OS X, installed it, detected printer on the network, printer was installed; was it detected as attached to that PC running win XP? or not?
    or you set canon by being connected to your mac directly via USB?
    Now, there are some questions you should answer as some details are missing, and your initial text is not clear. Can you print if Canon is connected directly to your mac? did you try that? if not, do it before answering.

  • Apex not clearing cache

    Using Apex 4.1.1 on Oracle XE 11G (Linux)
    I have a form and a report in and when you click on create button it will clear the cache in page 6 so you can create a new entry.
    If click on the link on table which will set the value of P6_TID (type hidden) with a value, the typical Form & Report setup except I created it manually and was working fine for over a month since creation.
    Now when I click on the CREATE button its no longer clearing cache in page 6. Instead it retrieves the latest values I had earlier (P6_TID holding the latest value).
    However just earlier I was having another issue where I had to drop the parsing schema and got ORA-01940 - cannot drop a user that currently logged in, so I had to do a:
    SQL> shutdown immediate;and as soon as Oracle stopped I started it up and created my user, granted necessary permissions and imported the old DMP file.
    I've gone through this step many times but only now I am getting the ORA-01940 error. So have no idea if its anything to do with the issue of clearing cache I am having. Both issue coincided same time.
    Has anyone had any such problem where they are unable to clear cache for a page or session? I got absolutely know idea what I have to do get it back working.
    Cheers.

    Why would you shut down your database to kick a user. Just do
      select * from v$sessionYou can find your schema that you want to drop with a where clause on the user column.
    Now note the sid and the serial column and do
      alter system kill session '#SID#, #SERIAL#';Replace #SID# and #SERIAL# with the values of your session you want to kill.
    This will stop the ORA-01940 error.
    Now for the APEX matter. The APEX session is completely different from the Database session.
    If you submit values to the server then APEX keeps those values in session.
    If you clear the cache of a page it really means that you clear the values of that page in the session.
    Look in your session if those page items are cleared.
    If they are not cleared there then watch out for a unwanted rowfetch of page processes. If you clear the page cache on create you most not give away any variables to that page hee! (espacially not a primary key)
    Regards

  • Tap to click not working properly in Mountain Lion. How do I get apple to fix this major issue with mountain lion?

    The tap to click does not work with mountain lion as it did before the mountain lion install. I purchased a brand new imac in August of 2011 and got a wireless keyboard and selected the wireless trackpad instead of a mouse.  The trackpad worked wonderful pre upgrade with tap to click. Now after the install of the newest beast, I have to actually press the trackpad rather than a slight tap. I have carpel tunnel and this is causing great stress upon my hand. How do I get apple to fix this major issue with mountain lion?

    Perhaps, I was not clear enough.
    I have an imac purchased in Aug. 2011 which came with Lion 10.6 (two uprades before mountain lion)
    Recently, I just purchased a macbook pro retina with Mountain Lion
    On my imac, my settings allowed me to "tap to click" everything EXCEPT the initial log in at the star up of my imac, again running Lion 10.6
    On my macbook pro retina which has Mountain Lion, I set up the "tap to click" option, but notice that a "hard" click was neccessary when trying to click things. I thought this was a macbook thing (my first one) so I went and upgraded my imac to Mountain LIon, BIG MISTAKE! Now both my imac AND my macbook only have limited "tap to click" options. Before mountain lion I could "tap" to highlight and select text, tap and drag, and many other thiings that Mountain Lion has disabled.
    I am truly surprised that no one has noticed this MAJOR issue.
    Is there a way to uninstall this update, similar to how on a PC you can go back to a restore point.
    On another note even the way PREVIEW has changed is less user friendly, there used to be icons on the bottom right corner of the screen, now I have to double tap and select the option I would like to switch between contacts and thumbnails. This is really annoying and is causing me time when reviewing files.
    Just in case anyone was wondering, I did go to system preferences -> trackpad -> select tap to click
    In fact almost all of the trackpad functions have been selected.

  • CUBE IS NOT CLEARING THE DATA ON CONDITIONAL SCRIPT(ISSUE WITH NULLIFICATIO

    Hi,
    I am using AWM 10.2.0.2.0A and database is 10g Release 2 to build a cube.
    Before the monthly incremental load I need to clear the old data.
    For clearing(Nullifying) the cube I am using the new "Clear" command.
    The Clear command has two options.
    A) clear all the data without using any limits and
    B) clear the current status. The option A is working perfectly fine. The issue
    is when we need to clear only two months of data from the cube and I am using
    Clear STATUS (option B )option.
    After the execution data is not cleared (cube
    is still showing the old data)
    Please find below the program...............
    (The cube is compressed and partitioned by year)
    shw tod
    aw attach olap_cview rw
    limit ORA_PAX_AGT_PRT_MEASDIM to all
    limit ORIGIN to all
    limit DESTINATION to all
    limit FAREBASIS to all
    limit POS to all
    limit DIS_NON to all
    limit int_onl to all
    limit airline to all
    "lmt time to v_time
    lmt time to '01/01/2005'
    rpr time
    "clear all from ORA_PAX_AGT_PRT_TOPVAR *** all data is deleted inspite of the
    above limit
    clear status from ORA_PAX_AGT_PRT_TOPVAR *** Nothing deletes
    upd
    cmm
    dfn junk vrb integer
    junk=1
    upd
    cmm
    junk=2
    upd
    cmm
    dlt junk
    upd
    cmm
    shw tod
    Any one can help me what I have to do to clear the cube.....................

    Hi Thanks for the input,
    I have question.
    I saw your program and my program whatever I submit in the discussion earlier.
    I also using JUNK=1 keyword in my program . The only difference in your program and my program is
    I am declare and assign JUNK=1 after the upd and commit ,In your program its immediately you are decalring and assing JUNK=1 after the clear status and two times JUNK=1 is assigned.
    Please clarify me is this will make any difference to giving the JUNK=1 immediately after clear status and after clear status,up,command....??
    In your program
    ================
    clear status from ORA_PAX_AGT_PRT_TOPVAR *** Nothing deletes
    dfn junk vrb integer *** need these lines (only second one if junk exists)
    junk = 1 *** to work around clear/update bug.
    upd
    cmm
    junk=1
    upd
    cmmjunk=2
    upd
    cmm
    dlt junk
    upd
    cmm
    shw tod
    In My program
    ================
    clear status from ORA_PAX_AGT_PRT_TOPVAR *** Nothing deletes
    upd
    cmm
    dfn junk vrb integer
    junk=1
    upd
    cmmjunk=2
    upd
    cmm
    dlt junk
    upd
    cmm
    shw tod
    This is my query...This update will helpfull for me to before proceeding my test...
    Thanks ,
    Nat

  • While attempting to install the latest iTunes update, version 10.5.3, I encountered an issue. I was forced to download this update manually which, after restarting my Windows 7, did not install properly. How do I get it to install this update?

    While attempting to install the latest iTunes update, version 10.5.3, I encountered an issue. I was forced to download this update manually which, after restarting my Windows 7, did not install properly. How do I get it to install this update?

    The installer should have gone into your Apple Software Update folder:
    C:\USERS\<user name>\AppData\Local\Apple\Apple Software Update
    Right mouse click the msi file and select INSTALL

  • Just upgraded to OSX mavericks on macbook pro mid 2011 version. Having a big issue here that whenever my mac comes back from sleep, i.e after I open the lid, the screen flickers and there is an error of Finder not opening properly. Any fix to this?

    Just upgraded to OSX 10.9 mavericks on macbook pro mid 2011 version. Having a big issue here that whenever my mac comes back from sleep, i.e after I open the lid, the screen flickers and there is an error of Finder not opening properly. Any fix to this?

    My daughter has had her Razr for about 9 months now.  About two weeks ago she picked up her phone in the morning on her way to school when she noticed two cracks, both starting at the camera lens. One goes completely to the bottom and the other goes sharply to the side. She has never dropped it and me and my husband went over it with a fine tooth comb. We looked under a magnifying glass and could no find any reason for the glass to crack. Not one ding, scratch or bang. Our daughter really takes good care of her stuff, but we still wanted to make sure before we sent it in for repairs. Well we did and we got a reply from Motorola with a picture of the cracks saying this was customer abuse and that it is not covered under warranty. Even though they did not find any physical damage to back it up. Well I e-mailed them back and told them I did a little research and found pages of people having the same problems. Well I did not hear from them until I received a notice from Fed Ex that they were sending the phone back. NOT FIXED!!! I went to look up why and guess what there is no case open any more for the phone. It has been wiped clean. I put in the RMA # it comes back not found, I put in the ID #, the SN# and all comes back not found. Yet a day earlier all the info was there. I know there is a lot more people like me and all of you, but they just don't want to be bothered so they pay to have it fix, just to have it do it again. Unless they have found the problem and only fixing it on a customer pay only set up. I am furious and will not be recommending this phone to anyone. And to think I was considering this phone for my next up grade! NOT!!!!

  • KM Cache in Cache Monitor is not cleared using KM API

    Hi All,
    I am trying to clear the KM cache that is pre-configured in Cache Monitor using KM API. Below is the code I am using to clear the cache. It is not clearing the cache but creating the new cache with the name "KM_Cache1 (1)" and default properties set to peak load as 100%. But my requirement is to access the pre-configured cache and clear it then refresh it.
    import com.sapportals.wcm.WcmException;
    import com.sapportals.wcm.service.cache.CacheServiceFactory;
    import com.sapportals.wcm.util.cache.CacheException;
    import com.sapportals.wcm.util.cache.ICache;
    import com.sapportals.wcm.util.cache.CacheFactory;
    try{
              Cache cache1 = CacheServiceFactory.getInstance().getCache("KM_Cache1");
              cache1.clearCache();
              cache1.refresh();
    Thanks in advance to help me on how to clear the cache in cache Monitor.

    Hi,
    The code is as follows:
    IIndexService indexService = null;
    try {
       indexService = (IIndexService) ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
    } catch (ResourceException e) {
       if (indexService == null) {
         log.errorT("Error on instanciating the index service");
         return this.renderMessage(this.getBundleString(RES_NO_INDEX_SERVICE), StatusType.ERROR);
    // get index
    IIndex index = null;
    try {
       index = indexService.getIndex("YourIndexID");
    } catch (WcmException e1) {
       log.errorT("Error when trying to get the index");
       return this.renderMessage(this.getBundleString(RES_NO_INDEX), StatusType.ERROR);
    // check if the index is a instance of AbstractClassificationIndex
    AbstractClassificationIndex classiIndex = null;
    if (index instanceof AbstractClassificationIndex) {
       classiIndex = (AbstractClassificationIndex) index;
    } else {
       log.errorT("The index " + index.getIndexName() + " is no classification index");
       return this.renderMessage(this.getBundleString(RES_NO_CLASSIFICATION_INDEX), StatusType.WARNING);
    //give your KM Resource here for which you want to know if it is classified or not
    boolean classified = classiIndex.isDocClassifiedInAnyTax(resource);
    Regards,
    Praveen Gudapati

Maybe you are looking for

  • Keyboard behaving strangely

    I cannot figure out which shortcut changed my keyboard configuration and how to go back.  See if somebody out there can help. Two examples. 1. When I hit enter, Exposé pops up.  I need to hit ctrl-enter to change a line. 2. When I hit delete (backspa

  • BAM Alerts - When a data field in a report meets specified conditions

    Hi ,     Please find the below mentioned issue , which I am facing at the time of creating BAM alerts.   I have created a data object, when i am creating the bam alert  [ create new alert --> create rule --> when i select an even " When a data field

  • Fonts Missing in Aperture 3.3

    I got Aperture 3.3 and started using Faces, but the font in faces is small and not what it looks like on the website picture. Help

  • Can't start 11g r2 XE listener

    I install this in Windows 7 machine (SP 1). I can't start the listener. I get this error "oracleXETNSListener service on local computer started and then stopped.". Also, in the directory C:\oracle_xe_11g_r2\app\oracle\oradata\XE has no data files and

  • Web behavior plays in swf but not in html

    Please explain why when I create a button and assign to it web behavior it plays in swf file (when I press Ctrl-Enter) and it does not play in HTML (when pressing F12 - it opens html page but does not go to URL while clicking on the button)