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 4336758
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:51:03+00:00 2026-05-21T10:51:03+00:00

Suppose I have a simple Model package models; import javax.persistence.Entity; import play.db.jpa.Model; @Entity public

  • 0

Suppose I have a simple Model

package models;

import javax.persistence.Entity;
import play.db.jpa.Model;

@Entity
public class Chart extends Model {

    public String name;

    @Lob
    public String json;
}

Now if I were to retrieve an object from the Chart class in a method as follows

Chart c = Chart.findById(1L);
doSomethingWithChartAndLetMeKnow(c)
c.wait();

Now in this doSomethingWithChartAndLetMeKnow method, once I finish processing, I can call c.notifyAll() and presumably the original method would continue executing.

However, what if a completely different method does the following

Chart c = Chart.findById(1L);
c.notifyAll();

would the original thread that was waiting on the doSomethingWithChartAndLetMeKnow method be waken up at all?

  • 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-05-21T10:51:04+00:00Added an answer on May 21, 2026 at 10:51 am

    No, it would not wake the original thread.

    The two requests are handled by separate Sessions. Entities retrieved in different sessions are not the same Java object.

    However, you should check out Play!’s async support instead of using notify() and wait():
    http://www.playframework.org/documentation/1.2/asynchronous

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi Suppose I have a simple model class like this: class TestModel(models.Model): testkey =
Suppose I have a Django model as follows: class Person(models.Model): first_name = models.CharField(max_length=50) last_name
This question relates to Django Aggregation/Annotation in 1.1. Suppose I have a simple model
I have a simple ADO.NET Entity Framework 4.0 model (edmx) which defines database tables
suppose you have an MVC application with the Model represented by an Entity Framework
Suppose I have a simple XHTML document that uses a custom namespace for attributes:
I have a simple question. Is there a way ( using reflections I suppose
Suppose I have a class module clsMyClass with an object as a member variable.
Suppose I have a simple WPF 3D scene set up with a single rectangle
I have a very simple viewmodel class, and a strongly typed view (which uses

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.