javaee / cargotracker Goto Github PK
View Code? Open in Web Editor NEWApplied domain-driven design blueprints for Java EE
License: Other
Applied domain-driven design blueprints for Java EE
License: Other
When I open the project (from the SVN repository) in NetBeans 7.3.1, I get the following error:
Some problems were encountered while processing the POMs: [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.junit:arquillian-junit-container:jar is missing. @line 62, column 21.
This problem is resolved by adding the version number 1.1.0.Final to the arquillian-junit-container dependency element of the POM.
Windows 7, NetBeans 7.3.1
In the application some JPA relations are one-to-many and by default lazy loaded. When fetching the aggregate-root through the repository the returned root object will be detatched. Eclipselink handles this for read operations but Hibernate would throw a LazyInitializationException.
A traditional solution would be to add methods to a DAO such as loadCargoWithLoadedLegs();
With a lot of lazy collections and many combinations this would quickly be a bloated interface.
As a developer I would like to fetch the root, access and make changes to any object in graph, then store the root and have all changes persisted.
It would be nice to be able to get the application to work with different databases. It doesn't seem to be trivial to get the application to work with Oracle XE for example.
Copy over http://dddsample.sourceforge.net/characterization.html, http://dddsample.sourceforge.net/patterns-reference.html and http://dddsample.sourceforge.net/architecture.html - add clarifications/Java EE specific content where sensible.
Add a section explaining higher level Java EE feature choices and recommendations as they pertain to the application (e.g. annotations vs. XML). Need to maintain a balance since API/feature best practices are not the primary focus (as opposed to architectural blueprints/patterns) and the application would not cover large parts of many APIs (as perhaps the samples do).
Alternatively, create API specific sub-projects (or altogether separate projects perhaps leveraging this code base) that focus on technology feature choices/best practices (e.g. best practices for WebSocket, JAX-RS, JPA, EJB, JMS, etc).
Add SoapUI scripts
Good non-Java EE code integration example.
Convert carrier movement file import to JBatch
When I tried an end to end use-case, I was able to do event logging of "LOAD", "UNLOAD" for a route.
But, when I do "CLAIM" at the destination, the status change does not happen and the application's dashboard (admin view)
does not show the cargo-item in "claimed" category.
Steps to reproduce :
=> javax.faces.el.EvaluationException: javax.persistence.NoResultException: getSingleResult() did not retrieve any entities.
When removing the spaces, cargo is retrieved.
Bug is also on administration.
JDK 1.7
Netbeans 8.0
Glassfish 4.0
Add manual deletes?
This is a Java SE application in the original DDD sample project. Should be ported over to show Java EE - Java SE/JavaFX/JAX-RS Client integration.
The source for the original Incident Logger is here: http://dddsample.sourceforge.net/download.html
As described in https://java.net/projects/cargotracker/pages/Home#Getting_Started all one needs to do is run the 'mvn cargo:run' command to start the application. I checked out the cargo-tracker source from SVN, and ran 'mvn cargo:run' which downloaded the dependencies, started the glassfish server, but then failed with FileNotFound exception saying that unable to find the cargo-tracker.war file.
I therefore had to run 'mvn package' to create the cargo-tracker.war. After which, 'mvn cargo:run' started the application successfully.
Would be good if we can either fix this as a doc comment or in the deployment, for folks using Ubuntu.
Thanks,
Rahul.
Ubuntu 12
The interface should be improved to, for example, suggest 'location codes' and 'voyage numbers' when the user has filled the tracking ID.
Introduce ear?
Integrate Arquillian/GlassFish Embedded/Weld EE/Weld SE as needed.
The JSF pages contain red icons in the Project Browser when you open the project in NetBeans 7.3.1.
This issue is presumably fixed by using the http://xmlns.jcp.org/jsf namespace instead of the http://java.sun.com/jsf namespace.
Use it for WebSocket services serialization.
The two main contexts for the CargoTracker Application are the Booking context and the Routing Context. So when the Booking context makes a call to the Routing context via the External Routing Service, it can be done via a separate facade and a translator rather than putting it all into the External Routing Service itself. This helps us change the implementation of the facade if the routing context offers a different protocol for connecting or requires certain additional features for the default protocol supplied.
This Anti Corruption Layer comprises of the Service, the Connector facade and translator and is a possible variant to the open host context relationship. Illustration provided in the attached diagram
Location that are updated via websocket are using a different format (City only) than the 'std' format (City + Port Code).
See last row of attached screenshot
Some dates uses dd/mm/yyyy (show.xhtml) while others are using yyyy-mm-dd (e.g. incident-logger.xhtml)
Mac OS X (english with BE local)
Adds some pizzazz, shows power of JSF component ecosystem.
Makes self-contained demos possible.
jdbc:derby:$
{webapp.databaseTempDir}
/cargo-tracker-database;create=true
Some dates uses dd/mm/yyyy (show.xhtml) while others are using yyyy-mm-dd (e.g. incident-logger.xhtml)
Mac OS X (english with BE local)
Figure out a way to save data only per session (multitenacy?). Which cloud service should we use?
Replace session beans?
Usually, when I undeploy the cargotracker application, the following error appears in the server log:
SEVERE: The web application [/cargo-tracker] created a ThreadLocal with key of type [org.glassfish.pfl.dynamic.codegen.impl.CurrentClassLoader$1] (value [org.glassfish.pfl.dynamic.codegen.impl.CurrentClassLoader$1@18df5b39]) and a value of type [org.glassfish.web.loader.WebappClassLoader] (value [WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
I can then clean the project. Rebuilding generally succeeds the first time, too. But when I try to run it, deployment fails. Here is the relevant info from the server log:
INFO: Loading sample data.
INFO: Unloading all existing data.
SEVERE: Exception while invoking class org.glassfish.ejb.startup.EjbApplication start method
javax.ejb.EJBException: javax.ejb.CreateException: Initialization failed for Singleton SampleDataGenerator
...
Caused by: java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManagerFactory.
I have to stop and restart the database and server to be able to run the app again.
'Book Cargo' refuse to book a cargo that has the same Origin and Dest ("Origin and destination cannot be the same").
But this following case is not handled correctly:
Improve look/feel/graphics
In web.xml, for a Facelets index.xhtml, it is customary to list the welcome file as follows:
faces/index.xhtml
And the servlet-mapping is usually
/faces/*
not
*.xhtml
I can assign myself to this issue and make the fixes if there is no objection.
Steps to reproduce :
Administrative landing page
Click on Tracking ID ABC123
=> JSF warn message : "The metadata component needs to be nested within a f:metadata tag. Suggestion: enclose the necessary components within <f:metadata>"
Netbeans 8.0
Glassfish 4.0
JDK 7
Add JMeter stress tests
Shows power of CDI ecosystem.
Using Java EE security/JAAS.
Integrate JSF 2.2/HTML 5 pass-through forms
Steps to reproduce :
Administrative landing page
Tab "Booking"
Try to book a cargo with any origin, any destination and any arrival deadline (valid one)
=> javax.faces.el.EvaluationException: java.lang.NullPointerException: Country and location may not be null
Netbeans 8.0
Glassfish 4.0
JDK 7.0
Integrate JSF 2.2 @ViewScoped
When booking a cargo, if the date is not valid, the application should display an nice jsf message.
Instead, it redirects on the details of the new cargo but this new cargo is not displayed in the list.
JDK 1.7
Netbeans 8.0
Glassfish 4.0
The current idea is to create a live dashboard with drill-down capabilities showing the location and status of cargo across the globe (and possibly voyage routes).
The problem is that this will use "SSE" only so only a partial use of WebSocket. Other ideas welcome. Chat seems a bit too artificial.
When booking with same origin and destination, the application throws an error and displays it in the standard exception jsf page :
Caused by: java.lang.IllegalArgumentException: Origin and destination can't be the same: Shanghai [CNSHA]
This exception should be caught and should be display in an nice jsf error message
Netbeans 8.0
JDK 1.7
Glassfish 4.0
Go to http://localhost:8080/cargo-tracker/admin/registration.xhtml
The two lists Origin and Destination are not ordered.
They should be ordered alphabetically.
Netbeans 8.0
JDK 1.7
Glassfish 4.0
As of JavaServer Faces 2.2, the namespace URLs for Facelets pages have changed from java.sun.com to xmlns.jcp.org. To support Java EE 7, for example, the three middle namespaces in the following html element in admin/registration.xhtml need to be fixed:
The last one, which is used for the JSF 2.2 pass-through elements feature, is already correct.
The old namespaces are still supported, so you don't get errors. But EE 7 apps should use the new ones.
Frequently requested so most folks can run it on their existing servers, incorporate into their existing applications.
Integrate JPA second-level cache
When logging an event failed, the only message sent to the user is "registration failed". Is this failure due a domain issue or to a technical issue?
User need to get more useful feedback.
Make project work on the latest GlassFish build and file bugs as needed.
Cargo with last location set to unknown are displayed in the middle of the USA.
Either don't display them or display them in a 'parked' area (eg. bottom left)
NA
Add continuous integration as per DDD practices.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.