Flushing the Servlet Cache or buffer(maybe) ^o^

Hi,
I wrote a few JSPs that use servlets and scriplets using import and include attributes to extract data from a database table. Everything works fine, except when I refresh the page the results are shown multiple times.
That is to say, the servlets seem to remember the previously generated values from the table and calculations, and displays it before showing the new results. I tried using the flush="true" attribute, but to no avail. After about 10 mins or if i restart Tomcat the servlets would clear the cache.
I am writing these JSp for a school assignment, and so far this is the part that I am having trouble dealing with. Is there a workaround for this? or is this an implementation error in my part? Any help would be appreciated. Thanks in advance!
Cheers,
-Shawn

Well thats interesting. I wrote a test Servlet program to see the newsbean output and I get the same problem now and It appends the old result. I realize that the trouble is not in the include statement, rather in the servlet itself.
I looked over the code to see what it could be, but couldn't catch it. But maybe you might see something different. So I will include the code for the TestServlet and the dependat classes. And Philip I appreciate your effort trying to help me out with this! : )
test Servlet class
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.ListIterator;
import java.sql.*;
public class NewsServlet
extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
NewsBean NewsPiece = null;
try
staffMembers = new NewsBean();
catch (SQLException ex)
//iterating through news list
ListIterator li = null;
try
li = NewsPiece.getNewsItem().listIterator();
catch (SQLException ex1)
String myNews="";
while(li.hasNext()){
NewsItem news = (NewsItem) li.next();
myNews += news.getTitle()+" \t"
news.getDescription()" \t"
+ news.getSubmitdate() +" \t"
news.getEndDate()" \t"
news.getAuthor()"<p>";
String docType =
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
"Transitional//EN\">\n";
out.println(docType +
"<HTML>\n" +
"<HEAD><TITLE>News</TITLE></HEAD>\n" +
"<BODY BGCOLOR=\"#FDF5E6\">\n" +
"<H1>News</H1>\n" +
myNews+
"</BODY></HTML>");
This is the newsbean class
import package.name.sqlAdapter; //This is used to simplify database connections
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.LinkedList;
public class NewsBean{
private static ResultSet results;
private static LinkedList newsItems = new LinkedList();
public NewsBean() throws SQLException{
//connect to DB
sqlAdapter sqlConnection = new sqlAdapter();
//Get Staff list
String query = "SELECT * FROM `news` ";
results = (ResultSet) sqlConnection.runCustomQuery(query);
public LinkedList getNewsItem()throws SQLException{
while(results.next()) {
//read in columns
String description = results.getString("description");
String title = results.getString("title");
String submitDate = results.getString("submit_date");
String endDate = results.getString("end_date");
//String author = results.getString("author");
String picture = results.getString("picture");
String id = results.getString("id");
//create NewsItem object and add to list
NewsItem news = new NewsItem(title, description, submitDate, endDate, picture, id);
newsItems.add(news);
return newsItems;
Here is the NewsItem Class
public class NewsItem
private String title;
private String description;
private String submitDate;
private String endDate;
private String author;
private String picture;
private String id;
public NewsItem(String Title, String Description, String SubmitDate, String EndDate,String Picture, String ID){
this.title = Title;
this.description = Description;
this.submitDate = SubmitDate;
this.endDate = EndDate;
//this.author = Author;
this.picture = Picture;
this.id = ID;
public static void main(String[] args) {
//test code here
public String getDescription(){
return this.description;
public String getTitle(){
return this.title;
public String getSubmitdate(){
return this.submitDate;
public String getEndDate(){
return this.endDate;
public String getAuthor(){
return this.author;
public String getPicture(){
return this.picture;
public String getNewsID(){
return this.id;

Similar Messages

  • How do you flush the negative cache?

    Hi all,
    I am working with NetWeaver 2004s SR3 SP14 on SuSE 10 with Oracle.  I wrote a custom login module and was trying to get SAP to load it.  At first I made some reference mistakes (in provider.xml under the references tab) and it wouldn't load.  Then I fixed the reference errors and tried to get it to load again and it still wouldn't load.  I just keep on getting the error message:
    [EXCEPTION]
    {1}#2#com.mycompany.dc.netweaver.MyLoginModule#java.lang.ClassNotFoundException:
    com.mycompany.dc.netweaver.MyLoginModule
    Found in negative cache
    I shut down and restarted SAP several times (using stopsap and startsap) and undeploying and redeploying my login module (the fixed version), but still, SAP refuses to load my login module because it is in the "negative cache".
    If I keep the code the same, but change the name of the Java class and component name in provider.xml, then SAP happily loads my login module.
    So I can work around the issue, but it is really annoying to change your configuration every time you make a mistake with the references...  So I was hoping that someone would know how to flush the negative cache.  Do I have to go into the database to do it?
    -- Katrina

    Hi Katrina,
    did you found a way to flush the chache?
    kind Regards,
    Gerardo J

  • Flushing the DNS cache

    I'm having trouble with a Web site when I access it on my home computer, yet this same site looks fine on my Mini at work. One section of the index page generates a "can't find server" error, and the site's own logo won't display properly. It is a free hosting site. Sometimes I can upload files to it, other times I get a can't-find-server error when I try.
    In answer to my query about this (to which I helpfully attached a screenshot of the incompletely loaded index page and its error messages), the host is telling me that I should "flush my DNS cache," which they say involves going into Terminal and giving the command "ookupd -flushcache" [sic]. (I've already surfed this briefly and the first result confirmed my suspicion that this doofus hasn't mastered copy-and-paste technique and the command actually should be "lookupd- flushcache".)
    It's not just that their site doesn't load fully, though. They have some stuff on one of their pages that they encourage users to hotlink on personal Web sites, and I have done that with one of their banners. The banner, which was fine for months, now appears on my page as a broken icon, too, although it, like the site's home page, loads fine on my computer at work.
    My first question is, is there any harm in flushing the DNS cache? The OS Daily page where I think they copied this advice from makes it sound like this is something only a Web server would need. If I do it on my home machine, could it cause problems? Could it disable my Internet connectivity?
    Second, less urgent question, more for the netgeeks out there: Do you think this is a likely solution to my problem? Especially considering that the problem involves not only their site but an element on an external site linking back to them? I hate to play the sucker for some low-level geek whose main mission is to deflect my query.
    Thanks
    Kathi

    Kathi--
    Like BDAqua says, there's nothing to worry about flushing the DNS cache. It's true that most people probably don't need to do it very often, but it's something easy and harmless to try, and it might well fix problems like yours.
    One handy feature of Safari, even if you don't use it for anything else, is the "Activity" window. Open it from the "View" menu, and watch as your page loads. You can see exactly which components on the page are loading, which aren't and where they should be coming from. If you double-click an element in that list, Safari will try to open it in a new window. That is sometimes enough to give a clue as to why something isn't working.
    You can use Safari's activity list along with the Network Utility from your Utilities folder to try to figure out why you're not getting the page elements. Suppose a graphic is listed as coming from http://www.server1.com/images/logo.jpg, but it's not loading.
    First thing I would try in the Network Utility is to see if it will respond to pings. From that example, enter "www.server1.com" on the "Ping" page of the Network Utility and see if it answers back.
    To find out if it's a DNS problem, you can use Safari's list to get the addresses of the problem elements, then see if the IP addresses match up on your computer at home to the one at work. If they don't, then it could be stale DNS.
    You can use the Network Utility for DNS lookups, but I think they're hard to read, and, since you're already thinking about using the Terminal to flush the DNS cache, you can use nslookup. It's really simple:
    <pre class="command">nslookup www.apple.com</pre>
    Will give you something like this (the first two lines will likely be different):
    Server: 208.67.222.222
    Address: 208.67.222.222#53
    Non-authoritative answer:
    www.apple.com canonical name = www.apple.com.akadns.net.
    Name: www.apple.com.akadns.net
    Address: 17.251.200.32
    If the addresses don't match, or you get a message that it can't find anything for your server, then you know it's a DNS problem. Perhaps they've changed some addresses and your home ISP's DNS servers themselves aren't updating.
    You can even use nslookup to see what different DNS servers say about an address. Just add the IP address of a DNS server after the address you want to look up:
    <pre class="command">nslookup www.apple.com 208.67.220.220</pre>
    Just do a search on the 'net for free DNS servers, and you'll find a bunch to choose from.
    charlie

  • Flush the DNS cache

    How do i flush the DNS cache on an iPhone?

    TrYaN73 wrote:
    How do i flush the DNS cache on an iPhone?
    There's no specific way to do that exact thing in iOS. However, resetting network settings will help resolve a lot of network-related issues for both Wi-Fi and cellular connections.
    Reset network settings by tapping Settings > General > Reset > Reset Network Settings.

  • How do I flush the portlet cache?

    I have tried using the portlet cache (renderCacheable="true" ) on some data intensive pages and its working fine. When i make changes to to the data i need to be able to flush that cache though so that the portlets show the updated data.
    I have tried to find a way to do this programaticly but so far i havent found any solution. How do i do this?

    Create a backingFile on the portlet
    and from one of the methods (say handlePostbackData)
    call
    PortletBackingContext.getBackingContext(request).invalidateCache();
    Chris Jolley
    Portal Architect

  • Disabling the object cache for value OciObjects

    Hi.
    I have a program using OCIObjects as value objects to pass data from OCI to PL/SQL procedures. However in a multithreaded test there is a lot of mutex blocking occuring within the oracle client library (on OCIObjectNew, OCIObjectFree and others), which i am guessing is associated with the OciObjects being managed within the object cache.
    Is it possible to disable the object cache? Or maybe construct the value objects in such a way that they are ignored by the cache.
    Thanks for any help.

    Hi,
    thanks for your response.
    I did consider using OCI_ENV_NO_MUTEX but i would like the oracle OCI library to implement mutexing because i am assuming it does it efficiently and only where required. However it is not clear to me why mutexing would be required when creating/deleting value OCIObjects. I'm guessing it's because of the object cache. (The documentation doesn't explain.)

  • Standard Servlet caching mechanism

    Gurus,
    Is there any standards on caching servlet reponse. Most of the application servers provide their own mechanism to cache servlet response.
    I am looking for application server netural standards for caching servlet resposne. If there is no standards for caching available in any of the servlet > 2 releases, probably i would send an email to servlet specification guys to think on something like this.
    Its lot of pain when you write code in some server and deploy it on some other server where the servlet caching response caching is suported.
    Any help in this will be appreciated

    Here is more explanation...
    Suppose for an example, a servlet that accepts parameter(s) and queries the database and displays a html text, may be around 100 records. ok?
    Next time when you make the same request with same set of parameters, the servlet excecutes the db query again and display the same result when it was intially called.
    Now my question, is there standard mechanism to cache the servlet reponse at server side and when the request is made with same set of parameters, it would be served from the cache instead of making db call.
    In addition to that, it should work under all the application server when you deploy
    Let me know if this clear enough, or i can add more stuff in here.

  • 10G NEW FEATURE-HOW TO FLUSH THE BUFFER CACHE

    제품 : ORACLE SERVER
    작성날짜 : 2004-05-25
    10G NEW FEATURE-HOW TO FLUSH THE BUFFER CACHE
    ===============================================
    PURPOSE
    이 자료는 Oracle 10g new feature 로 manual 하게
    buffer cache 를 flush 할 수 있는 기능에 대하여 알아보도록 한다.
    Explanation
    Oracle 10g 에서 new feature 로 소개된 내용으로 SGA 내 buffer cache 의
    모든 data 를 command 수행으로 clear 할 수 있다.
    이 작업을 위해서는 "alter system" privileges 가 있어야 한다.
    Buffer cache flush 를 위한 command 는 다음과 같다.
    주의) 이 작업은 database performance 에 영향을 줄 수 있으므로 주의하여 사용하여야 한다.
    SQL > alter system flush buffer_cache;
    Example
    x$bh 를 query 하여 buffer cache 내 존재하는 정보를 확인한다.
    x$bh view 는 buffer cache headers 정보를 확인할 수 있는 view 이다.
    우선 test 로 table 을 생성하고 insert 를 수행하고
    x$bh 에서 barfil column(Relative file number of block) 과 file# 를 조회한다.
    1) Test table 생성
    SQL> Create table Test_buffer (a number)
    2 tablespace USERS;
    Table created.
    2) Test table 에 insert
    SQL> begin
    2 for i in 1..1000
    3 loop
    4 insert into test_buffer values (i);
    5 end loop;
    6 commit;
    7 end;
    8 /
    PL/SQL procedure successfully completed.
    3) Object_id 확인
    SQL> select OBJECT_id from dba_objects
    2 where object_name='TEST_BUFFER';
    OBJECT_ID
    42817
    4) x$bh 에서 buffer cache 내에 올라와 있는 DBARFIL(file number of block) 를 조회한다.
    SQL> select ts#,file#,dbarfil,dbablk,class,state,mode_held,obj
    2 from x$bh where obj= 42817;
    TS# FILE# DBARFIL DBABLK CLASS STATE MODE_HELD J
    9 23 23 1297 8 1 0 7
    9 23 23 1298 9 1 0 7
    9 23 23 1299 4 1 0 7
    9 23 23 1300 1 1 0 7
    9 23 23 1301 1 1 0 7
    9 23 23 1302 1 1 0 7
    9 23 23 1303 1 1 0 7
    9 23 23 1304 1 1 0 7
    8 rows selected.
    5) 다음과 같이 buffer cache 를 flush 하고 위 query 를 재수행한다.
    SQL > alter system flush buffer_cache ;
    SQL> select ts#,file#,dbarfil,dbablk,class,state,mode_held,obj
    2 from x$bh where obj= 42817;
    6) x$bh 에서 state column 이 0 인지 확인한다.
    0 은 free buffer 를 의미한다. flush 이후에 state 가 0 인지 확인함으로써
    flushing 이 command 를 통해 manual 하게 수행되었음을 확인할 수 있다.
    Reference Documents
    <NOTE. 251326.1>

    I am also having the same issue. Can this be addressed or does BEA provide 'almost'
    working code for the bargin price of $80k/cpu?
    "Prashanth " <[email protected]> wrote:
    >
    Hi ALL,
    I am using wl:cache tag for caching purpose. My reqmnt is such that I
    have to
    flush the cache based on user activity.
    I have tried all the combinations, but could not achieve the desired
    result.
    Can somebody guide me on how can we flush the cache??
    TIA, Prashanth Bhat.

  • Concurrent processing of POST requests and automatic flushing of the servlet response buffer in WLS6.1.

              Hi all,
              I encountered the following 2 servlet problems in WLS 6.0/ 6.1:
              1. Processing concurrent POST requests
              WLS seems to disallow concurrent executions of any servlet's doPost servlet method.
              When two clients attempt to send a request to a servlet using POST, the socond
              one
              is blocked until the first customer is served. In essence, the servlet ends up
              operating in
              1-user mode. I just learned from Jervis Liu that the problem is solved in WLS6.0
              if you disable http-keepalive.
              For WLS 6.1 a partial workaround is to make the servlet work in a single-thread
              mode (by implementing the javax.servlet.SingleThreadModel interface). In this
              case,
              WLS dispatches concurrent requests to different instances of the servlet.
              This doesn't completely eliminate the problem - still only one customer can be
              connected at a time. The improvement is that once the first customer is disconnects,
              the second can be served even if the doPost method for the first has not finished
              yet.
              2. Flushing the response buffer in WLS 6.1
              The servlet response buffer is not flushed automatically until doPost ends, unless
              you
              explicitly call response.flushBuffer(). Closing the output stream doesn't flush
              the
              buffer as per the documentation.
              I see that other people are experiencing the same problems.
              Has anyone found any solutions/workarounds or at least an explanation.
              Any input would be highly appreciated.
              Thanks in advance.
              Samuel Kounev
              

    Thanks for replying. Here my answers:
              > Did you mark your doPost as synchronized?
              No.
              > Also, try testing w/ native i/o vs not ... is there a difference?
              With native I/O turned off I get a little lower performance, but the
              difference is not too big.
              Best,
              Samuel Kounev
              > Peace,
              >
              > --
              > Cameron Purdy
              > Tangosol Inc.
              > << Tangosol Server: How Weblogic applications are customized >>
              > << Download now from http://www.tangosol.com/download.jsp >>
              >
              > "Samuel Kounev" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > Hi all,
              > >
              > > I encountered the following 2 servlet problems in WLS 6.0/ 6.1:
              > >
              > > 1. Processing concurrent POST requests
              > >
              > > WLS seems to disallow concurrent executions of any servlet's doPost
              > servlet method.
              > >
              > > When two clients attempt to send a request to a servlet using POST, the
              > socond
              > > one
              > > is blocked until the first customer is served. In essence, the servlet
              > ends up
              > > operating in
              > > 1-user mode. I just learned from Jervis Liu that the problem is solved in
              > WLS6.0
              > >
              > > if you disable http-keepalive.
              > >
              > > For WLS 6.1 a partial workaround is to make the servlet work in a
              > single-thread
              > >
              > > mode (by implementing the javax.servlet.SingleThreadModel interface). In
              > this
              > > case,
              > > WLS dispatches concurrent requests to different instances of the servlet.
              > > This doesn't completely eliminate the problem - still only one customer
              > can be
              > >
              > > connected at a time. The improvement is that once the first customer is
              > disconnects,
              > > the second can be served even if the doPost method for the first has not
              > finished
              > > yet.
              > >
              > > 2. Flushing the response buffer in WLS 6.1
              > > The servlet response buffer is not flushed automatically until doPost
              > ends, unless
              > > you
              > > explicitly call response.flushBuffer(). Closing the output stream doesn't
              > flush
              > > the
              > > buffer as per the documentation.
              > >
              > > I see that other people are experiencing the same problems.
              > >
              > > Has anyone found any solutions/workarounds or at least an explanation.
              > > Any input would be highly appreciated.
              > >
              > > Thanks in advance.
              > >
              > > Samuel Kounev
              =====================================================
              Samuel D. Kounev
              Darmstadt University of Technology
              Department of Computer Science
              DVS1 - Databases & Distributed Systems Group
              Tel: +49 (6151) 16-6231
              Fax: +49 (6151) 16-6229
              E-mail: mailto:[email protected]
              http://www.dvs1.informatik.tu-darmstadt.de
              http://skounev.cjb.net
              =====================================================
              [att1.html]
              

  • How can I make WL 8.1 flush the cache and/or pool for 1.1 EJBs

    Hi,
    I'm using 1.1 deployment descriptors for my CMP entity bean that were previously
    used in the WL 5.1 version of my project.
    Things do get deployed but I've observed confusing information when monitoring
    the EJB via Admin Console.
    What appears is that the Weblogic container is not flushing the cache and/or pool
    after the bean has finished processing and also a sufficient time has expired
    (i.e. the idle-timeout-seconds)
    From what I've understood via the on-line information is that each EJB has its
    own cache (since I've not done anything special for that) and the instance in
    cache is only passivated when the cache is full and the server need to activate
    another instance. On passivation, it appears to be returning the instance to the
    pool. But its unclear/undocumented when the pool is cleared, if at all.
    What I want is that:
    1. A way to get my cached instance passivated
    2. A way to get my pooled instance flushed.
    The reason I'm looking into this is becasue in my case it appears that the cached/pooled
    instance are contributing to OutOfMemory errors and because of the nature of requirements,
    etc. we need to have the cache size be high for certain processing.
    Thanks
    Parasher

    I think it's probably best to contact technical support about this.
    There are different patches for different versions of WLS.
    I'd mention 'CR128026' to them to get started.
    -thorick
    "Parasher" <[email protected]> wrote:
    >
    Hi,
    Thank you for your reply !
    How can I get more information about this patch and the patch itself
    Is there a way I can look it up online or do I have to contact the support
    folks
    and if so what should I need to tell them to convey which patch I'm talking
    about.
    Thank you in advance.
    Parasher
    "thorick" <[email protected]> wrote:
    Hi,
    If you use 'Database' concurrency, then there is a patch available for
    some 8.1
    service
    packs to enable idle-timeout-seconds on the cache. I believe that this
    will be
    standard
    feature with the next service pack. There is no comparable mechanism
    for the
    pool in 8.1,
    this is a feature that is coming with the next major release of WLS.
    If the
    8.1 patch works
    for you, it can save you memory during off peak usage times. Notethat
    this
    patch does not
    work for 'Exclusive' concurrency.
    -thorick

  • How to clear file cache (or buffer cache?) in the system

    i found that after copying a large file, say >200M the system's memory drop 200M exactly until i delete the file. it is suspected that the memory is used for file cache.
    After installing memtool, the prtmem command shows the following:
    Total memory: 983 Megabytes
    Kernel Memory: 106 Megabytes
    Application: 193 Megabytes
    Executable & libs: 40 Megabytes
    File Cache: 495 Megabytes
    Free, file cache: 60 Megabytes
    Free, free: 87 Megabytes
    It shows that nearly 500M of system's memory is used for file cache.
    The temporary solution i use now is to copy a large file, say 300M, and delete that file.
    eg
    cp temp1.txt temp2.txt
    rm temp2.txtAnd then most of the file cache will be freed out.
    is there any way to release this file cache?
    I've checked the system use the default value for the bufhwm parameter. ie, about 20M. however, as i know, this bufhwm parameter is related to buffer cache. is it really related to file cache?

    To answer your question directly - delete the file or unmount the file system.
    To answer your question indirectly - You are worrying about the wrong thing here. Also the buffer cache is slightly different the file system page cache. The file system page cache is behaving exactly as it should as is the virtual memory subsystem. When a system is operating for some period of time, the amount of free memory will always drop towards LOTSFREE and, if allowed, stay right above LOTSFREE - forever - if the work behavior of the machine stays about the same. This is usually because of the file system page cache.
    Its nothing to worry about. Actually you want that to happen. Otherwise your disks would be getting the crap kicked out of them all the time.

  • Flush the Access Server cache automatically

    Hello,
    I'm trying to follow Oracle® Access Manager Deployment Guide 10g (10.1.4.3) and note ID 403899.1 to allow the user/group cache to update when we call the userservcenter and groupservcenter functions in OAM. I've seen other threads about this, but could derive an answer to my question.
    The instructions say:
    4. Add a dummy AccessGate using the configureAccessGate command line tool, as follows:
    configureAccessGate -i COREid_install_dir/identity/ AccessServerSDK -t AccessGate
    Question: Am I really adding an accessGate here, or am I configuring the one I already have (which is really being used as a WebGate I guess since it's protecting web resources)?
    Thanks!

    I went ahead and used the current AccessGate/WebGate with the configureAccessGate command line tool and that seemed to work, but I'm still not getting the result that I'd like.
    1. I can access a page protected by OAM because I'm in a LDAP group.
    2. I use IdentityXML call to unsubscribe me from the group.
    3. I refresh the page, and can still access the page.
    Is it possible get this to flush the cache when the IdentityXML function is called?
    I changed the doAccessServerFlush to true, used the configureAccessGate to configure the AccessGate/WebGate, changed the Access Management Service on the AccessGate and Access Server to On, and bounced everythying.
    THanks!

  • Seeking within client buffer in OSMF player flushes the client buffer

    Hi,
    I have problem with maintaining aspect ratio of the video in osmf. I have 4:6 video which I want to display as it is but the problem is that if I use ScaleMode.NONE then since my player width and height is 640 and 360 respectively but the video height and width are greater so video does not come properly it goes out of media container how can I resize my video based on player height maintaining the scale of 4:6.
    Regards,
    Amit

    Hi Amit,
    Did you try using ScaleMode.LETTERBOX?
    You can verify the scale mode behavior using Flash Media Playback setup tool: http://www.osmf.org/configurator/fmp/
    Flash Media Playback is build on top of of OSMF, so you should experience the same behavior.
    -Andrian
    p.s. how is this related to seeking? (and yes, the player should not flush the client buffer, as far as I know. Please report the issue here: http://bugs.adobe.com/jira/browse/FM )

  • How to flush the cache of a JCO repository ?

    Does anybody now how to flush the cache of the JCO repositories of pools managed by Netweaver application server without restarting the JVM ?
    The reason I'm asking is that, whenever a tables or structure changes on ABAP side (CRM,  IS-U, R/3), even though we redeploy the J2EE applications, they do not see the new definitions, and we have to restart the JVMs.
    This is particularily annoying in an "high availability" production environment such a ours.
    We need a close to 24/7 up time, and putting down the JVM for even a few minutes is becoming a problem.
    I'd like to be able to manually flush the repositories when needed.
    For example, is it possible to write a small java application that could perform the flush on a single request ?
    I did not try writing any code to do so yet, but I guess this snippet can do the work:
    IRepository rCRM = JCO.createRepository("FLUSH_CRM", "java:comp/env/eis/pool_crm")
    while (rCRM !=null)
       String [] crmFuncts  = rCRM.getCachedFunctionInterfaces()
       String [] crmStructs = rCRM.getCachedStructureDefinitions()
       for (int i=0; crmFuncts!=null && i<crmFuncts.lenght; i++)
          rCRM.removeFunctionInterfaceFromCache(crmFuncts<i>);
       for (int i=0; crmStructs!=null && i<crmStructs.lenght; i++)
          rCRM.removeStructureDefinitionFromCache(crmStructs<i>);
       rCRM = rCRM.getNextRepository();
    Does it ?
    Edited by: Croussette Yves on Jun 9, 2008 8:46 PM
    Edited by: Croussette Yves on Jun 9, 2008 8:47 PM

    Hi,
    Please check these link:-
    1.[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3219]
    2.https://www.sdn.sap.com/irj/scn/thread?messageID=601915
    3.https://www.sdn.sap.com/irj/scn/thread?messageID=135202
    Best Regards,
    Atul Bhatia

  • Error flushing the output stream in Sun One server

    Hi All,
    I was running my servlet code in iPlanet 6.0 version and it was working fine. I upgraded my web server to new Sun One server (Oracle-iPlanet-Web-Server-7.0.9). With the new web server almost 90% of my application works fine, but there is a features in my application to download an Excel sheet by clicking a button. This feature is failing in new Sun One web server.
    Below are my piece of code and the error log I m getting. Can anyone tell me how I can fix this error, I mean is there any web server specific change or configuration parameter need to be set.
    Please ask for any information regarding my server configuration settings if needed for finding a solution for this
    Code:
    byte abyte0[] = new byte[1024];
    BufferedInputStream bufferedinputstream=null;
    BufferedOutputStream bufferedoutputstream=null;
    java.io.InputStream inputstream = httpurlconnection.getInputStream();
    bufferedinputstream = new BufferedInputStream(inputstream);
    bufferedoutputstream = new BufferedOutputStream(httpservletresponse.getOutputStream());
    int j;
    long byteCount=0;
    while((j = bufferedinputstream.read(abyte0, 0, 1024)) != -1)
    byteCount=byteCount+j;
    if(logger != null && logger.traceOn())
    logger.log("total"+byteCount);
    logger.log("Read bytes:"+j);
    bufferedoutputstream.write(abyte0, 0, j);
    if(logger != null && logger.traceOn())
    logger.log("Wrote bytes:"+j);
    bufferedoutputstream.flush(); // <<<<<< ERROR POINT >>>>>>
    Error Log :
    ClientAbortException: java.io.IOException: WEB8004: Error flushing the output stream
    at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:343)
    at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:313)
    at org.apache.coyote.tomcat5.CoyoteOutputStream.flush(CoyoteOutputStream.java:147)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
    at com.reuters.bdec.as.ASRequestHandler.processResponse(ASRequestHandler.java:285)
    at com.reuters.bdec.as.ASRequestHandler.initiateGetRequest(ASRequestHandler.java:89)
    at com.reuters.bdec.as.ASRequestHandler.proceedToDestination(ASRequestHandler.java:220)
    at com.reuters.bdec.as.ASExtension.authorisationCheck(ASExtension.java:84)
    at com.reuters.bdec.as.ASExtension.doGet(ASExtension.java:114)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:794)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:915)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
    at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
    Caused by: java.io.IOException: WEB8004: Error flushing the output stream
    at com.sun.webserver.connector.nsapi.NSAPIProcessor.action(NSAPIProcessor.java:243)
    at org.apache.coyote.Response.action(Response.java:197)
    at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:339)
    ... 20 more

    Don't flush it yourself. The servlet container will automatically flush for you once its send buffer is full. You can change the size of the send buffer though.

Maybe you are looking for

  • How do I get rid of the automated message after my outgoing voicemail?

    Hey Everyone, I have a 16GB iPhone 3G, and I recently I contacted AT&T regarding problems I was having with the recently deployed Free Wi-Fi service at AT&T hotspots. The problem was resolved, but in the process AT&T reset my voicemail account. Since

  • Objects Not Loaded Correctly Error

    When I open up Data Modeler I get this error. "Some objects are not loaded correctly. See the log file for details" After I click OK my model opens up but I noticed that I can not change the precision on a column in one of my tables. This model is un

  • Fluctuating gamma on TV connected via S-video adapter

    I have a television (generic CRT) connected to my Powerbook G4 through the S-video adapter and an RCA cable. Periodically (and I think with increasing frequency), it looks like the gamma setting for the TV fluctuates when it is displaying the line in

  • I really need some enlightening!!!!

    if i purches an application on my account, and i use more then one divise, can i use this application on all my divises or do i have to purches it again?

  • JOptionPane and Applet problem

    Hi folks, I have an applet, I want to display a pop up dialog whenever the user does something. SO i used JOptionPane: int userIn=JOptionPane.showInternalConfirmDialog(this,"Do you wish to generate xml for each ics/ids files pair in this data set?",