Enterprise Java (605.784.31) Root

This is the course home page for the Enterprise Java Course (605.784), taught at John's Hopkins University, Engineering Programs for Professionals. This site will be populated as the semester progresses and topics are addressed. If you are looking for a version of the full content for ejava-javaee, refer to http://webdev.apl.jhu.edu/~jcs/legacy-ejava-javaee .

Legal Disclaimer: The information and opinions expressed within the materials located on this site are the personal contributions of Jim Stafford. Content published here is not reviewed or approved by my employers (The Johns Hopkins University and SRA International) before it is posted and does not necessarily represent the views and opinions of my employers.

What's New

  • 2009-07-21: Baselining Materials
  • 2009-04-22: Posted JMS artifacts
  • 2009-04-05: Posted WAR parts to JavaEE Exercise
  • 2009-03-24: Posted Session EJB TODOs
  • 2009-03-21: Posted JavaEE Exercise RMI Interface updates
  • 2009-03-18: Posted Updated JavaEE Exercise
  • 2009-03-11: Posted ORM Inheritance and Event Listener/Callback Updates
  • 2009-03-03: Posted EJB-QL Updates
  • 2009-02-24: Posted ORM Relations Updates
  • 2009-02-17: Posted ORM Core Updates
  • 2009-02-10: Posted Entity Managager Updates
  • 2009-02-02: Posted Data Access Tier materials
  • 2009-01-25: Posted initial class site

Class To Do

  • have a nice summer

Things you should have finished!

    • Add an EJBTimer to eLeague to send out schedule reminders for upcoming contents.
    • Integrate your JMS message publishing into your eLeague session bean(s) to pubish the reminders and changes to contents as JMS messages.
    • Add an MDB to eClub to listen for contest events and gather the contact information for those associated with the contest.
    • Complete your projects, finish testing, and turn in.
    • Finish security configuration, implementation, and testing
    • Add JMS configuration file to JBoss server. Be sure to keep a copy in your source tree and refer to file in project README if you don't auto-deploy the file.
    • Design your JMS message type(s). Write and test a utility class that publishes the messages. This class ideally would be placed in with the BLImpl classes. However, if it publishes DTO classes, the DTOs may have to get moved in with the BO project to satisfy dependency constraints.
    • Implement a Java SE Client to receive and log the JMS messages. This client can be placed in BLImpl, must use a selector, and be launchable by the grader using an Ant script. The Ant script can be part of either the BLImpl or RMI Test project. See class examples on how write the Ant script.
    • Complete your projects, finish testing, and turn in.
    • Start project 3
    • Add user.properties and roles.properties to eSales project
    • Assign EJB to security-domain "other". The RMI Tests should fail access at this point.
    • Specify required roles to access each EJB method
    • Add a java.security.auth.login.config to the RMI Test client
    • Add a LoginContext with a CallbackHandler. The RMI Tests should be able to access the EJB methods they are authorized to access. You should have at least one test that verifies an unauthorized user is refused access.
    • Assign WAR to security-domain "java:/jaas/other"
    • Add security-constraint elements to the WAR web.xml. The user should be prompted for a login at this point and be able to access web pages and EJB methods that they are authorized for and be refused access to what they are un-authorized to access
    • Eliminate access to any information or option the user does not have access to see or use
    • Eliminate the passing of userId information when the appropriate means is to obtain through the EJB or WARs security context.
    • Go through Web UI parts of the JavaEE exercise.
    • Look over Web UI parts of the ejbsessionBank.
    • Add a WAR project to eLeague. Add in the controller, handler, and supporting JSP implementations.
    • Add a WAR project to eClub. Add in the controller, handler, and supporting JSP implementations. This WAR should get all of its behavior from eClubEJB and not interact directly with eLeague.
    • Finish implementing EJB use cases for end-to-end testing.
    • Add @Transaction declarations
    • Implement the transaction test requirement. You may want to place logic for the transaction test within the TestUtilEJB since you may end up undesirable business logic in order to demonstrate the rollback of a transaction.
    • Look over the specification for project 2.
    • Complete the posted sections of the Java EE exercise .
    • Apply the maven, EJB, EAR, RMI Test, and remote interface concepts from the exercise to your project 2.
    • Begin adding the other session beans, remote interfaces, business logic integration, and RMI tests for project 2.
    • Continue to perform any desired post-submission refactoring of your project 1 implementation prior to re-use within project 2.
    • Continue to look over the specification for project 2.
    • Go through the newly posted javaeeEx exercise.i Updates will be posted as additional sections are completed.
    • Finish up project 1 and submit to the grader according to the submission criteria.
    • Perform any desired post-submission refactoring of your project 1 implementation prior to re-use within project 2.
    • Look over the specification for project 2.
    • Begin looking at ejbsessionBank example application; which forms an EJB, EAR, RMI Test, as well as a WAR Client. These will be key component types within project 2.
    • Refactor or implement any necessary functionality using Queries and EJB-QL.
    • Finish adding required business logic for end-to-end testing.
    • Enhance your Business Objects to include JPA relationships. Be sure to include proper deletion as a part of your cleanup in your test case. This now must take foreign key constraints into consideration (e.g., can't delete a Season when you still have a Division)
    • Begin adding required business logic to satisfy the specified end-to-end scenario. Add unit tests to verify the functionality of the individual business logic methods.
    • Implement your ingest capability. Provide some sort of verification that the ingest worked. You don't have to test for the entire model ingested, but provide a brief set of sanity checks that comparse pre/post and selected information.
    • Implement your populate() method in terms of the ingest. Encapsulate it an your resetAll() within a TestUtilImpl class. Re-use this class as a part of your unit testing.
    • Create the remainder of your Business Objects for the project.
    • Enhance your testing of the Business Objects to include anticipated use cases for the project (e.g., adding a Team to a Division, submitting a score, etc.)
    • Mature your JDBC DAO implementations to handle persisting the additional classes.
    • Declare the Business Objects as Entities and map the classes to tables and columns in your database. Your JDBC and JPA DAOs should be using the same database tables at this point. You can attempt to use the JPA DAO to help test the JDBC DAO implementation. Mark relationships and problem fields as @Transient at this point in time.
    • If you have not yet done so, please submit a copy of your project to me for early sanity check. It should be in a known and stable state where it will build from the root with known and documented issues. I want to see your project at least once early in the project and as you run into any significant issues.
    • weather-cancelled class make-up
      • go through any remaining Entity Manager materials; podcast and slides
    • Go through the EntityManager Exercise
    • Look over the class project example implementation
    • Add JPA/Hibernate infrastructure to your DAO project DAO. This should at least consist of a successful connection to the DB. You are done with this step when you have a separate JPA JUnit test for the DAO and the setUp() method is able to create an EntityManager.
    • Define a few business objects as being an @Entity and identify the primary key property with the @Id tag. Make sure you have a default constructor, but leave other things default for now. Annontate all collections with @Transient annotation. We are not ready to cover relationships just yet.
    • Design and implement an initial JPA implementation for your DAO
    • Design and implement a set of unit tests for your JPA DAO. Note how the default schema for the @Entities may not match up with your DB schema at this point when you run the tests.
    • Add JPA @Annotations to your class project business objects to properly map the @Entities to the database schema design you created last time (primarily a topic for next week)
    • Refine your BOs, DB Schema, and DAO based on your understanding to date.
    • Move forward with your DB Schema design, BO classes, and JDBC DAO implementation if there is extra time. You can turn off your JPA JUnit Test by adding an excludes definition to your surefire configuration. Perform a google search on "surefire excludes" for details.
    • Send me a copy of your project, in a stable, known state, sometime this week; ideally by early Sunday evening. You do not have to be complete with the TODO items, but you should be able to describe what you know you have left to complete and describe any issues that have gotten in your way. This will not be graded, but that should not stop you from turning it in and making an honest effort to have the TODOs completed.
    • Continue to consider all BO, DB Schema, and DAO work as draft prototypes at this time to get something end-to-end running. You will refine over next several weeks.
    • weather-cancelled class make-up
      • go through the DAO, SQL, JDBC materials; podcast and slides
    • Go through the JDBC Exercise
    • Look over the class project and post any questions.
    • Establish your project directory structure and perform a build from the root.
    • Design and implement a few business objects for your class project.
    • Design and implement a set of unit tests for your business objects.
    • Design and implement the test infrastructure for your DAO. This should at least consist of a successful connection to the DB.
    • Design a draft DB schema for your implemented business objects. This should go in your DAO project.
    • Implement a way to create your schema in the DB as a part of your DAO testing.
    • Design and implement an initial DAO interface and JDBC implementation for your business objects. You only need a create method for the project.
    • Consider all BO, DB Schema, and DAO work as draft prototypes at this time to get something end-to-end running. You will refine over next several weeks.
    • register for newsgroup and setup e-mail handling (all e-mails will have ejava_class in subject)
    • post at least 1 test message to newsgroup
    • setup development environment by going through exercises 0 and 1
    • weather-cancelled class make-up
    • enjoyed the holidays!