-
1. Re: Beans Cashed?
robisz Oct 12, 2004 3:47 AM (in response to grinch)Yes, BMP beans are cached by default as far as I know.
But if you only access the database through your beans, it
can't cause problems.on the JSP page I have the ability to edit an entry which calls a set* on the EJB
Are you sure you only update data by calling set methods of entity
bean? In this case, ejbLoad not needing after updating. -
2. Re: Beans Cashed?
grinch Oct 12, 2004 8:41 PM (in response to grinch)Yes, I call the set method of the bean. Then the page loads as normal which does a findAll. Then I call the corresponding get Method and the new data is not retrieved. Maybe the bean is cashed before the set method and then calling the get method using the cashed bean that does not have the new info in it?
As an example of what I am doing the front end:
var1 = getparameter("var1");
if (var != null && var1.equals("update"){
ejb.setMethod(var1);
}
<%
collection = findAll()
for each { %>
<%=ejb.getMethod()%>
<%}%>
Again, the only way to get the data to show up is to stop jboss and load the page again. Any ideas?
-SJ -
3. Re: Beans Cashed?
grinch Oct 13, 2004 1:01 PM (in response to grinch)I am stumped here!!
It is not the broweser cashing the bean, it has to be JBOSS. I open an entirely different boswer and load the page and it is still not showing me that data that is the database. The reason for this is becuase for some reason, my findAll method is not calling ejbLoad on the object. Only when I restart JBOSS and load the page will the ejbLoad be called and data retrieved from the database.
I am stumped here!!
It is not the broweser cashing the bean, it has to be JBOSS. I open an entirely different boswer and load the page and it is still not showing me that data that is the database. The reason for this is becuase for some reason, my findAll method is not calling ejbLoad on the object. Only when I restart JBOSS and load the page will the ejbLoad be called and data retrieved from the database.
Here is what I am doing. the page awlays calls does a findALL to display the DB data. Depending on user input a call could be made to one of the beans to call a setMethod() which acts as normal and updates the data in the DB. However, when the page loads again the ejbLoad method is not called. The page loads but shows the data before the setMethod was called. If I restart jboss and open the page again, the ejbLoad method is called, and the data is shown as normal. What is going on here? Any one have an idea?
-SJ