Coder Social home page Coder Social logo

dnwarnock / sample.ejb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wasdev/sample.ejb

0.0 1.0 0.0 25 KB

A sample that demonstrates injection of an EJB into a servlet and provides an application consisting of a servlet and stateless session bean.

License: Apache License 2.0

Java 100.00%

sample.ejb's Introduction

Enterprise Java Beans (EJB) Sample Build Status

This sample demonstrates injection of an EJB into a servlet. The application consists of a servlet and stateless session bean. The servlet uses annotations to inject the stateless session bean, and then performs a call on the hello method of the bean.

This sample can be installed onto runtime versions 8.5.5.0 and later.

Running in Eclipse with Maven

  1. Clone this project and import into Eclipse as an 'Existing Maven Project'.
  2. Right-click the project and select Run As > Maven Clean.
  3. Right-click the project and select Run As > Maven Install.
  4. Right-click the project and select Run As -> Run on Server.
  5. You should see the following in the console: Application EJBSample started in XX.XX seconds.

Running with Maven

This project can be built with Apache Maven. The project uses Liberty Maven Plug-in to automatically download and install Liberty with Java EE7 Web Profile runtime from Maven Central. Liberty Maven Plug-in is also used to create, configure, and run the application on the Liberty server.

Use the following steps to run the application with Maven:

  1. Execute full Maven build. This will cause Liberty Maven Plug-in to download and install Liberty profile server.

    $ mvn clean install
  2. To run the server with the Servlet sample execute:

    $ mvn liberty:run-server

In your browser, enter the URL for the application: http://localhost:9132/ejbservlet/ (where port 9132 assumes the httpEndpoint provided in the sample server.xml has not been modified). In your browser, you should see the message "Hello EJB World".

Notice

© Copyright IBM Corporation 2017.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

sample.ejb's People

Contributors

dnwarnock avatar billyd73 avatar

Watchers

James Cloos avatar

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.