Demo Web Application

We provide a demo web application to get you easily started.

Start a geth Ethereum client node in development mode via:

geth --dev --http --http.api eth,net,web3 --dev.period 0 --ws --ws.origins '*'

WildFly

Start WildFly via:

cd wildfly-26.1.3.Final/bin
./standalone.sh --server-config=standalone-full.xml

Compile the project via:

mvn clean install

Deploy the Ethereum resource adapter via:

cd ethereum-rar/
mvn wildfly:deploy

Deploy the demo web application via:

cd ethereum-rar-demo-deploy/
mvn wildfly:deploy

The demo web application is now available at: http://localhost:8080/ethereum-demo/

If you want debug logging, add to standalone/configuration/standalone-full.xml under subsystem xmlns="urn:jboss:domain:logging:8.0" the following configuration:

<periodic-rotating-file-handler name="ETHEREUM" autoflush="true">
    <level name="DEBUG"/>
    <formatter>
        <named-formatter name="PATTERN"/>
    </formatter>
    <file relative-to="jboss.server.log.dir" path="ethereum.log"/>
    <suffix value=".yyyy-MM-dd"/>
    <append value="true"/>
</periodic-rotating-file-handler>
<logger category="be.e_contract.ethereum" use-parent-handlers="false">
    <level name="DEBUG"/>
    <handlers>
        <handler name="ETHEREUM"/>
    </handlers>
</logger>

Following the logging via:

tail -F standalone/log/ethereum.log

OpenLiberty

Work in progress

Download OpenLiberty version 22.0.0.13 package Jakarta EE 8 from: https://www.openliberty.io/start/

Create the server via:

cd wlp/bin
./server create

Copy ethereum-rar/target/ethereum-rar-1.4.0.rar to wlp/usr/servers/defaultServer/ethereum-ra.rar.

Copy ethereum-rar-demo-deploy/target/ethereum-rar-demo-deploy-1.4.0.ear to wlp/usr/servers/defaultServer/demo.ear.

Configure wlp/usr/servers/defaultServer/server.xml with:

<resourceAdapter id="ethereum_ra" location="${server.config.dir}/ethereum-ra.rar">
    <classloader apiTypeVisibility="spec,ibm-api,api,stable,third-party"/>
</resourceAdapter>

<application type="ear" id="demo" location="${server.config.dir}/demo.ear">
    <classloader classProviderRef="ethereum_ra" apiTypeVisibility="spec,ibm-api,api,stable,third-party"/>
</application>

Start the server via:

cd wlp/bin
./server start

Monitor the server logging via:

tail -F wlp/usr/servers/defaultServer/logs/console.log

The demo web application is now available at: http://localhost:9080/ethereum-demo/

Stop the server via:

cd wlp/bin
./server stop

Oracle WebLogic

Work in progress

Download Oracle WebLogic Server version 14.1.1.0.0 via: https://www.oracle.com/middleware/technologies/weblogic-server-installers-downloads.html

Start the server via:

cd Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/bin
./startWebLogic.sh

Deploy the Ethereum resource adapter via:

cp ethereum-rar/target/ethereum-rar-1.4.0.rar Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/autodeploy/ethereum-ra.rar

Deploy the demo web application via:

cp ethereum-rar-demo-deploy/target/ethereum-rar-demo-deploy-1.4.0.ear Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/autodeploy/demo.ear

The web application should be available at: http://localhost:7001/ethereum-demo/