This is a very frustrating problem for me and I don't know which information may be specifically relevant, so if you need any additional information please tell me.
The situation is that I have stateless EJB facades defined in different servlets. I use one of these facades to persist objects into my datasource (mysql) with no problem, but then the other EJB facades' findall method does not retrieve the newly persisted objects. What's strange is that new data only becomes available after I recompile and redeploy using NetBeans' debug configuration. The facade that was used to persist the objects, however, seems to be able to find them too.. By the way, all the session and entity beans were generated by NetBeans.
I am by all means lost, so any help would be greatly appreciated!
This here is the method in my QuotaFacade session bean that I use to persist new Quota objects based on information from an HTML Form. The instance of the Session Bean object that has this method invoked resides in a servlet that handles form requests.
To give some brief information about the data structure, Faculties have Departments, which in turn have associated Quotas. However, when I create
in the servlet responsible for doing this, I see when debugging that newly persisted Quotas are not included - despite the fact that they have already been inserted into the datastore.
Joined: Dec 26, 2010
I just figured out how to enable sql logging on glassfish (I am not very knowledgeble in the area). The problem seems to be that the .findAll() method of the EJB's seem to be executing queries only once. The output below shows the queries executed the first time the .findAll() methods are called. The next time around nothing gets added to the logs.