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

  • Home
  • SEARCH
  • 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 9203101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:23:57+00:00 2026-06-17T23:23:57+00:00

As my Play 1.2.x project grows, I’m finding myself adding stuff here and there

  • 0

As my Play 1.2.x project grows, I’m finding myself adding stuff here
and there when doing certain things (persisting objects, etc.) and my code gets quite mixed up.
I think the best way to handle these kind of use cases would be using an Eventbus.. but which one?
There’s

  • http://code.google.com/p/simpleeventbus/
  • The one from Google Guava http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/eventbus/package-summary.html

and probably some more….

I’ve seen that Play 2.x is able to use the akka 2.0 event bus… but as the scala plugin is still using an old sbt/scala version, I’m unable to use the Akka 2 with play 1.2.x

I’d be glad to read what message buses you’re using in your Play Projects.
Please also explain how your solution handles persistence operations, e.g. how to be able to use the JPA Session from a listener.

Thanks,
Dominik

  • 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-17T23:23:57+00:00Added an answer on June 17, 2026 at 11:23 pm

    Are you still looking at integrating AKKA with Play 1.2? I have just completed integration with Play 1.2.5. I looked at the module for AKKA, but it was fairly out of date, so I decided to integrate AKKA myself.

    It is all quite simple here are some basic steps:

    • In your dependencies.yml file include the line

      com.typesafe.akka -> akka-actor_2.10 2.1.0 // this was the latest version at time of writing

    • execute from the command line play deps to download the relevant libraries into your lib folder

    • do some IDE goodness to get the library dependencies in
      setup in your conf directory a reference.conf file (this will contain config info for akka on start) – look at: http://doc.akka.io/docs/akka/2.1.0/general/configuration.html
    • add "-Dconfig.file=reference.conf" to your VM options
    • Have a static class of AppContext or similar to load in the AkkaSystem – this is just so that you create once and can reference from anywhere.
    • Load the AKKA system with:

      Config config = ConfigFactory.load();
      public static final notificationSystem = ActorSystem.create("notification", config);
      

    That should be enough to get running, then you just have to create some Actors to do your bidding.

    I also got JPA working – if you try and access your models and lookup data, you will end up with an Uninitialised Entity Manager error.

    Here is some example code for an actor with JPA access:

        @Override
        public void onReceive(Object o) throws Exception {
            if (o instanceof SomeMessageType) { // create your own serializable class to transfer message data
                SomeMessageType message = (SomeMessageType) o;
                JPAPlugin.startTx(true); // true is to start this as a readonly transaction
                // Do all the JPA goodness
    
                JPAPlugin.closeTx(false); // false is for rollback - I use this because I am doing a readonly transaction
    
            } else {
                unhandled(o);
            }
        }
    

    Hope this helps. I spent a good few hours trying to get everything working. I am now able to structure my async tasks rather than just spit out to Play Jobs.

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

Sidebar

Related Questions

I'm doing Html5 video play on my project with flash fallback (if it doesn't
Is there a way to package play project into self-contained jar / war file?
In the file main.html , in default project created by Play! , there's this
I am using video.js project to play videos on my web page. I implemented
I have a Play Framework (1.2.4) project with PlayMorphia that has two different database
After running a new Play-framework 2.0 based project, i failed to clean it -
I'm working on a project for a game I play, and I can't seem
I recently stumbled upon Play framework while evaluating frameworks to use in a project.
I'd like to create a new project with the Play! framework. My system is
I have video in my project. I play it with MPMoviePlayerController but app will

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.