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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:03:39+00:00 2026-06-11T00:03:39+00:00

I have a play application which I am in the process of building a

  • 0

I have a play application which I am in the process of building a application that will use play framework for the front end but will also have some “worker nodes” which play will communicate with over JMS queues.

These worker nodes are meant to be light weight and therefore won’t be running the full play framework.

I’d like to embed the same models in both the play framework app and the worker nodes to make it easy to pass the objects over JMS however to use ebean in play framework I need to have the object extend play.db.ebean.Model which won’t work in the worker nodes as they aren’t running on play.

What is the best way to do this?

  • 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-11T00:03:41+00:00Added an answer on June 11, 2026 at 12:03 am

    The play.db.ebean.Model class of Play is just an helper which provides some usefull methods (save(), update(), delete()…). They just make calls to the Ebean static methods, for instance, the save() method implementation of the play.db.ebean.Model class is:

    /**
     * Saves (inserts) this entity.
     */
    public void save() {
        Ebean.save(this);
    }
    

    You can make your model objects without inheriting from it:

    @Entity
    public class User {
    
       @Id
       private Long id;
    
       @Column
       private String name;
    
       // getters and setters
    }
    

    But if you want to do not depend on the Ebean class, you should write other classes (aka “service” or “DAO” layer in the Java EE world) with containing your static methods:

    public class UserDAO {
    
       public static Finder<Long,User> find = new Finder<Long,User>(Long.class, User.class); 
    
       public static void save(User aUser) {
          Ebean.save(aUser);
       } 
    }
    

    Then, you have to package your model objects into a JAR, and add this dependency in Play and in your JMS system. But in your JMS system, don’t forget to add a depency to the JPA annotation that are imported in your model objects.

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

Sidebar

Related Questions

I have play-framework application that uses one module which I've created by play new-module
in my application i have the playvideo page where video will play, below that
I have recently launched my application into the Google Play store but unfortunately some
I've been working on a Play application (1.2.4) which will do some crunching on
I have an application which will support several standard operations play stop pause undo
I have a Play application which is deployed on Google Appengine. I use Play
I have an application which now is on google play. Ther developement and testing
I have created a play application and have some models. One of them contains
I have a JSON template under app/views/Application/movie.json in my Play Framework app. Normally you
I'm working on an application that will read in file paths and play audio

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.