File: j2ee-integration.html

package info (click to toggle)
turbine 20010419-1
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 17,460 kB
  • ctags: 7,501
  • sloc: java: 41,929; xml: 12,430; sql: 637; sh: 90; makefile: 50
file content (300 lines) | stat: -rw-r--r-- 13,872 bytes parent folder | download
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!-- Content Stylesheet for Site -->

        
<!-- start the processing -->
    <!-- ====================================================================== -->
    <!-- Main Page Section -->
    <!-- ====================================================================== -->
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

                                                    <meta name="author" value="Jon S. Stevens">
            <meta name="email" value="jon@latchkey.com">
                                        <meta name="author" value="Chris C. Kimpton">
            <meta name="email" value="KimptonC@rabo-bank.com">
            
            <title>Turbine - J2EE Integration</title>
        </head>

        <body bgcolor="#ffffff" text="#000000" link="#525D76">        
            <table border="0" width="100%" cellspacing="0">
                <!-- TOP IMAGE -->
                <tr>
                    <td align="left">
<a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" border="0"/></a>
</td>
<td align="right">
<a href="http://jakarta.apache.org/turbine/"><img src="./images/logo.gif" alt="Turbine" border="0"/></a>
</td>
                </tr>
            </table>
            <table border="0" width="100%" cellspacing="4">
                <tr><td colspan="2">
                    <hr noshade="" size="1"/>
                </td></tr>
                
                <tr>
                    <!-- LEFT SIDE NAVIGATION -->
                    <td valign="top" nowrap="true">
                                <p><strong>Essentials</strong></p>
        <ul>
                    <li>    <a href="./index.html">Overview</a>
</li>
                    <li>    <a href="./features.html">Features</a>
</li>
                    <li>    <a href="./fsd.html">Specification</a>
</li>
                    <li>    <a href="./project-map.html">Project map</a>
</li>
                    <li>    <a href="./install.html">Installation</a>
</li>
                    <li>    <a href="./getting-started.html">Getting Started</a>
</li>
                    <li>    <a href="./changes.html">Changes</a>
</li>
                    <li>    <a href="./other-docs.html">Other Documentation</a>
</li>
                </ul>
            <p><strong>Models</strong></p>
        <ul>
                    <li>    <a href="./pullmodel.html">Pull MVC Model</a>
</li>
                    <li>    <a href="./model2+1.html">Model 2+1</a>
</li>
                    <li>    <a href="./j2ee-integration.html">J2EE Integration</a>
</li>
                </ul>
            <p><strong>Get Involved</strong></p>
        <ul>
                    <li>    <a href="./turbine-documentation-project.html">Turbine Documentation</a>
</li>
                    <li>    <a href="./code-standards.html">Coding Spec</a>
</li>
                    <li>    <a href="./contributors.html">Contributors</a>
</li>
                    <li>    <a href="./branches.html">CVS Branches</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/cvsindex.html">CVS Repos</a>
</li>
                    <li>    <a href="./faq.html">FAQ</a>
</li>
                    <li>    <a href="./license.html">License</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
</li>
                    <li>    <a href="./powered.html">Powered by Turbine</a>
</li>
                    <li>    <a href="./todo.html">Todo</a>
</li>
                    <li>    <a href="./active-developers.html">Active Developers</a>
</li>
                    <li>    <a href="./proposals.html">Proposals</a>
</li>
                </ul>
            <p><strong>Documentation</strong></p>
        <ul>
                    <li>    <a href="./action-event.html">Action Events</a>
</li>
                    <li>    <a href="./services.html">Services</a>
</li>
                    <li>    <a href="./security.html">Turbine and Security</a>
</li>
                    <li>    <a href="./python.html">Turbine and Python</a>
</li>
                    <li>    <a href="./jsp-configuration.html">Turbine and JSP</a>
</li>
                    <li>    <a href="./velocity-site.html">Velocity Site</a>
</li>
                    <li>    <a href="./context-howto.html">Velocity Context</a>
</li>
                    <li>    <a href="./webmacro-site.html">Webmacro Site</a>
</li>
                </ul>
            <p><strong>Database</strong></p>
        <ul>
                    <li>    <a href="./peers.html">Peers</a>
</li>
                    <li>    <a href="./advpeers.html">Advanced Peers</a>
</li>
                    <li>    <a href="./advcriteria.html">Advanced Criteria</a>
</li>
                    <li>    <a href="./torque.html">Torque</a>
</li>
                    <li>    <a href="./turbine-schema.html">Core Schema</a>
</li>
                    <li>    <a href="./db-adapters.html">DB Adapters</a>
</li>
                    <li>    <a href="./postgres-howto.html">Postgres Howto</a>
</li>
                    <li>    <a href="./oracle-howto.html">Oracle 8i Howto</a>
</li>
                    <li>    <a href="./sybase-howto.html">Sybase Howto</a>
</li>
                </ul>
                        </td>
                    <td align="left" valign="top">
                                                                    <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#525D76">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="J2EE Integration"><strong>J2EE Integration</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <blockquote>
                                    <p>
This document serves to answer a few common questions about integration
of Turbine with J2EE technologies. The short answer is that it is all 
Java code and you can choose to use Turbine's solutions to some things
or you can choose to use J2EE solutions to some things. Turbine is 
increasingly flexible about what parts you choose to use and what parts
you don't. The reason is because there has been quite a lot of de coupling
of the various Turbine components as a result of years of development
and use by people all over the world in various different ways. Wow, 
isn't that cool?
</p>
                                                <p><strong>What is J2EE?</strong></p>
                                                <p>
Many Java technology extensions, including - Servlets, EJB, Swing, JMS,
Transactions, JNDI, XML, JDBC, JSP, Security
</p>
                                                <p><strong>How does Turbine work with ... Servlets?</strong></p>
                                                <p>
It is a servlet. It is also a set of re-usable components assembled into
a framework. You can choose to work with just the Servlet, you can
choose to work with just the components or you can choose to work with
both. In a lot of normal development cases, people start off with a
simple servlet and tack on various components (like Connection Pooling,
Cron Schedulers, User Management, Services, etc.). That is what we have
done as well, however we have done it in such a way that it is very
pluggable. Mix and match and use what you want to use. Ignore the rest.
</p>
                                                <p><strong>How does Turbine work with ... EJB?</strong></p>
                                                <p>
Turbine provides a framework for developing web applications -
specifically the front end. EJB provides a framework for developing
n-tier applications - specifically the back ends - thus Turbine and EJB
complement each other well at that level.
</p>
                                                <p><strong>How does Turbine work with ... Swing?</strong></p>
                                                <p>
Turbine is the for the web - Swing is not - not applicable.
</p>
                                                <p><strong>How does Turbine work with ... JMS?</strong></p>
                                                <p>
Turbine provides facilities for plugging in other Services - and thus
JMS could be plugged in as a service to that. Even if it isn't plugged
in through Turbine's Services facilities, you can still put your JMS
related methods into your code. Turbine doesn't prevent you from calling
other Java code.
</p>
                                                <p><strong>How does Turbine work with ... Transactions?</strong></p>
                                                <p>
There is nothing in Turbine explicitly using the JTS/JTA - but can use
EJB and hence these technologies. That belongs in EJB's anyways. :-)
</p>
                                                <p><strong>How does Turbine work with ... JNDI?</strong></p>
                                                <p>
Turbine provides access to JNDI via a Service facility. You can always
choose to implement your own facility as well (ie: if you have an
existing code base that you would like to use, Turbine does not stop you
from using it).
</p>
                                                <p><strong>How does Turbine work with ... XML?</strong></p>
                                                <p>
Turbine provides support for using and working with XML. Again, nothing
preventing you from using XML within Turbine or even sending XML out 
of Turbine.
</p>
                                                <p><strong>How does Turbine work with ... JDBC?</strong></p>
                                                <p>
Turbine provides good support for working with JDBC through the <a href="http://share.whichever.com/village/">Village API</a>, the <a href="torque.html">Torque Object Relational Tool</a> and its connection
pooling facilities. The connection pool is not yet fully J2EE
"compatible" in that it does not support DataSources. However, at some
point we may choose to implement that. Note, again, Turbine does not
prevent you from using your own Connection pooling mechanism, we simply
created one because at the time, we needed one and ours works just fine.
</p>
                                                <p><strong>How does Turbine work with ... JSP?</strong></p>
                                                <p>
Turbine provides excellent support for using JSP in its model of working
- which is based on the Model 2 style with enhancements, such as solving
the Action portion of the Model. However, we <a href="http://jakarta.apache.org/velocity/ymtd/ymtd.html">strongly
suggest</a> that you do not use JSP and seek out other alternatives.
</p>
                                                <p><strong>How does Turbine work with ... Security?</strong></p>
                                                <p>
Turbine was created long before J2EE was created. Therefore, we needed
to implement our own Security Model. This model is based on Users,
Roles, Permissions and Object Groups. It is an Access Control List (ACL)
based security scheme and can grow to support nearly any level of access
control people can come up with. It follows our extensible design
pattern and you can use Turbine's code as the basis for any additional
security your application requires.
</p>
                                                <p><strong>How does Turbine work with ... container managed security?</strong></p>
                                                <p>
You can use container managed security if you wish, and Turbine provides you with
mechanism for application manged security, in case you need them.
</p>
                                                <p>
The main problem with container managed security is that it cannot be managed
from the inside of the application. Whenever you want to add/remove users to
your application (or suite of them) or want to modify user's roles, you need
to use whatever tool your application server provides for that.
</p>
                                                <p>
Now, this could work just fine for closed-public applications and intranets,
but would be really unacceptable on open-public sites, where the users need
the ability to register and receive 'accounts' without human interaction.
</p>
                                                <p>
Currently Turbine supports the latter model - application managed security.
This is because if it didn't have it, many people would have to write code
to provide it. That's why we created SecurityService in a cooperative effort.
</p>
                                                <p>
On the other hand, you don't need to write any code to use declarative
container managed security. You can restrict access to the Turbine
servlet with the usual web.xml magic. If you wish to use programmatic 
container managed security code, there is relatively very little code to write.
You need to create your own SecureScreens (probably extending VelocityScreen)
and SecureActions that contained code that calls the <code>HttpServletRequest 
getUserPrincipal</code> and <code>isUserInRole</code> methods.
above.
</p>
                            </blockquote>
      </td></tr>
    </table>
                                        </td>
                </tr>

                <!-- FOOTER -->
                <tr><td colspan="2">
                    <hr noshade="" size="1"/>
                </td></tr>
                <tr><td colspan="2">
                    <div align="center"><font color="#525D76" size="-1"><em>
                    Copyright &#169; 1999-2001, Apache Software Foundation
                    </em></font></div>
                </td></tr>
            </table>
        </body>
    </html>
<!-- end the processing -->