Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8728779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:42:50+00:00 2026-06-13T08:42:50+00:00

I currently have a single entry point (through a @WebService ) that manages a

  • 0

I currently have a single entry point (through a @WebService) that manages a list of request, each of them being a DAO operation (ie createEmployee, createCompany, etc…).
A Company has multiple employees and when my list of commands is the following:

client call #1:
1. createCompany
2. createEmployee
3. addEmployeeToCompany

client call #2:
1. findAllCompanies

I get all the companies, but not the employees associated to them.
If i redeploy the app, and to the findAllCompanies command i comes with all the info (company + employees), seems some persistence bug.
All my beans are stateless (should they be statefull?) and my entity manager is injected on them (should it be only injected on the webservice bean and passed to the others?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:42:51+00:00Added an answer on June 13, 2026 at 8:42 am

    The problem was due to JPA’s cache.

    the query worked fine the first time, and all the subsequent queries feed themselves from the cache.

    oracle docs had the answer, and this can be configured on multiple ways:

    • by configuring the persistence.xml and seting the entity’s cachable parameter (shared-cache-mode)
    • by setting the EntityManager’s properties javax.persistence.cache.retrieveMode and javax.persistence.cache.storeMode
    • by setting javax.persistence.cache.retrieveMode and javax.persistence.cache.storeMode on EntityManager’s find or refresh
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I have created a ABCFactory class that has a single method creating ABC
I currently have some VBA code that runs through and modifies all my calendar
I currently have a single web server hosting multiple WordPress sites which use W3TC.
We currently have a single installation multi-site setup, hosted in Europe, and are looking
I currently have a table which only has a single editable column. I have
So I currently have three unordered lists in my header. This is a single-page
I'm currently managing multiple models from a single SITE MANAGER page. I have the
I'm working on a relatively simple website with (currently) a single resource. I have
Can you have a single SQL that order events by current day then future
Currently have a drop down menu that is activated on a hover (from display:none

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.