Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Section
bordertrue
Column
width15%
Include Page
TUSCANYWIKI: SCA Java Subproject MenuTUSCANYWIKI:
SCA Java Subproject Menu
Include Page
TUSCANYWIKI: Java SCA Menu NewTUSCANYWIKI:
Java SCA Menu New
\\ {panel:title=Apache Tuscany Geronimo As Host Environment Guide|borderStyle=solid|borderColor=#C3CDA1|titleBGColor=#C3CDA1|bgColor=#ECF4D1} * [*What this guide is about*|#Intro] * \[*Why use SCA in Geronimo?*\|#Why use SCA in Geronimo?} * [*Setup Environment*|#Setup Environment] * [*Sample Applications*|#Sample Applications] ** [*Deploy helloworld application*|#deploy] ** [*Access helloworld from JSP*|#JSP] ** [*Access helloworld from Servlet*|#Servlet] ** [*Access helloworld From a session EJB*|#Access helloworld From a session EJB] {panel} \\   {note} The Tuscany Plugin for Geronimo is being developed and tested on Geronimo v2.1.4. {note} h2. {anchor:Intro}{bgcolor:#C3CDA1}What this guide is about{bgcolor} TBD h2. {anchor:Why use SCA in Geronimo?}{bgcolor:#C3CDA1}Why use SCA in Geronimo? {bgcolor} TBD h2. {anchor:Setup Environment}{bgcolor:#C3CDA1}Setup Environment{bgcolor} h3. Installing on Geronimo Tomcat server Follow the steps below to install the plugin on Geronimo v2.1.4 with Tomcat as the web container. # Edit
  1. <GERONIMO_HOME>\var\config\config.xml
#*
    • Add
    • the
    • gbean
    • xml-fragment
    • given
    • in
    • Listing-1
    • under
    • "org.apache.geronimo.configs/tomcat6-deployer/2.1.4/car"
    • module.
#*
    • Add
    • the
    • gbean
    • xml-fragment
    • given
    • in
    • Listing-2
    • under
    • "org.apache.geronimo.configs/openejb-deployer/2.1.4/car"
    • module.
{
Column
width85%


Panel
borderColor#C3CDA1
bgColor#ECF4D1
titleBGColor#C3CDA1
titleApache Tuscany Geronimo As Host Environment Guide
borderStylesolid


 

Note

The Tuscany Plugin for Geronimo is being developed and tested on Geronimo v2.1.4.

Anchor
Intro
Intro

Background Color
color#C3CDA1
What this guide is about

TBD

Anchor
Why use SCA in Geronimo?
Why use SCA in Geronimo?

Background Color
color#C3CDA1
Why use SCA in Geronimo?

TBD

Anchor
Setup Environment
Setup Environment

Background Color
color#C3CDA1
Setup Environment

Installing on Geronimo Tomcat server

Follow the steps below to install the plugin on Geronimo v2.1.4 with Tomcat as the web container.

  1. Edit
Wiki Markup
Note
}
    • If

    • you

    • are

    • starting

    • with

    • a

    • fresh

    • Geronimo

    • Tomcat

    • 2.1.4

    • server,

    • you

    • can

    • replace

    • <GERONIMO_HOME>\var\config\config.xml

    • with

    • config.xml

    • available

    • at

[
|http://cwiki.apache.org/confluence/download/attachments/106639/tomcat-config.xml]. {note} # Start Geronimo. # Download
    • .

  1. Start Geronimo.
  2. Download tuscany-tomcat-1.0-SNAPSHOT.car
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/tuscany-tomcat/1.0-SNAPSHOT/
] #
  1. Deploy
  1. the
  1. plugin
  1. using
  1. the
  1. command
  1. "<GERONIMO_HOME>\bin\deploy
  1. install-plugin
  1. tuscany-tomcat-1.0-SNAPSHOT.car".
  1. The
  1. default
  1. username/password
  1. to
  1. perform
  1. the
  1. deployment
  1. is
  1. system/manager.

  1. Listing-1:
{
  1. Code Block
}
  1. 
    <gbean name="TomcatWebBuilder">
        <reference name="ModuleBuilderExtensions">
            <pattern>
                <name>TuscanyModuleBuilderExtension</name>
            </pattern>
            <pattern>
               <name>PersistenceUnitBuilder</name>
            </pattern>
            <pattern>
                <name>JspModuleBuilderExtension</name>
            </pattern>
            <pattern>
                <name>MyFacesModuleBuilderExtension</name>
            </pattern>
        </reference>
    </gbean>
    
{code}
  1. Listing-2:
{
  1. Code Block
}
  1. 
    <gbean name="EJBBuilder">
        <reference name="ModuleBuilderExtensions">
            <pattern>
                <name>Axis2ModuleBuilderExtension</name>
            </pattern>
            <pattern>
                <name>AxisModuleBuilderExtension</name>
            </pattern>
            <pattern>
                <name>CorbaModuleBuilderExtension</name>
            </pattern>
            <pattern>
                <name>TuscanyModuleBuilderExtension</name>
            </pattern>
            <pattern>
                <name>PersistenceUnitBuilder</name>
            </pattern>
            <pattern>
                <name>CXFModuleBuilderExtension</name>
            </pattern>
        </reference>
    </gbean>
    
{code} # Download
  1. Download xbean-finder-3.6.jar
  1. from
[
  1. http://repo1.maven.org/maven2/org/apache/xbean/xbean-finder/3.6/xbean-finder-3.6.jar
]
  1. and
  1. save
  1. to
  1. <GERONIMO_HOME>\repository\org\apache\xbean\xbean-finder\3.6
\ # Add the text in
  1. \ (not needed for Geronimo 2.1.5)
  2. Add the text in Listing-2B
  1. to
  1. <GERONIMO_HOME>\var\config\artifact-aliases.properties

  1. Listing-2B:
{
  1. Code Block
}
  1. 
    org.apache.xbean/xbean-finder/3.5/jar=org.apache.xbean/xbean-finder/3.6/jar
    org.apache.xbean/xbean-finder//jar=org.apache.xbean/xbean-finder/3.6/jar
    
{code} # Download
  1. Download openejb-core-3.0.1.jar
  1. from
[
  1. this
  1. link
|http://cwiki.apache.org/confluence/download/attachments/106639/openejb-core-3.0.1.jar]
  1. and
  1. replace
  1. <GERONIMO_HOME>\repository\org\apache\openejb\openejb-core\3.0.1\openejb-core-3.0.1.jar.
  1. Note:
  1. This
  1. jar
  1. is
  1. patched
  1. to
  1. account
  1. for
[
  1. OPENEJB-1005
|https://issues.apache.org/jira/browse/OPENEJB-1005]. h3. Installing on Geronimo Jetty server Follow the steps below to install the plugin on Geronimo
  1. . (not needed for Geronimo 2.1.5)

Installing on Geronimo Jetty server

Follow the steps below to install the plugin on Geronimo v2.1.4

with

Jetty

as

the

web

container.

#

  1. Edit
  1. <GERONIMO_HOME>\var\config\config.xml
#*
    • Add
    • the
    • gbean
    • xml-fragment
    • given
    • in
    • Listing-3
    • under
    • "org.apache.geronimo.configs/jetty6-deployer/2.1.4/car"
    • module.
#*
    • Add
    • the
    • gbean
    • xml-fragment
    • given
    • in
    • Listing-2
    • under
    • "org.apache.geronimo.configs/openejb-deployer/2.1.4/car"
    • module.
{
    • Note
}
    • If

    • you

    • are

    • starting

    • with

    • a

    • fresh

    • Geronimo

    • Jetty

    • 2.1.4

    • server,

    • you

    • can

    • replace

    • <GERONIMO_HOME>\var\config\config.xml

    • with

    • config.xml

    • available

    • at

[
|http://cwiki.apache.org/confluence/download/attachments/106639/jetty-config
    • .

xml].
    • NEED

    • TO

    • UPDATE

    • THE

    • FILE

    • AND

LINK {note} # Start Geronimo. # Download
    • LINK

  1. Start Geronimo.
  2. Download tuscany-jetty-1.0-SNAPSHOT.car
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/tuscany-jetty/1.0-SNAPSHOT/
] #
  1. Deploy
  1. the
  1. plugin
  1. using
  1. the
  1. command
  1. "<GERONIMO_HOME>\bin\deploy
  1. install-plugin
  1. tuscany-jetty-1.0-SNAPSHOT.car".
  1. The
  1. default
  1. username/password
  1. to
  1. perform
  1. the
  1. deployment
  1. is
  1. system/manager.

  1. Listing-3:
{
  1. Code Block
}
  1. 
    <gbean name="JettyWebBuilder">
         <reference name="ModuleBuilderExtensions">
            <pattern>
                <name>TuscanyModuleBuilderExtension</name>
            </pattern>
            <pattern>
                <name>PersistenceUnitBuilder</name>
            </pattern>
            <pattern>
                <name>JspModuleBuilderExtension</name>
            </pattern>
            <pattern>
                <name>MyFacesModuleBuilderExtension</name>
            </pattern>
        </reference>
    </gbean>
    
{code} # Download
  1. Download xbean-finder-3.6.jar
  1. from
[
  1. http://repo1.maven.org/maven2/org/apache/xbean/xbean-finder/3.6/xbean-finder-3.6.jar
]
  1. and
  1. save
  1. to
  1. <GERONIMO_HOME>\repository\org\apache\xbean\xbean-finder\3.6\
#
  1. Add
  1. the
  1. text
  1. in
  1. Listing-2B
  1. to
  1. <GERONIMO_HOME>\var\config\artifact-aliases.properties
#
  1. Download
  1. openejb-core-3.0.1.jar
  1. from
[
  1. this
  1. link
|http://cwiki.apache.org/confluence/download/attachments/106639/openejb-core-3.0.1.jar]
  1. and
  1. replace
  1. <GERONIMO_HOME>\repository\org\apache\openejb\openejb-core\3.0.1\openejb-core-3.0.1.jar.
  1. Note:
This jar is patched to account for [OPENEJB-1005|https://issues.apache.org/jira/browse/
  1. This jar is patched to account for OPENEJB-1005
]
  1. .
h3.

Building

the

plugin

from

source

and

installing

the

plugin

{
Note
}

This

section

assumes

that

you

have

Subversion

and

Maven2

installed.

{note}

If

you

want

to

build

the

plugin

from

source

and

then

install

the

plugin

in

Geronimo

server,

follow

the

steps

below.

#

  1. Checkout
  1. the
  1. plugin
  1. source
  1. from
[
  1. http://svn.apache.org/repos/asf/geronimo/plugins/tuscany/trunk/
] #
  1. Open
  1. a
  1. command
  1. window
  1. and
  1. change
  1. to
  1. the
  1. directory
  1. to
  1. which
  1. source
  1. is
  1. checked
  1. out.
#
  1. Build
  1. the
  1. plugin
  1. using
  1. the
  1. command
  1. "mvn
  1. install"
#
  1. Edit
  1. <GERONIMO_HOME>\var\config\config.xml
#*
    • In
    • Geronimo
    • Tomcat
    • v2.1.4
    • server
#**
      • Add
      • the
      • gbean
      • xml-fragment
      • given
      • in
      • Listing-1
      • under
      • "org.apache.geronimo.configs/tomcat6-deployer/2.1.4/car"
      • module.
#**
      • Add
      • the
      • gbean
      • xml-fragment
      • given
      • in
      • Listing-2
      • under
      • "org.apache.geronimo.configs/openejb-deployer/2.1.4/car"
      • module.
#*
    • In
    • Geronimo
    • Jetty
    • v2.1.4
    • server
#**
      • Add
      • the
      • gbean
      • xml-fragment
      • given
      • in
      • Listing-3
      • under
      • "org.apache.geronimo.configs/jetty6-deployer/2.1.4/car"
      • module.
#**
      • Add
      • the
      • gbean
      • xml-fragment
      • given
      • in
      • Listing-2
      • under
      • "org.apache.geronimo.configs/openejb-deployer/2.1.4/car"
      • module.
#
  1. Start
  1. the
  1. Geronimo
  1. server.
#
  1. Access
[
  1. http://localhost:8080/console
]
  1. and
  1. navigate
  1. to
  1. "Plugins"
  1. portlet.
#
  1. Click
  1. "Add
  1. Repository"
  1. link
  1. under
  1. Install
  1. Geronimo
  1. Plugins
  1. section.
#
  1. Enter
  1. the
  1. URL
  1. of
  1. your
  1. local
  1. maven2
  1. repository
  1. and
  1. click
  1. "Add
  1. Repository"
  1. button.
#*
    • For
    • example,
    • if
    • your
    • local
    • maven2
    • repository
    • directory
    • is
    • D:\m2repo
    • use
    • the
    • URL
[
    • file:/D:/m2repo
] #
  1. In
  1. the
  1. "Repository"
  1. dropdown
  1. list,
  1. select
  1. your
  1. local
  1. maven2
  1. repository
  1. added
  1. in
  1. the
  1. previous
  1. step
  1. and
  1. click
  1. "Show
  1. Plugins
  1. in
  1. selected
  1. repository"
  1. button.
#
  1. Select
  1. "Geronimo
  1. ::
  1. Tuscany
  1. Plugin
  1. for
  1. Geronimo
  1. Tomcat"
  1. ("Geronimo
  1. ::
  1. Tuscany
  1. Plugin
  1. for
  1. Geronimo
  1. Jetty"
  1. in
  1. case
  1. of
  1. Geronimo
  1. Jetty
  1. server)
  1. and
  1. click
*
  1. Install
*
  1. .
#
  1. In
  1. the
  1. plugin
  1. information
  1. page,
  1. click
*
  1. Install
*
  1. to
  1. complete
  1. the
  1. plugin
  1. installation.
Note

If your plugin installation failed in an earlier attempt, make sure that "System Modules" portlet does not list

{note} If your plugin installation failed in an earlier attempt, make sure that "System Modules" portlet does not list

"org.apache.geronimo.plugins/tuscany-tomcat/1.0-SNAPSHOT/car"

or

"org.apache.geronimo.plugins/tuscany-jetty/1.0-SNAPSHOT/car"

configuration.

If

there

is

one

such

entry,

uninstall

it

by

clicking

on

"Uninstall"

link.

{note} {note} If you want latest plugin and tuscany dependency jars to be installed during plugin installation, make sure you delete

Note

If you want latest plugin and tuscany dependency jars to be installed during plugin installation, make sure you delete <GERONIMO_HOME>/repository/org/apache/geronimo/plugins/geronimo-tuscany

\

*

folders

and

<GERONIMO_HOME>/repository/org/apache/tuscany/sca

folder

are

deleted

before

you

proceed

with

the

installation.

{note} h2. {anchor:Sample Applications}{bgcolor:#C3CDA1}Sample Applications{bgcolor} h3. {anchor:Deploy helloworld Application}{bgcolor:#C3CDA1}Deploy helloworld Application{bgcolor} We have a sample sca contribution

Anchor
Sample Applications
Sample Applications

Background Color
color#C3CDA1
Sample Applications

Anchor
Deploy helloworld Application
Deploy helloworld Application

Background Color
color#C3CDA1
Deploy helloworld Application

We have a sample sca contribution (helloworld-service)

that

has

three

Helloworld

service

components.

The

JSP,

Servlet

and

EJB

samples

access

the

services

provided

by

this

contribution.

Follow

the

steps

below

to

deploy

the

helloworld-service.

#

  1. Download
  1. helloworld-service-1.0-SNAPSHOT.jar
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/helloworld-service/1.0-SNAPSHOT/
] # Access [
  1. Access http://localhost:8080/console
]
  1. and
  1. navigate
  1. to
  1. "Deploy
  1. New"
  1. portlet.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. helloworld-service-1.0-SNAPSHOT.jar
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. install
  1. the
  1. sca
  1. contribution.
h3. {anchor:Access helloworld From JSP}{bgcolor:#C3CDA1}Access helloworld From JSP{bgcolor} The sample web application helloworld-jsp has a JSP that defines an SCA reference using SCA JSP tag library. The reference is wired in web.composite. The reference is injected at runtime. Follow the steps below to run the sample application. # Download

Anchor
Access helloworld From JSP
Access helloworld From JSP

Background Color
color#C3CDA1
Access helloworld From JSP

The sample web application helloworld-jsp has a JSP that defines an SCA reference using SCA JSP tag library. The reference is wired in web.composite. The reference is injected at runtime.

Follow the steps below to run the sample application.

  1. Download helloworld-jsp-1.0-SNAPSHOT.war
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/helloworld-jsp/1.0-SNAPSHOT/
]
  1. and
  1. save
  1. as
  1. helloworld-jsp.war.
#
  1. Access
[
  1. http://localhost:8080/console
]
  1. and
  1. navigate
  1. to
  1. "Deploy
  1. New"
  1. portlet.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. helloworld-jsp.war
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. install
  1. the
  1. web
  1. application.
#
  1. Access
[
  1. http://localhost:8080/helloworld-jsp/
] h3. {anchor:Access helloworld From Servlet}{bgcolor:#C3CDA1}Access helloworld From Servlet{bgcolor} The sample web application helloworld-servlet has a HelloworldServlet with @Reference, @Property, @Context and @ComponentName annotations. The references are wired in web.composite. The annotated fields are injected at runtime. Follow the steps below to run the sample application. # Download

Anchor
Access helloworld From Servlet
Access helloworld From Servlet

Background Color
color#C3CDA1
Access helloworld From Servlet

The sample web application helloworld-servlet has a HelloworldServlet with @Reference, @Property, @Context and @ComponentName annotations. The references are wired in web.composite. The annotated fields are injected at runtime.

Follow the steps below to run the sample application.

  1. Download helloworld-servlet-1.0-SNAPSHOT.war
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/helloworld-servlet/1.0-SNAPSHOT/
]
  1. and
  1. save
  1. as
  1. helloworld-servlet.war
#
  1. Access
[
  1. http://localhost:8080/console
]
  1. and
  1. navigate
  1. to
  1. "Deploy
  1. New"
  1. portlet.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. helloworld-servlet.war
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. install
  1. the
  1. web
  1. application.
#
  1. Access
[
  1. http://localhost:8080/helloworld-servlet/
] h3. {anchor:Access helloworld From a session EJB}{bgcolor:#C3CDA1}anchor:Access helloworld From a session EJB{bgcolor} The sample EJB application helloworld-ejb has a Stateless session bean HelloworldServiceBean with @Reference, @Property, @Context and @ComponentName annotations. The references are wired in

Anchor
Access helloworld From a session EJB
Access helloworld From a session EJB

Background Color
color#C3CDA1
anchor:Access helloworld From a session EJB

The sample EJB application helloworld-ejb has a Stateless session bean HelloworldServiceBean with @Reference, @Property, @Context and @ComponentName annotations. The references are wired in ejb-jar.composite.

The

annotated

fields

are

injected

at

runtime.

The

sample

web

application

helloworld-web

has

a

HelloworldEjbServlet

that

invokes

HelloworldServiceBean.

Follow

the

steps

below

to

run

the

sample

application.

#

  1. Download
  1. helloworld-ejb-1.0-SNAPSHOT.jar
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/helloworld-ejb/1.0-SNAPSHOT/
] #
  1. Download
  1. helloworld-web-1.0-SNAPSHOT.war
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/helloworld-web/1.0-SNAPSHOT/
]
  1. and
  1. save
  1. as
  1. helloworld-web.war.
#
  1. Access
[
  1. http://localhost:8080/console
]
  1. and
  1. navigate
  1. to
  1. "Deploy
  1. New"
  1. portlet.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. helloworld-ejb-1.0-SNAPSHOT.jar
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. install
  1. the
  1. ejb
  1. application.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. helloworld-web.war
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. install
  1. the
  1. web
  1. application.
#
  1. Access
[
  1. http://localhost:8080/helloworld-web/
] h2. Access an SCA service from an MDB The sample EJB application

Access an SCA service from an MDB

The sample EJB application helloworld-mdb-ejb

has

a

message-driven-bean

HelloworldMDB

that

listens

on

a

JMS

queue

named

NamesQueue.

HelloworldMDB

has

@Reference,

@Property,

@Context

and

@ComponentName

annotations.

The

references

are

wired

in

ejb-jar.composite.

The

annotated

fields

are

injected

at

runtime.

The

sample

web

application

helloworld-mdb-web

has

a

HelloworldMdbServlet

that

sends

the

name

entered

in

the

webpage

as

a

message

to

the

NamesQueue.

Output

from

HelloworldMDB

can

be

seen

in

Geronimo

console

window.

Follow

the

steps

below

to

run

the

sample

application.

#

  1. Download
[
  1. jms-resources.xml
|http://cwiki.apache.org/confluence/download/attachments/106639/jms-resources.xml] # Download
  1. Download helloworld-mdb-ejb-1.0-SNAPSHOT.jar
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/helloworld-mdb-ejb/1.0-SNAPSHOT/
] #
  1. Download
  1. helloworld-mdb-web-1.0-SNAPSHOT.war
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/helloworld-mdb-web/1.0-SNAPSHOT/
] # Access [
  1. Access http://localhost:8080/console
]
  1. and
  1. navigate
  1. to
  1. "Deploy
  1. New"
  1. portlet.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. <GERONIMO_HOME>\repository\org\apache\geronimo\modules\geronimo-activemq-ra\2.1.4\geronimo-activemq-ra-2.1.4.rar
#
  1. In
  1. the
*
  1. Plan
*
  1. field,
  1. select
  1. jms-resources.xml
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. complete
  1. creating
  1. JMS
  1. resources.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. helloworld-mdb-ejb-1.0-SNAPSHOT.jar
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. install
  1. the
  1. ejb
  1. application.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. helloworld-mdb-web-1.0-SNAPSHOT.war
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. install
  1. the
  1. web
  1. application.
#
  1. Access
[
  1. http://localhost:8080/helloworld-mdb-web/
] h2. Access an SCA service from a Filter [

Access an SCA service from a Filter

*Note:

explain

why

this

is

useful

from

user's

prespective.

Would

users

do

this?

]

The

sample

web

application

helloworld-filter

has

a

filter

HelloworldFilter

with

@Reference,

@Property,

@Context

and

@ComponentName

annotations.

The

references

are

wired

in

web.composite.

The

annotated

fields

are

injected

at

runtime.

Follow

the

steps

below

to

run

the

sample

application.

#

  1. Download
  1. helloworld-filter-1.0-SNAPSHOT.war
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/helloworld-filter/1.0-SNAPSHOT/
] # Access [
  1. Access http://localhost:8080/console
]
  1. and
  1. navigate
  1. to
  1. "Deploy
  1. New"
  1. portlet.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. helloworld-filter-1.0-SNAPSHOT.war
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. install
  1. the
  1. web
  1. application.
#
  1. Access
[
  1. http://localhost:8080/helloworld-filter/
] h2. Access an SCA service from an Event Listener [

Access an SCA service from an Event Listener

*Note:

explain

why

users

would

od

this?*

]

The

sample

web

application

helloworld-listener

has

a

ServletContextListener,

a

ServletContextAttributeListener,

a

ServletRequestListener,

a

ServletRequestAttributeListener,

an

HttpSessionListener,

and

an

HttpSessionAttributeListener

with

@Reference,

@Property,

@Context

and

@ComponentName

annotations.

The

references

are

wired

in

web.composite.

The

annotated

fields

are

injected

at

runtime.

Follow

the

steps

below

to

run

the

sample

application.

#

  1. Download
  1. helloworld-listener-1.0-SNAPSHOT.war
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/helloworld-listener/1.0-SNAPSHOT/
] # Access [
  1. Access http://localhost:8080/console
]
  1. and
  1. navigate
  1. to
  1. "Deploy
  1. New"
  1. portlet.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. helloworld-listener-1.0-SNAPSHOT.war
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. install
  1. the
  1. web
  1. application.
#
  1. Access
[
  1. http://localhost:8080/helloworld-listener/
] h2. Access an SCA service from a JSF managed bean The sample JSF application helloworld-jsf has a controller class HelloWorldController with @Reference, @Property, @Context and @ComponentName annotations. The references are wired in web.composite. The annotated fields are injected at runtime. Follow the steps below to run the sample application. # Download

Access an SCA service from a JSF managed bean

The sample JSF application helloworld-jsf has a controller class HelloWorldController with @Reference, @Property, @Context and @ComponentName annotations. The references are wired in web.composite. The annotated fields are injected at runtime.

Follow the steps below to run the sample application.

  1. Download helloworld-jsf-1.0-SNAPSHOT.war
  1. from
[
  1. http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/plugins/helloworld-jsf/1.0-SNAPSHOT/
] # Access [
  1. Access http://localhost:8080/console
]
  1. and
  1. navigate
  1. to
  1. "Deploy
  1. New"
  1. portlet.
#
  1. In
  1. the
*
  1. Archive
*
  1. field,
  1. select
  1. helloworld-jsf-1.0-SNAPSHOT.war
  1. downloaded
  1. above.
#
  1. Click
*
  1. Install
*
  1. to
  1. install
  1. the
  1. web
  1. application.
#
  1. Access
[
  1. http://localhost:8080/helloworld-jsf/
] h2. A sample that demonstrates a mix of the above features -- IN PROGRESS This sample demonstrates the following features: # An SCA reference in a JSP is wired to an (external) webservice using binding.ws # An SCA reference in a servlet is injected with proxy to a service provided by a regular SCA component which is within the web application. # References in the regular SCA component are wired to other components in the SCA domain and to external webservice using binding.ws # SCA references injected into a session bean.

A sample that demonstrates a mix of the above features – IN PROGRESS

This sample demonstrates the following features:

  1. An SCA reference in a JSP is wired to an (external) webservice using binding.ws
  2. An SCA reference in a servlet is injected with proxy to a service provided by a regular SCA component which is within the web application.
  3. References in the regular SCA component are wired to other components in the SCA domain and to external webservice using binding.ws
  4. SCA references injected into a session bean.