FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
tutorial/cdi-basic013.html at gh-pages · javaee/tutorial · GitHub
This repository was archived by the owner on Jan 28, 2019. It is now read-only.
javaee
tutorial
Repository navigation
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
tutorial
/
cdi-basic013.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
130 lines (118 loc) · 4.08 KB
Breadcrumbs
tutorial
/
cdi-basic013.html
Copy path
File metadata and controls
130 lines (118 loc) · 4.08 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html
>
<
html
lang
="
en
"
>
<
head
>
<
meta
charset
="
utf-8
"
/>
<
title
>
Configuring a CDI Application
</
title
>
<
meta
name
="
viewport
"
content
="
width=device-width, initial-scale=1.0
"
>
<
link
href
="
css/style.css
"
rel
="
stylesheet
"
>
<
script
src
="
https://use.fontawesome.com/96c4d89611.js
"
>
</
script
>
</
head
>
<
body
>
<
table
id
="
doc-title
"
cellspacing
="
0
"
cellpadding
="
0
"
>
<
tr
>
<
td
align
="
left
"
valign
="
top
"
>
<
b
>
Java Platform, Enterprise Edition (Java EE) 8
</
b
>
<
br
/>
<
b
>
The Java EE Tutorial
</
b
>
<!-- <p class="beta">Beta Draft (Pre-General Availability)</p> -->
</
td
>
</
tr
>
</
table
>
<
hr
/>
<
table
width
="
90%
"
id
="
top-nav
"
cellspacing
="
0
"
cellpadding
="
0
"
>
<
colgroup
>
<
col
width
="
12%
"
/>
<
col
width
="
12%
"
/>
<
col
width
="
*
"
/>
</
colgroup
>
<
tr
>
<
td
align
="
left
"
>
<
a
href
="
cdi-basic012.html
"
>
<
span
class
="
vector-font
"
>
<
i
class
="
fa fa-arrow-circle-left
"
aria-hidden
="
true
"
>
</
i
>
</
span
>
<
span
style
="
position:relative;top:-2px;
"
>
Previous
</
span
>
</
a
>
</
td
>
<
td
align
="
left
"
>
<
a
href
="
cdi-basic014.html
"
>
<
span
class
="
vector-font
"
>
<
i
class
="
fa fa-arrow-circle-right vector-font
"
aria-hidden
="
true
"
>
</
i
>
</
span
>
<
span
style
="
position:relative;top:-2px;
"
>
Next
</
span
>
</
a
>
</
td
>
<
td
align
="
right
"
>
<
a
href
="
toc.html
"
>
<
span
class
="
vector-font
"
>
<
i
class
="
fa fa-list vector-font
"
aria-hidden
="
true
"
>
</
i
>
</
span
>
<
span
style
="
position:relative;top:-2px;
"
>
Contents
</
span
>
</
a
>
</
td
>
</
tr
>
</
table
>
<
div
id
="
preamble
"
>
<
div
class
="
sectionbody
"
>
<
div
class
="
paragraph
"
>
<
p
>
<
a
id
="
GJBNZ
"
>
</
a
>
<
a
id
="
configuring-a-cdi-application
"
>
</
a
>
</
p
>
</
div
>
</
div
>
</
div
>
<
div
class
="
sect1
"
>
<
h2
id
="
_configuring_a_cdi_application
"
>
Configuring a CDI Application
</
h2
>
<
div
class
="
sectionbody
"
>
<
div
class
="
paragraph
"
>
<
p
>
When your beans are annotated with a scope type, the server recognizes
the application as a bean archive and no additional configuration is
required. The possible scope types for CDI beans are listed in
<
a
href
="
cdi-basic008.html#GJBBK
"
>
Using Scopes
</
a
>
.
</
p
>
</
div
>
<
div
class
="
paragraph
"
>
<
p
>
CDI uses an optional deployment descriptor named
<
code
>
beans.xml
</
code
>
. Like other
Java EE deployment descriptors, the configuration settings in
<
code
>
beans.xml
</
code
>
are used in addition to annotation settings in CDI classes.
The settings in
<
code
>
beans.xml
</
code
>
override the annotation settings if there is
a conflict. An archive must contain the
<
code
>
beans.xml
</
code
>
deployment
descriptor only in certain limited situations, described in
<
a
href
="
cdi-adv.html#GJEHI
"
>
Chapter 27, "Contexts and Dependency Injection
for Java EE: Advanced Topics"
</
a
>
.
</
p
>
</
div
>
<
div
class
="
paragraph
"
>
<
p
>
For a web application, the
<
code
>
beans.xml
</
code
>
deployment descriptor, if
present, must be in the
<
code
>
WEB-INF
</
code
>
directory. For EJB modules or JAR
files, the
<
code
>
beans.xml
</
code
>
deployment descriptor, if present, must be in the
<
code
>
META-INF
</
code
>
directory.
</
p
>
</
div
>
</
div
>
</
div
>
<
hr
/>
<
table
width
="
90%
"
id
="
bottom-nav
"
cellspacing
="
0
"
cellpadding
="
0
"
>
<
colgroup
>
<
col
width
="
12%
"
/>
<
col
width
="
12%
"
/>
<
col
width
="
*
"
/>
</
colgroup
>
<
tr
>
<
td
align
="
left
"
>
<
a
href
="
cdi-basic012.html
"
>
<
span
class
="
vector-font
"
>
<
i
class
="
fa fa-arrow-circle-left
"
aria-hidden
="
true
"
>
</
i
>
</
span
>
<
span
style
="
position:relative;top:-2px;
"
>
Previous
</
span
>
</
a
>
</
td
>
<
td
align
="
left
"
>
<
a
href
="
cdi-basic014.html
"
>
<
span
class
="
vector-font
"
>
<
i
class
="
fa fa-arrow-circle-right vector-font
"
aria-hidden
="
true
"
>
</
i
>
</
span
>
<
span
style
="
position:relative;top:-2px;
"
>
Next
</
span
>
</
a
>
</
td
>
<
td
align
="
right
"
>
<
a
href
="
toc.html
"
>
<
span
class
="
vector-font
"
>
<
i
class
="
fa fa-list vector-font
"
aria-hidden
="
true
"
>
</
i
>
</
span
>
<
span
style
="
position:relative;top:-2px;
"
>
Contents
</
span
>
</
a
>
</
td
>
</
tr
>
</
table
>
<
span
id
="
copyright
"
>
<
a
href
="
img/cpyr.adoc
"
>
<
img
src
="
img/oracle.gif
"
height
="
10px
"
alt
="
Oracle Logo
"
/>
<
span
>
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
</
span
>
</
a
>
</
span
>
<!--<p align="center" class="beta">Beta Draft (Pre-General Availability)</p> -->
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL