Remove Portlet's Cache

Hi!
I would like to know how can i remove dynamically the portlet's cache. I’m implementing a portal and I would like to cache some portlet’s content. I know I can use the render cacheable property that will maintain the portlet’s content at session scope. The problem of using this solution is that I will have to remove the portlet’s cache when, for instance, the user change the language in which the content is displayed.
As anyone has an idea how can resolve this issue?
Thanks in advance!
Best regards,
Fmsoares

1- Is there any way out to call a servlet from
processAction() method of a portlet class.
you are thinking like request dispatch? i think the idea is that processAction() does not generate content, doing an RD doesn't make any sense. what does it mean for that servlet to write to the stream?
of course, you are free to use tools like HttpClient to make http connections from processAction(), but i am guessing that is not what you are looking for.
i ve a class A (which is using JDOM api's to create
XML
now if i am trying to instantiate this class from
portlet class..i am not able to do so....i am getting
exception that the portlet container cannot
instantiate this class...
but its working fine when i am calling this class
from a SERVLET.the portlet implementation in portal needs to include jdom in every portlet web application. jdom.jar gets injected when the portlet web app is deployed. if you're using PS 6.x, that's through pdeploy. you can look in the web app's deployed directly and see that jar.
so how are you getting jdom into your portlet app? adding it manually? if so, you may be ending up with two jdom jars of potentially different versions ... or at least not the version you expect.
>
any idea.........
--lokesh
htttp://lokeshpant.blogspot.com

Similar Messages

  • Slicers Removed from Template: "Removed Records: Slicer Cache from /xl/slicerCaches/slicerCache3.xml part (Slicer Cache)"

    Product: Microsoft Office Professional Plus 2010
    I have created a template file with a data table, 2 pivot tables, and each of those 2 pivot tables has a pivotchart and 2 slicers.  I have some code that updates the pivot table ranges.  When that occurs the pivot tables, pivotcharts and slicers
    all update successfully.  
    The problem comes after saving the .xlsm file.  Upon opening the file I receive a message saying "Excel found unreadable content in 'myTemplate.xlsm'. Do you want to recover the contents of this workbook? If you trus the source of this workbook,
    click Yes."
    I then get a list or removed records and the repair that was done.
    Removed Records: Slicer Cache from /xl/slicerCaches/slicerCache3.xml part (Slicer Cache)
    Removed Records: Slicer Cache from /xl/slicerCaches/slicerCache4.xml part (Slicer Cache)
    Removed Records: Slicers from /xl/slicers/slicer2.xml part (Slicer)
    Removed Records: Drawing from /xl/drawings/drawing4.xml part (Drawing shape)
    Repaired Records: Named range from /xl/workbook.xml part (Workbook)
    Most of the file is OK with the exception of my last worksheet.  The pivot table and chart get updated, but the slicers are gone.  Any idea why this is happening?  Can something be done to prevent this?
    Thanks,
    Rich

    Hi Rich,
    Based on your description, my understanding is that slicers are removed after you get the error messages and repair it. You wonder to know why slicers are lost after repairing, it seems that the corrupted file caused the issue.
    Please try to update the  pivot table ranges manually without macros. According to my test, the slicers won’t be lost without macros. Please test this method in your own environment. If it
    works fine after disable macros, please check your code.
    If my understanding is incorrect, could you upload a sample via OneDrive and be at bit more precise explain your problem, so that we can get more accurate solutions to this problem. I am glad to help and forward to your reply.
    Hope it’s helpful.
    Regards,

  • Error removing object from cache with write behind

    We have a cache with a DB for a backing store. The cache has a write-behind delay of about 10 seconds.
    We see an error when we:
    - Write new object to the cache
    - Remove object from cache before it gets written to cachestore (because we're still within the 10 secs and the object has not made it to the db yet).
    At first i was thinking "coherence should know if the object is in the db or not, and do the right thing", but i guess that's not the case?

    Hi Ron,
    The configuration for <local-scheme> allows you to add a cache store but you cannot use write-behind, only write-through.
    Presumably you do not want the data to be shared by the different WLS nodes, i.e. if one node puts data in the cache and that is eventually written to a RAC node, that data cannot be seen in the cache by other WLS nodes. Or do you want all the WLS nodes to share the data but just write it to different RAC nodes?
    If you use a local-scheme then the data will only be local to that WLS node and not shared.
    I can think of a possible way to do what you want but it depends on the answer to the above question.
    JK

  • Why remove portlet hides it instead of delete?

    Hello,
    I have a question about removing portlet by clicking on the "X". After I removed portlet, and then went to "customize page", I saw the removed portlet is grayed out which tells me it didn't remove and only hidden.
    I don't think it was happening before. Seems to be recent behavior. Can anyone tell me what is going on?
    Thanks,
    -Dong Chen

    Your name is displayed to you and only you unless you change your privacy settings for the community.  I see "indoorairpro" and you will too if your sign out of the community and view this discussion or your profile.  You can also see how your profile is viewed by other in the preview feature when you edit your profile for the community.

  • Create customised page for adding removing portlets

    Hi All,
    I want to make a customised page which has checkboxes preceeding the portlet name which the user can use for adding/removing portlets . This requirement is similar to the add/remove portlet page provided on my.oracle.com when we go for customization of our page. I would like to know how to go about it and if any reference code exists for the same.
    thanks

    The problem - IF we were the only company using the product - AND this were only an internal portal. That might be acceptable.
    The problem with that is that we are using portal in a way that was not considered by the developers.
    We are using portal to customize (not per department) - but per CLIENT or CUSTOMER. That means - when we implement a site for one of OUR customers. We are not going to be customizing in house per customer. We will be allowing the CUSTOMER to customize their own site (AND their portlets).
    Now - a customer from "ABC Company" does NOT want to customize something and see a whole bunch of generic stuff. They want to see THEIR stuff in "ABC Company" format with their logo etc. Any other way is unacceptable.
    This use case needs to be revisited by the Oracle development team to address this issue if the only option is that we can't customize the page. (I assume that by hunting through the JDK, and looking through code - I might have a chance... but I was hoping for an easier solution).
    -RP

  • Can't remove portlet border.

    Hi Gurus,
    i'm facing some unexpected behavior with a portlet:
    The portlet appears in the page with a gray border.
    BUT the "show portlet border" checkbox isn't checked in area edit page.
    So, what is happening?
    And how can i remove the border.
    I've already try some stupid things as:
    1)check "show portlet border"
    2)apply changes
    3)Ok
    4)edit area
    5)uncheck "show portlet border"
    6)apply changes
    7)Ok
    but nothing
    Thanks,
    Felippe.

    The portlet calls a jsp page.
    It has been created like all the other, via XML.
    It displays the jsp content correctly but the border around the portlet.
    When i toggle the checkbox "Show portlet border" it makes no difference at all but the "Show portlet header" does.
    Any ideas??
    I'm trying to seek some erros in jsp code.
    thanks,
    Felippe.

  • How to make an opion to add and remove portlets dynamically from GUI?

    Hi,
    I have a requirment to provide option for the users to remove some section (basically portlets) from the page and add it later based on preferences .I think currenlty we have this option in iGoogle website. please give me some pointers towards the solution.?
    Thanks Jazz

    Hello Jazz,
    If the "preferences" you are referring to are the users' preferences (and not "portlet preferences"), I think the Dynamic Visitor Tools are what you want. There is a demonstration of the dynamic visitor tools at:
    http://wlp.oracle.com/dvt/appmanager/demo/dvt
    Kevin

  • Portlets cannot cache longer than 15 minutes

    We cannot cache portlets longer than 15 minutes regardless of programmatic or administrative settings. We're running G6 on Windows.
    Wondering if anybody else is also experiencing this?

    Hey,
    If you press 'A' the 'set audio record path' window should come up, in that window you should be able to change the maximum record time from 15 minutes to whatever you want
    Hope this helps
    Regards

  • Remove cs3 bridge cache after installing cs5

    I removed cs3 including bridge and installed cs5 and find that the cs3 bridge cache and associated files are still in my hard drive occupying 6.5GB of space.  Can I remove this and how?

    CS3 and CS5 uses different cache data bases, so you can delete them using the CS3 purge cache in preferences.  If you have uninstalled CS2 just delete the files.

  • Pacman: could not remove entry from cache

    Hi,
    I've been getting "error: could not remove entry 'openbox' from cache" message while trying to uninstall openbox. Why?

    Any third-party software that doesn't install by drag-and-drop into the Applications folder, and uninstall by drag-and-drop to the Trash, is a system modification.
    Whenever you remove system modifications, they must be removed completely, and the only way to do that is to use the uninstallation tool, if any, provided by the developers, or to follow their instructions. If the software has been incompletely removed, you may have to re-download or even reinstall it in order to finish the job.
    I never install system modifications myself, and I don't know how to uninstall them. You'll have to do your own research to find that information.
    Here are some general guidelines to get you started. Suppose you want to remove something called “BrickMyMac” (a hypothetical example.) First, consult the product's Help menu, if there is one, for instructions. Finding none there, look on the developer's website, say www.brickmyrmac.com. (That may not be the actual name of the site; if necessary, search the Web for the product name.) If you don’t find anything on the website or in your search, contact the developer. While you're waiting for a response, download BrickMyMac.dmg and open it. There may be an application in there such as “Uninstall BrickMyMac.” If not, open “BrickMyMac.pkg” and look for an Uninstall button.
    You generally have to reboot in order to complete an uninstallation.
    If you can’t remove software in any other way, you’ll have to erase and install OS X. Never install any third-party software unless you're sure you know how to uninstall it; otherwise you may create problems that are very hard to solve.
    You may be advised by others to try to remove complex system modifications by hunting for files by name, or by running "utilities" that purport to remove software. I don't give such advice. Those tactics often will not work and maymake the problem worse.

  • ObjectNotFoundException while removing Portlet from display

    Hi,
    My requirement on Personalization is to display all Portlets(names) with Checkboxes, user can decide which portlets to be displayed/not.
    I'm using streaming mode.
    I have 2 methods to do this: getPageView and removePlaceableInstances.
    I'm getting the following exception:
    <pre>com.bea.netuix.application.exception.ObjectNotFoundException: [Primary desktop] with id [Webapp: [myGearbox] PortalPath:
    [personalization] DesktopPath: [personalize.jsp]] could not be found in the database.
    at com.bea.netuix.application.manager.persistence.jdbc.DesktopInstanceDelegate.createDesktopInstance(Ljava.sql.C
    onnection;Lcom.bea.netuix.application.identifier.DesktopDefinitionId;Ljava.lang.String;)Lcom.bea.netuix.application.inst
    ance.internal.DesktopInstanceInternal;(DesktopInstanceDelegate.java:458)
    at com.bea.netuix.application.manager.persistence.jdbc.DesktopInstanceDelegate.getCreateDesktopInstance(Ljava.sq
    l.Connection;Lcom.bea.netuix.application.identifier.DesktopDefinitionId;Ljava.lang.String;)Lcom.bea.netuix.application.i
    dentifier.DesktopInstanceId;(DesktopInstanceDelegate.java:1012)</pre>
    I have attached the code here with for reference.
    <pre>public class PersonalizationUtil
    public static PageView getPageView( String pageInstanceId, String webAppName, String portalPath,
    String desktopPath, Locale locale, HttpServletRequest request ) {
    PortalCustomizationManager cmgr = PortalBeanManager.getPortalCustomizationManager();
    PageDefinitionManager pmgr = PortalBeanManager.getPageDefinitionManager();
    try
    return PortalManager.getPageView( pageInstanceId, webAppName, portalPath, desktopPath, true, locale, request );
    catch( Exception e )
    System.out.println( "PortalVisitorManager - " + e );
    return null;
    public static void removePlaceableInstances( String placeableId, String webapp, String portalPath,
    String desktopPath, HttpServletRequest request )
    placeableId = "portletCompanyStore_1";
    try {
    PortalCustomizationManager cmgr = PortalBeanManager.getPortalCustomizationManager();
    PageDefinitionManager pmgr = PortalBeanManager.getPageDefinitionManager();
    //AppContext ac = AppContext.getAppContext(request);
    CustomizationContext customizationContext = new CustomizationContext(request);
    customizationContext.setVisitorMode(true);
    DesktopView desktopView = cmgr.getDesktopView(customizationContext, webapp, new PortalPath(portalPath), new DesktopPath(desktopPath));
    System.out.println("desktopview - " + desktopView);
    DesktopDefinitionId ddId = new DesktopDefinitionId( webapp, new PortalPath( portalPath ), new DesktopPath( desktopPath ) );
    //customizationContext.setUserDesktopInstanceId(
    InitialContext ic = new InitialContext();
    PageDefinitionManagerHome home = (PageDefinitionManagerHome) PortableRemoteObject.narrow(ic.lookup("java:comp/env/ejb/PageDefinitionManager"), PageDefinitionManagerHome.class);
    PageDefinitionManager mgr = home.create();
    PageDefinition homePageDefinition = mgr.getPageDefinition(customizationContext,
    "home",
    webapp);
    PageView homePageView = mgr.getPageView(customizationContext,homePageDefinition.getPageDefinitionId());
    PageView usersHomePageView = PersonalizationUtil.getPageView(homePageView.getPageDefinitionId().toString(),webapp,portalPath,desktopPath,request.getLocale(),request);
    PlaceableInstance placeableInstance = usersHomePageView.getPortletView(placeableId).getPlaceableInstance();
    System.out.println("NNINFO: PlaceableInstance - " + placeableInstance);
    //PageView usersHomePageView = (PageView) request.getAttribute("usersHomePageView");
    if ( usersHomePageView != null ) {
    //PlaceableInstance placeableInstance = usersHomePageView.getPortletView("portletCompanyStore_1").getPlaceableInstance();
    cmgr.removePlaceable( customizationContext, new DesktopDefinitionId( webapp, new PortalPath( portalPath ), new DesktopPath( desktopPath ) ), placeableInstance );
    } else {
    System.out.println("nulll");
    } catch (Exception e) {
    e.printStackTrace();
    }</pre>
    Am i doing anything wrong??
    Any help or hint would be greatly appreciated!!
    Thanks,
    -Nach.

    Chris, Thank you very much for your valueable inputs.
    Now i have changed the code as per your inputs.
    I'm currently getting PortalCustomizationManager as follows:
    PortalCustomizationManager cmgr = PortalBeanManager.getPortalCustomizationManager();
    1) Is this the right way?
    CustomizationContext customizationContext = new CustomizationContext(Locale.US,request);
    customizationContext.setVisitorMode(true);
    DesktopView desktopView = cmgr.getDesktopView(customizationContext, webapp, new PortalPath(portalPath), new DesktopPath(desktopPath));
    System.out.println("desktopview - " + desktopView);
    But desktopView is null.......
    2) What could be the possible reason?
    Also in the JSP,
    AppContext ac = AppContext.getAppContext(request);
    if (!ac.isDotPortal()) {
    String currentWebAppName = ac.getWebAppName();
    String currentDesktopPath = ac.getDesktopPath();
    String currentPortalPath = ac.getPortalPath();
    currentDesktopPath and currentPortalPath are null....
    Hence i'm getting the desktopPath and portalPath as follows:
    String pathInfo = request.getPathInfo();
    String portalPath = pathInfo.substring(1, pathInfo.lastIndexOf("/"));
    String desktopPath = pathInfo.substring(pathInfo.lastIndexOf("/") + 1, pathInfo.length());
    3) What is the right approach to get portalPath and desktopPath. If i should get the desktopPath and portalPath from AppContext, then what could be the possible reasons for getting null.
    Again, your inputs are more valueable and crucial to me now.
    Thanks
    -Nach.

  • Remove function for cache on Android

    One great stuff in Deezer. No need for cache on mobile app, only Online streaming on the phone. You can have more space for more important things like photos and videos. Why to use cache if you can make playlist as Premium user Offline if needed or just sream with 3G/4G? I want option to settings when user can disable cache when no need.
    Really my 4G LTE or 3G DC or 3G can stream any stuff without problems and no need to fill phone with cache as my internal memory is limited. Thank you.
    Netflix also works without cache. Why cache, it's no needed.

    Updated: 2015-07-23Hello!
    Your idea has been submitted a while ago but unfortunately hasn't gathered enough kudos (25 per year). In order to keep an overview of the active ideas in this forum, we will close this idea for now. However this does not mean that your idea has been declined by Spotify.
    If you still feel strongly about your request, we encourage you to post your idea in a little different form again! Maybe now is the right time to receive the support of our community for your suggestion! ;)
    Do you have any further questions on how the idea exchange is managed? Just click here!

  • Portlet caching in weblogic portal 10.3

    Hi,
    I implemented the following for testing portlet caching.
    1) I have one JSR/168 portlet with cache enabled(Render Cacheable property set to true). This portlet displays time.
    2) Have another JSP portlet which prints the cache names and size of the cache.
    3) Then third portlet which is a JSF portlet has a submit buton
    The caching works fine in the JSR/168 portlet.
    I used the following code to display cache names and cache size.
    String[] cacheNames = CacheFactory.getCacheNames();
    for(int index = 0; index < cacheNames.length; index ++ ) {
    Cache rcCache = CacheFactory.getCache(cacheNames[index]);
    Iterator cacheKeyIterator = rcCache.keySet().iterator();
    int cacheKeySize = rcCache.keySet().size();
    while( cacheKeyIterator.hasNext() ) {
              Object aKey = cacheKeyIterator.next();
    Object keyValue = rcCache.get( aKey );
    System.out.println( "Cache Name: " + cacheNames[index] + "," + cacheKeySize + "," + keyValue.getClass()+","+keyValue );
    The above code displays only the cache names which display metadata of the portal/portlet like portlet preferences, localization details.
    But I need to know the cache name which is caching the portlet content and in which form the content is getting
    cached(as a value object or as HTML). Any help on this?

    Hi,
    Could someone pls explain which cache is used to cache portlet content and in which form the content is cached?

  • Entries removed from cache when calling get()

    Hi. Have a problem where entries seems to be removed from the cache when calling get(). The problem occurs after the cluster has been idle (no calls to get or put) for a while. When I then call get for an entry that I know should be in the cache i can see, via an listener, that an entry is removed from the cache and the get call returns null.
    My cache is wrapped in a class that does not expose any remove methods so I know that there is no calls to remove. Below is a log showing the debug print from when the removal is done and a thread dump on the thread that does the remove.
    Attached you will find both a cache configuration and the code that produces the log below. Note that there is some code missing from the example but the missing code is only interfaces or datawrappers.
    Hopefully someone can help me solve my problem.
    Best Regards
    Marcus
    12539019 [] INFO ClientConnectionPortCacheImpl$DebugCacheListener - Entry removed - [1, null (null)]
    java.lang.Exception: Stack trace
    at java.lang.Thread.dumpStack(Unknown Source)
    at com.ongame.server.domain.casino.cluster.impl.ClientConnectionPortCacheImpl$DebugCacheListener.entryRemoved(ClientConnectionPortCacheImpl.java:121)
    at com.ongame.server.framework.cluster.cache.impl.coherence.CoherenceCacheFactory$CoherenceCacheDelegator$CacheEventAdapter.entryDeleted(CoherenceCacheFactory.java:212)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:199)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:164)
    at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:550)
    at com.tangosol.coherence.component.util.SafeNamedCache.translateMapEvent(SafeNamedCache.CDB:7)
    at com.tangosol.coherence.component.util.SafeNamedCache.entryDeleted(SafeNamedCache.CDB:1)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:199)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap$ProxyListener.dispatch(DistributedCache.CDB:22)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap$ProxyListener.entryDeleted(DistributedCache.CDB:1)
    at com.tangosol.util.MapEvent.dispatch(MapEvent.java:199)
    at com.tangosol.coherence.component.util.CacheEvent.run(CacheEvent.CDB:18)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.onNotify(Service.CDB:14)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:34)
    at java.lang.Thread.run(Unknown Source)<br><br> <b> Attachment: </b><br>coherence-java-example.txt <br> (*To use this attachment you will need to rename 455.bin to coherence-java-example.txt after the download is complete.)<br><br> <b> Attachment: </b><br>coherence-cfg-example.txt <br> (*To use this attachment you will need to rename 454.bin to coherence-cfg-example.txt after the download is complete.)

    Hi Marcus,
    Your configs clearly show that you cannot have eviction.
    From what you have described, you are almost certainly seeing eviction.
    I conclude that the config that is being used is not the config that you intend to get used. To verify this, you can look at the logs to see what config is getting used. I believe you will see what configuration is being used when that config file is loaded. For example, in version 3.2:
    2006-11-22 19:32:13.068 Tangosol Coherence DGE 3.2/367 <Info> (thread=main,
    member=1): Loaded cache configuration from resource
    "jar:file:/C:/java/opt/coherence320b367/tangosol/lib/coherence.jar!/coherence-cache-config.xml"
    Having seen this same problem before (encountering it myself and seeing others encounter it), we added that logging to be clear which config file was being used. If you use the command line tool, it will additionally show you the cache config for the cache that is being accessed when you type the "cache xxx" command (xxx being the name of the cache).
    Peace,
    Cameron.

  • EJB CMP remove create cache issue? DuplicateKeyException

    EJB CMP remove create cache issue? DuplicateKeyException
    Hi I have an EJB 2.1 application using CMP. Most things work fine. But if I in a transaction tries to remove a bean and create a new one with the same primary key I get a DuplicateKeyException:
    2007-11-16 09:25:31,963 ERROR [RMICallHandler-6] AdminGroupData_ConcreteSubClass147 - Error adding AccessRules:
    javax.ejb.DuplicateKeyException: Exception [EJB - 10007]: Exception creating bean of type [AccessRulesData]. Bean already exists.
    at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.duplicateKeyException(EJBExceptionFactory.java:195)
    I suspect that the remove call only removes from the cache (until commit), but that the create call checks the database or something?
    My code is simple like the following:
    AdminPreferencesDataLocal apdata1 = adminpreferenceshome.findByPrimaryKey(certificatefingerprint);
    adminpreferenceshome.remove(certificatefingerprint);
    adminpreferenceshome.create(certificatefingerprint,newadminpreference);
    Is there some configuration I can set in toplink-ejb-jar.xml to fix this?
    I use OC4j 10.1.3.3
    Cheers,
    Tomas

    The bean.remove() was executed but the sql DELETE was executed to the database as the result, oc4j manages all sql statements and they are optimized to commit to the database in batch at once when the transaction commit. Oc4j ejb container is smart and preventing you from creating the same entity cached in the transaction because the sql delete was not really committed to the database when the create is called.
    My guess is that the reason it works with IBM WAS was because it issued sql for each remove/create call right away instead of doing them in batch as oc4j, or your WAS remove then create were called in separate transactions.

Maybe you are looking for