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

Suppose I have a simple model, such as Record: @Model public class Record {
Hi Suppose I have a simple model class like this: class TestModel(models.Model): testkey =
Suppose I have the following (trivially simple) base class: public class Simple { public
Suppose I have a Django model as follows: class Person(models.Model): first_name = models.CharField(max_length=50) last_name
Suppose I have this simple app working : # model class Project has_many :numbers
Suppose I have a domain model like this: public class MyDomainEntity { public double
Suppose you have a simple class like this: class foo{ private: int* mData; int
Suppose I have a simple to-do list application. The application contains two models: lists
This question relates to Django Aggregation/Annotation in 1.1. Suppose I have a simple model
Suppose you have a viewModel: public class CreatePersonViewModel { [Required] public bool HasDeliveryAddress {get;set;}

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.