Code Monkey home page Code Monkey logo

jello's Introduction

Jello

(Like Trello, but not)

This is an example application to demonstrate some of the APIs available under the Jakarta EE Umbrella.

High Level Overview

Build

To build and test the applications:

mvn clean install

Run

To run the applications:

Card System

This is the main system that host the Jello board. You can start the application using maven running under Wildfly, Payara or OpenLiberty:

Wildfly:

cd jello-cards/
mvn clean install -Pwildfly

OpenLiberty:

cd jello-cards/
mvn clean install -Popenliberty

Payara:

cd jello-cards/
mvn clean install -Ppayara

This will download (first time only), install and start a Wildfly application server and deploy the app.

You can see the Web GUI here: http://localhost:8080/cards

(Log in with any email, as long as the password is also that email)

Log in screen

Board

Audit System

The audit system receive change notifications from the Queue and then store it in cache. It also has a Websocket GUI to display the audit messages in real-time on the Screen. You can start the application using maven running under Wildfly, Payara or OpenLiberty:

Wildfly:

cd jello-audit/
mvn clean install -Pwildfly

OpenLiberty:

cd jello-audit/
mvn clean install -Popenliberty

Payara:

cd jello-audit/
mvn clean install -Ppayara

You can see the Web GUI here: http://localhost:8080/audit/app

(Click on connect to start receiving messages)

OpenShift

Deploy the docker image to Openshift, add ENV JAVA_OPTS:-Djboss.bind.address=0.0.0.0

quay.io/phillip_kruger/jello

Demo

Once both systems is running, create new cards using the GUI in the card system, and see the log entries in the audit system.

TODO: Add some scenarios

REST Examples

(You can get the key from the Dashboard)

export JELLOKEY=<insert_key_here>

Get all cards: curl -H "Content-Type: application/json" -i -H "jello.api.key:$JELLOKEY" http://localhost:8080/cards/api/card

Create a card: curl -d '{"title": "Jax-rs","description": "Created from REST"}' -X POST -H "Content-Type: application/json" -i -H "jello.api.key:$JELLOKEY" http://localhost:8080/cards/api/card

Update a card: curl -d '{"id": 1,"title": "Jax-rs","description": "Created from REST but updated","comments": [],"created": "2019-08-26T14:01","createdBy": "[email protected]","swimlane": "development"}' -X PUT -H "Content-Type: application/json" -i -H "jello.api.key:$JELLOKEY" http://localhost:8080/cards/api/card

Get a card: curl -H "Content-Type: application/json" -i -H "jello.api.key:$JELLOKEY" http://localhost:8080/cards/api/card/1

Delete a card: curl -X DELETE -H "Content-Type: application/json" -i -H "jello.api.key:$JELLOKEY" http://localhost:8080/cards/api/card/1

Presentations

If anyone is looking for a talk to give at your local meetups or conferences you are welcome to use all or parts of this demo and presentation. You can make it your own or use it as is. You are also welcome to improve the talk and demo and contribute back.

Known presentations

jello's People

Contributors

phillip-kruger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jello's Issues

WildFly not able to deploy war file

Hi,

When am trying to deploy using wildfly its failing with below error.Could you please assist in resolving below issue.

Caused by: java.lang.NoClassDefFoundError: Ljavax/security/enterprise/SecurityContext;
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.8.0_221]
at java.lang.Class.privateGetDeclaredFields(Class.java:2583) [rt.jar:1.8.0_221]
at java.lang.Class.getDeclaredFields(Class.java:1916) [rt.jar:1.8.0_221]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.(ClassReflectionIndex.java:57) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: javax.security.enterprise.SecurityContext from [Module "deployment.cards.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
... 15 more

16:15:27,546 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 3) JBAS014613: Operation ("add") failed - address: ([("deployment" => "cards.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit."cards.war".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit."cards.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "cards.war"
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.github.phillipkruger.jello.queue.CardQueueProducer with ClassLoader ModuleClassLoader for Module "deployment.cards.war:main" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: Ljavax/security/enterprise/SecurityContext;
Caused by: java.lang.ClassNotFoundException: javax.security.enterprise.SecurityContext from [Module "deployment.cards.war:main" from Service Module Loader]"}}
16:15:27,556 ERROR [org.jboss.as.server] (management-handler-thread - 3) JBAS015870: Deploy of deployment "cards.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.deployment.unit."cards.war".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit."cards.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "cards.war"
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.github.phillipkruger.jello.queue.CardQueueProducer with ClassLoader ModuleClassLoader for Module "deployment.cards.war:main" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: Ljavax/security/enterprise/SecurityContext;
Caused by: java.lang.ClassNotFoundException: javax.security.enterprise.SecurityContext from [Module "deployment.cards.war:main" from Service Module Loader]"}}

Thanks,
Saravanakumar R

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.