Java Petstore version 1.3 released with JMS, EJB CMP 2.0


News: Java Petstore version 1.3 released with JMS, EJB CMP 2.0

  1. Version 1.3 of the Java Petstore has been released. This new version brings major changes and improvements, including a conversion of almost all entity beans to CMP 2.0 with local interfaces, use of JMS and Message driven beans for the mailer component, filters, JFC/Swing clients deployed through Java Web Start, and Java APIs for XML.

    See Java Petstore 1.3.
  2. I wonder how this one compares, performance-wise, to the .NET version.
  3. I think this is not the goal... dont react as Micro$oft wants you to... Pet Store is NOT a J2EE performance demo.
  4. Bob knows that. He works for M$
  5. This is not meant to be a response to MS Pet Store. For Sun's specific response, check out:

    Interestingly, local interfaces will improve performance but the MS Pet Store is not a good comparison since Microsoft removed its own middle. The MS Pet Store consists only of ASP and stored procedures. This misses the whole point a three-tier architecture.

    For a more reasonable test, Microsoft should port the Java Pet Store EJBs into MTS COM+ Objects.

  6. And then run it on Solaris, or Linux, or.. oh no, I forgot, it's stuck on M$ platforms.
  7. Folks let's stick to the matter at hand, that is the new version of the PetStore. We already had a lengthy discussion about the J2EE vs .NET petstores not too long ago on this forum.

    It would be nice some technical comments on the new J2EE PetStore. Has anyone installed it or had a look at the code, is it a good example of using the new features in J2EE 1.3

  8. Hi,

    Enough with this Microsoft PetStore nonsense. This thread should be discussing the contents of the 1.3 J2EE pet store reference implementation. Any talk Microsoft here should be treated as spam...

    - Maurice
  9. Your thread included
  10. I am missing something here !!!. I thought this thread is to discuss something about the PetStore 1.3 .
  11. Your point that the .NET Petstore uses only ASP and stored procs is wrong. The implementation is a logical 3-tier implementation that uses .NET middle tier classes. In .NET, middle tier classes are encapsulated into "assemblies". These are the equivalent of EJBs or COM+ components. You should look at the .NET implementation to avoid spreading mis-information.
  12. Hi Jim,

    I have looked at the .Net Pet Shop. You are correct that it does use assemblies. My point is really that these assemblies are more analogous to lightweight Java Beans rather than EJBs. The assemblies contained in .Net Pet Shop consist basically of three types of methods: get, set, and run stored procedure. That's my point. JSP/Servets + JavaBeans + Stored Procedures can be handled in TomCat. To get to the heart of the J2EE component framework, MS Pet Store would need more heavy weight components and would need the equivalent of container-managed services such as persistence, transactions, etc.

    Let's move this discussion to the the MS Pet Store thread. I have already responded to you there.


  13. This whole J2EE vs .NET thing is really silly. Come on, let's concentrate on getting good with the tools at hand. The sniping makes people sound like a bunch of children.
  14. I think petstore 1.3 has a serious design flaw in the webtier.
    In webtier the webcontroller's handleEvent() is serialized in order to process users request one after another.
    So only one reqest will be processed at a time from webcontroller onwards.
    But this is not the case with HTMLAction classes.
    Take the case when user submits a request, and before it is over, he clicks another button in the web page.

    HTMLAction.doStart() will be called for Request 1
    HTMLAction.perform() will be called for Request 1
    HTMLAction.doStart() will be called for Request 2 (this may do dirty read from web session)
    HTMLAction.perform() will be called for Request 2 (passing some inconsisted data to ejb tier)
    HTMLAction.doEnd() will be called for Request 1 (the eventRespose for this will be updated in session only now)
    HTMLAction.doEnd() will be called for Request 2 (the state of session is no more the same...)

    I feel either the HTMLAction (why not name it WebAction by the way) should be moved after webcontroller to make it work synchronized, or remove synchronization from the webcontoller also.

    Take 2 fictious cases:
    1) Shopping cart is displayed to user, and he changes quantity from 1 to 10 and clicks update cart.
    Immediately, he presses esc and clicks checkout.
    UpdateQtyEvent(values taken from web session) would have been fired by webcontroller, while a checkoutEvent with old total amount (dirty read from web session) would have been generated and waiting to be executed.
    The first event will update the qty to 10 in database, and the second event will charge the user for 1 item, and mark the database record as paid (not ensuring if the quantity is still the same in db, too much coding).
    So I get 10 items for the price of 1 !!!
    In this case the HTMLAction must be serialized

    2) User clicks next link in a big search result screen.
       Changes his mind, and clicks previous link.
       In this case, the previous action should not wait for an abandoned next to complete.
    In this case nothing should be serialized

    Comments welcome