Technische Berichte
des Hasso-Plattner-Instituts
fr Softwaresystemtechnik an der Universitt Potsdam
Mai 2006
Redaktion
EMail
Vertrieb:
Universittsverlag Potsdam
Postfach 60 15 53
14415 Potsdam
Fon +49 (0) 331 977 4517
Fax +49 (0) 331 977 4625
e-mail: ubpub@rz.uni-potsdam.de
http://info.ub.uni-potsdam.de/verlag.htm
Druck
allprintmedia gmbH
Blomberger Weg 6a
13437 Berlin
email: info@allprint-media.de
Contents
1
Introduction
1.1 The Seminar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1
1
The Clustering Concept of the SAP Web Application Server (Torben Schreiter)
15
23
29
37
Profiling, Monitoring and Tracing in the SAP Web Application Server (Johannes Passing)
45
55
63
10 Enterprise Java Beans and their Deployment using SAP NetWeaver (Ralf Gldemeister)
73
11 Web Services and the SAP Web Application Server (Johannes Nicolai)
81
91
101
107
117
16 J2EE Persistence Mechanisms of the SAP Web Application Server (Bernd Schufele)
125
135
143
153
20 SAP NWDI: Entwicklung durch mehrere Team mit Hilfe von Tracks (Stefan Httenrauch)
163
Abstract
1
1.1
Introduction
The Seminar
The Seminar System Modeling intends to let students in the 4th semester get experience in modeling
systems and transferring this knowledge. Beginning in 2002, each seminar focused on a real product
or technology domain which had to be analyzed,
modeled and explained. In 2005, the general topic
given to the students was the SAP Web Application
Server Java and the according technology concepts.
A student had to study the given information
sources, find other sources, analyze and work with
the product, create models, and structure and create a presentation. At this point, one week before
the presentation in the seminar, the student had to
show the presentation slides, especially the models,
to us, the supervisors of the seminar. We usually
asked many questions and gave hints regarding the
didactical quality of the presentation and the understandability of the models. This session took about
one hour and turned out to be an important means
to teach modeling.
The presentation in the seminar was limited to 25
minutes, which often forced the students to abstract
carefully and therefore let them choose which was
really important about a topic. The question and
answers session after the presentation made obvious how well a topic was understood by both the
presenter as by the audience. A good presentation
provokes good questions which go into details. Last
part of the Q&A session were remarks and hints to
presentation style and modeling decisions.
Within two weeks after the presentation in the
seminar, a student had to prepare an elaboration
1.2
Topics
Torben Schreiter
Hasso-Plattner-Institute for Software Engineering,
University of Potsdam, Germany
torben.schreiter@hpi.uni-potsdam.de
June 2005
Abstract
Introduction
A clustering architecture, in general, is motivated by two primary aims. These are high
availability and scalability of the software system. Due to this, the applications have to be
highly distributed among a number of cluster nodes. The whole distribution should be
transparent to the users of the services [AK2].
1
There are different possibilities for an Application
Server or whole cluster node to disappear. It can disappear e.g. in consequence of a failure but it can also
disappear because of maintenance concerns. This supported facility last mentioned is called hot-swapping.
31
2.2
The SAP Central Services consist of the Message Server and the Enqueue Server. Often,
these services run on the central instance,
but there are certain possibilities to, at least,
source out the Enqueue Server to a dedicated
machine with regard to fault tolerance. These
aspects will be explained below.
The database system will not be explained
in detail since the SAP Web Application
Server abstracts from the specific third-party
database solution used.
2.1
Structure of a cluster
42
resource. When the node has finished its operation, it has to release the lock again.
The Enqueue Server, generally, locks socalled logical objects. Even though most of
these objects are related to the database (e.g.
table rows or cells), the whole locking concept
realized by the Enqueue Server is not related
to the locking mechanisms provided by the
vendor of the database system.
2.3
When the demand for the services offered increases, it is desired to be able to improve the
performance of the cluster by expanding it by
additional machines. Relatively little effort is
needed to accomplish the integration of new
cluster nodes. Basically, two steps affect the
integration:
integration into the load balancing mechanisms of the cluster
synchronization of all deployed applications
These steps are automated, which means that
often it is enough to specify the correct address of the Message Server and configure
several other initialization settings in order to
integrate the new cluster node.
Prior to the two steps mentioned above, the
J2EE-Engines have to start up. This start-up
is managed by two different kinds of (operating system) processes shown in Figure 2.
The JControl process is responsible for starting up and monitoring several JLaunch processes, which offer the actual functionality for
the role of the J2EE-Engine.
Figure 3 clarifies the dynamic structure of
the start-up procedure belonging to a J2EEEngine as depicted in Figure 2. During this
procedure different instances of JLaunch are
created. The characteristics of the JLaunch
processes can differ from each other. There
are three different types of personalities a
JLaunch process can adopt:
Enqueue Server
Bootstrapper
53
to Message Server
to ICM
3 Load balancing
to Message Server
J2EE-Engine
JLaunch
(Process)
JVM
(Dispatcher subroutine)
JControl
JLaunch
JLaunch
(Process)
(Process)
JLaunch
(Process)
JVM
JVM
JVM
(Bootstrap subroutine)
(AS subroutine)
(AS subroutine)
3.1
instance.properties
bootstrap.properties
to Enqueue Server / DB
Dispatcher
Application Server
Before adopting one of the personalities (represented by their according subroutines), the
process loads a Java-VM6 into its own context.
After that, the desired subroutine (written in
Java) is executed.
At first, JControl establishes a connection to
the Message Server. Then, one JLaunch process is spawned by JControl. It becomes the
Bootstrapper, which synchronizes all binaries
that are needed to serve client requests. Next,
it writes the file INSTANCE.PROPERTIES.
This file contains an exact definition of the
J2EE-Engine to start up, e.g. the number of AS
Processes is specified. The Bootstrapper, then,
terminates and JControl starts one JLaunch
process that becomes the J2EE-Dispatcher and
as many JLaunch processes as specified in INSTANCE.PROPERTIES to become the J2EEApplication Servers.
6
Virtual Machine
64
Demilitarized Zone
4.2
3.2
J2EE-Dispatcher
4
4.1
Failover mechanisms
Definition
Bean session failover refers to failover regarding the state of Enterprise Java Beans (EJBs).
Therefore, it takes place in the EJB-Container
which is located inside the J2EE-AS Process.
J2EE comprises different types of Enterprise
Java Beans. Entity Beans have a state that is
already persistent per definition. Hence, there
is no need to replicate them. Besides, there are
two kinds of Session Beans: the Stateful and
the Stateless Session Beans. The SAP Web AS
75
sion from the persistent medium and proceeds serving the request as usual.
4.3
86
administration structures as the parental process. The watchdog monitors the primary
process and is able to take over the control
whenever this is necessary. After the former
watchdog gains control it creates a process
that becomes the new watchdog. [SLIB]
High availability on (operating system)
process-level can be achieved by this. However, in case of e.g. a hardware failure of the
machine the SAP Web Dispatcher is running
on, the cluster is not able to receive any requests anymore. To prevent this, an additional hardware redundancy solution should
be taken into consideration.
4.3.2
If the Message Server fails, all cluster components that want to communicate are blocked
until the Message Server is operational again.
Usually, the restart of the Message Serverprocess is completed within seconds. Hence,
a temporary crash is not that problematically.
But similarly to the SAP Web Dispatcher, this
only works on level of operating system processes. To eliminate a failure of the cluster resulting from hardware malfunction of the machine that houses the Message Server, a hardware redundancy solution is inevitable. The
same applies to Enqueue Server and the central Database System.
In contrast to this, SAP provides the additional facility to use a Standalone Enqueue
Server. Since the Enqueue Service has to hold
a lock table in memory, one runs the risk that
the lock table is lost if the machine crashes. All
information about the granted locks are gone
in that case. Therefore, all applications that
owned locks have to be reset. When using the
Standalone solution instead, it is possible to
replicate the lock table and avoid data loss.
During the time the Enqueue Server is unavailable, all applications that either want to
request or release a lock are blocked until the
Enqueue Server is operational again. [SLIB]
J2EE-Dispatcher
97
ceivable:
compiled
sourcecode
IDE
packer
initial deployment
other files
Developer
undeployment
Software Deployment Manager
(GUI)
Deployer
Software Deployment Manager
(server component)
SDM Repository
Enqueue Server
lock table
J2EE-Engine
RDBMS
database
local
file system
6 Conclusion
Applying a cluster-architecture is essentially
motivated by the two primary aims scalability and high availability of the offered services.
This paper described how these aims are realized regarding the concrete example of the
Java-personality of the SAP Web Application
Server.
The two main concepts - flexible load balancing and effective fault-tolerance mechanisms
- were discussed in detail. The SAP Web AS
utilizes 2-level-based dispatching combined
with various failover mechanisms in order to
adapt quickly to changes in the availability of
cluster nodes and to provide a well-balanced
11
10 8
References
workload across all available nodes. Therefore, expanding the cluster is fairly easy to accomplish by adding new machines.
All of the mentioned activities are enabled
due to redundancy of cluster components and
aim at the users satisfaction. Thus, they are
completely transparent to the users.
The sophisticated cluster-architecture of the
SAP Web AS provides a solid technical basis
for the execution of Java Enterprise Applications if all eventualities are considered while
setting up the local cluster. Especially the Single Points of Failure have to be secured by
additional hardware redundancy solutions in
order to guarantee real high availability.
[WAS]
[JPWAS]
Karl
Kessler,
Peter
Tillert
and Panayot Dobrikov,
JavaProgrammierung mit dem SAP Web
Application Server, SAP Press/Galileo
Press, 1st Edition, 2005
[DPAT]
[SLIB]
SAP Library,
http://help.sap.com/
[SDN]
[AK1]
[AK2]
[BG2004]
Bernhard Grone,
Konzeptionelle
Patterns und ihre Darstellung, 2004
[CA2004]
11 9
Web-Browser
HTTP(S)
Web-Browser
HTTP(S)
Message Server
J2EE-Engine
(Host j)
Cluster-Node
SAP Web AS
ABAP Engine
J2EE-Engine
context
m
Request Queue
context
m
context
1
context
1
shared
memory
ABAP Dispatcher
shared
memory
(application server)
J2EE-Server Process m
(application server)
ICM
ABAP-Engine
J2EE Dispatcher 1
J2EE-Server Process 1
(dialog instance i)
(Host j)
Cluster-Node
Request Queue
SAP Web AS
(central instance)
Enqueue Server
(locking service)
RDBMS
(JDBC-compatible)
database
1210
lock table
JLaunch
JControl
Bootstrap subroutine
(Process)
(Process)
read BOOTSTRAP.PROPERTIES
initialize settings needed for
starting up the VM
load the VM into current process
synchronize all binary data
with the database
get J2EE-Engine settings
from database and write
them to INSTANCE.PROPERTIES
read INSTANCE.PROPERTIES
JLaunch
Dispatcher startup subroutine
(Process)
JLaunch
JLaunch
AS 1 startup subroutine
(Process)
AS m startup subroutine
(Process)
start J2EE-Dispatcher
processed all
J2EE-Engine elements
in INSTANCE.PROPERTIES
Figure 3: Petri net describing the dynamic behavior of the start-up procedure of a J2EE-Engine
Client
Dispatcher
J2EE-Application Server
(Process)
determine destination-server
(dispatch)
process request
application failover
enabled
else
return result
receive result
serialize HTTP session
(storage on persistent medium)
1311
server shutdown ||
Web Container Service stopped ||
application stopped
crash
else
14
Abstract
Profiler
Classlibs
Java API
javac
Java Byte
Code
Java
Source
Code
Developer
IDE
1. Introduction
JVM
Debugger
CodeDocu
JavaDoc
15
well as JavaDoc.
2.2. javac
2.3. JavaDoc
2.4. Profiler
The Profiler component is often used together
with the debugger. Profilers are tools gathering
information about internal procedures inside the
JVM. They should implement the Java Virtual
Machine Profiler Interface (JVMPI) which is
currently not standardized.
2.5. Debugger
16
00
01
02
03
04
05
06
07
09
10
11
13
14
15
16
iconst_1
istore_1
iconst_0
istore_2
iconst_2
istore_3
iconst_3
istore 4
iload_1
iload_3
iload 4
imul
iadd
istore_2
return
GC
Thread
Frame
Pointer
OnTop
Op.Stack
PC
Vars
Pointer
Heap
JITC
Native Methods
Stack
Const. Pool
Name
Resolver
Control Unit
Method. Area
Locals
Operands
Stack
Native
Frame
Frame
ALU
I/O (OS)
Thread Controller
Type indicator
b
s
i
l
f
d
c
a
17
4.2.1. I/O-Agent
The I/O-Agent realizes the interaction with the
environment. It also provides file system access to
other components. The services provided by this
agent can be used by the programs running in the
JVM as well as by the JVM components
themselves.
18
00 iconst_1
01 istore_1
int a=1;
Operands Stack
Control Unit
c
b
c*d
a
Frame
Frame
ALU
Frame
19
6. Server JVMs
After describing basic technology approaches, this
section will describe the basic requirements
existing for server JVMs. Based upon these
requirements, the influence of the described
technology approaches, JIT compilation as well as
garbage collection, will be analyzed. This will be
done by presenting the basic ideas behind BEAJRockit. [BEAJ4E]
iconst 9
istore_2
20
7. Conclusion
Server JVM are high performance, strong
featured, reliable Java Byte Code processors. To
understand all the features provided by modern
server JVM profound knowledge about Java
Virtual Machines is needed.
Server JVMs use platform or even computer
specific characteristics to produce efficient code,
specialized on server-side requirements such as
large scale memory, multiprocessor systems as
well as a long runtime. To provide these,
approaches like adaptive garbage collection,
incremental code optimization and internal
scheduling are used.
Beside these advantages several disadvantages
like higher memory requirements, longer start up
time or less distribution have to be assessed. The
usage of server JVMs should be critically proven
for every application.
8. References
[SPEC]
http://www.spec.org/jbb2000/results/res2005q1/
State: 2005-04-28
[J2SPEC]
The Java Virtual Maschine Specification Second
Edition, Sun Microsystems Inc.
21
[Intel]
[LiMag]
http://www.intel.com/cd/ids/developer/asmona/eng/198984.htm?page=1
State: 2005-04-28
[JBoss]
[FMC]
http://www.jboss.com/products/jbossas
http://www.f-m-c.org/notationreference/download/FMC-Notation_Reference.pdf
State: 2005-04-28
[BEAJ4E]
State: 2005-05-17
[BEAMMS]
9. Appendix
1.
[JWorld]
GC
Thread
Frame
Pointer
OnTop
Op.Stack
PC
Vars
Pointer
Heap
JITC
Native Methods
Stack
Const. Pool
Name
Resolver
Control Unit
Method. Area
Locals
Operands
Stack
Native
Frame
Frame
ALU
I/O (OS)
Thread Controller
22
SAP VM Container
Andreas Blher
Seminar System Modellierung 2005
Hasso-Plattner-Institute for Software Systems Engineering
Andreas.Blueher@hpi.uni-potsdam.de
1. Architektur SAP AS
Abstract
Dieser A rtikel bietet eine Einfhrung in das
Konzept und die A rchitektur des SA P V irtual
M achine (VM) Container.
Z u Beginn stelle ich den SA P A pplication
Server vor, in dem der V M Container laufen
wird.
Danach werden A nstze erlutert, wie Java in
den A pplication Server integriert werden kann.
A bschlieend wird das Konzept des V M
Containers und zwei konkrete Implementierungsanstze vorgestellt.
Keywords: VM Container, Architektur, SAP,
Application Server
0. Einleitung
23
GC
Java Thread
Locals
Operanden
Stack
Heap
Control Unit
Const Pool
JITC
Frame
Byte Code
Processor
Meth.
Area
Native
Frame
JBC
Frame
ALU
Java Stack
Threadverwalter
I/O (OS)
Bild 1 Architektur Java VM
24
User B
JRE
JRE
JVM
JVM
Computer
App 2
App 1
25
Dispatcher
Active Workers
Worker Pool
Work Process 1
Server Data
Work Process 2
Rolled out
Rolled out
Java VM
Java VM
Active
Java VM
Active
Java VM
User Data
User Data 2
User Data 1
User Data 3
VM Data
VM Data 2
VM Data 1
VM Data 3
Inactive VMs
Work Process m
Work Process 3
New
New Java VM n
Java VM 4
VM Data
VM Data
Active VMs
New VMs
Shared Memory
Bild 3 Classic Approach
26
gesam te
Dauer
d er
Session
zusammenhngend zu halten, w erden die
Nutzerdaten getrennt im Shared Mem ory
abgelegt.
Die Trennung von N utzer- und VMDaten ist keinesfalls einfach und kann
d eshalb nur in bestim m ten Zustnd en d er
Virtual Machine vorgenom m en w erd en,
d enn auf d er H eap liegen sow ohl N utzer- als
auch VM-Daten.
Wird in d er VM gerad e eine Anfrage
bearbeitet, haben d er Program m counter und
and ere
w ichtige,
zur
Abarbeitung
notwendige, Daten einen bestim m ten Wert.
Wrd e jetzt d er Befehl gegeben w erd en, d ie
N utzerd aten auszulagern und im Shared
Mem ory abzulegen, ginge zw angslufig der
Zustand der VM verloren. Eine Trennung der
Daten w hrend d er Bearbeitung ist nicht
mglich,
w eil
sonst
notwendige
Informationen verloren gehen.
Die Trennung von N utzer- und VMDaten ist som it nur m glich, w enn sich d ie
Virtual Machine in einem initialen Zustand
befind et. Darunter verstehe m an d en
Zustand einer VM, in der sie unabhngig von
jeglichem N utzerkontext ist. Diesen Zustand
Dispatcher
Active Workers
Worker Pool
Work Process 1
Server Data
Work Process 2
Work Process m
Work Process 3
User Data 2
Rolled out
Java VM
User Data 4
Active
Java VM
Active
Java VM
User Data 3
User Data 6
VM Data 1
VM Data 3
Java VM n
Java VM 4
User Data 1
User Data 5
User Data
Shared Closure
VM Data
VM Data
VM Data 2
Active VMs
Shared Memory
Bild 4 Olympia Approach
27
Inactive VMs
4. Zusammenfassung
SAP hat sich mit dem VM Container Konzept
d ie Tore in ein neues Geschftsfeld geffnet.
Die gew hlte Im plem entierung ist sehr
robust und gut skalierbar und som it id eal f r
d ie Integration in d en SAP Ap plication
Server.
Im Vergleich zu den Konkurrenten IBM
und Bea fehlt d er SAP aber noch
Perform ance. So ist d er VM Container ca.
20% langsam er als vergleichbare Prod ukte.
Dieser Performanceverlust ist zu gravierend
um ein ernsthaftes Konkurrenzprod ukt
d arstellen
zu
knnen.
Als
zw eiter
entscheid end er N achteil w ird bisher nur Java
in d er Version 1.3 d urch d en VM Container
untersttzt.
SAP w ird d ie genannten Schw chen
d ringend beseitigen m ssen, um ein
ernsthafter Konkurrent fr Firm en w ie IBM
und BEA werden zu knnen.
References
[JRockit] Sebastian Steinhauer, BEA-JRockit, a Java
Virtual Machine for server-side use. Potsdam
05.2005
[SAPVM1] E. Lck, K. Hbner and M. Wintergerst,
SAP VM Container. Walldorf, 07.2004
[SAPVM2] Michael Wintergrest, VM Container
Architecture Overview, Walldorf 07.2004
[SAPVM3] N. Kuck et al, SAP VM Container: Using
Process Attachable Virtual Machines to Provide
Isolation and Scalability for Large Servers. Walldorf
[FMC] FMC Research Staff, 12.2003, http://www.f-m c.org/notation-reference/download/FMCNotation_Reference_Sheets_pdf.zip
[CVM] CDC Hotspot Implementation Overview,
http://java.sun.com/products/cdchi/overview.html
28
Administration of the
SAP Web Application Server
Martin Wolf
Seminar System Modeling 2005
Hasso-Plattner-Institute for Software Systems Engineering
martin.wolf@hpi.uni-potsdam.de
Abstract
1. Introduction
29
2.2. Architecture
2.1. MBeans
Instrumentation Level
Agent Level
Distributed Services Level
Altogether they specify a JMX agent which
runs on a Java Virtual Machine. Such a JMX agent
and its basic components are shown in the
following block diagram (fig. 1).
Standard MBeans
Dynamic MBeans
Open MBeans
Model MBeans
30
31
MBean Server
RDMS
Global Properties
Central Services
Libraries
Interfaces
3. SAP Implementation
After introducing the JMX specification in
general, its implementation by SAP is the topic of
the next section. The main element of a SAP Web
AS is at least one J2EE Engine, which comprises
one dispatcher and several J2EE Server
Application Server Processes. Each of these
processes runs on their own Java Virtual Machine.
The architecture of the server and dispatcher node
is the same from the runtime design point of
view. It is divided into three layers:
3.1. Kernel
The Java-Kernel provides basic functions
concerning resource management and the
operating system. The Kernel is divided into
subsystems internally called managers. Those
core modules are divided in several groups in
accordance to their specific function:
Application Layer
Infrastructure Layer
Kernel
The communication between components in
those layers is based on the Top-Down-Approach,
that is, higher level components can access the
interfaces from lower level components, whereas
32
3.2.3. Services
3.3. Implementation
3.2.1. Interfaces
Interfaces
describe
how
different
components work together in the system. They
are defined by a name and a set of classes. A
direct implementation is impossible, so a service
component is necessary to implement the
interface.
3.2.2. Libraries
33
34
35
References
[JPWAS] Karl Kessler, Peter Tillert and Panayot
Dobrikov, Java-Programmierung mit dem SAP Web
Application Server, SAP Press/Galileo Press,
1st Edition, 2005
[SLIB] SAP Library,
http://help.sap.com/
[SDN] SAP Developer Network,
https://www.sdn.sap.com/
5. Conclusion
36
Abstract
fulfilled.
The main purpose of a user management
system is the authentication and authorization of
users. There are several ways to achieve this goal.
The second part deals with two approaches how
to determine the users identity and permissions.
The third part introduces the role concept,
which aims to abstract from each single
permission and therefore is used to hide the
complexity of permission mapping. Furthermore
two types of roles are described. The basic J2EE
role and its extended version used in SAP Web
AS, the UME role which promises an increased
precision. At the end of this section both roles will
be compared with each other.
After these considerations, there is an
example, which is used to show, how a common
request for a protected resource goes on.
1. Introduction
Most software systems contain multiple
components for user management with own
storages for user data and they are distributed all
over
the
system.
Consequences
are
inconsistencies between these storages and high
effort for administration. SAP's user management
engine
(UME)
promises
centralized
administration and parallel use of existing user
directories. The first part will show the
architecture of the UME, its integration into the
system landscape and how these demands are
37
Web
Browser
Web
Browser
Cache
Servlet /
JSP
Local
Data
Local
Data
Other Data
Authorization
Authentication &
Servlet /
JSP
User
Management
Engine
Bean Container
Cached
SAP ABAP
System
EJB
EJB
Local
Data
Local
Data
Other Data
Authentication
Cached
Web Container
Data
Data
Cache
For User
SAP
Frontend
For User
Cache
J2EE Engine
LDAP Directory
User Database
Figure 1 Compositional structure of the system landscape of a common J2EE engine with integrated UME
38
Web
Container
Bean
Container
Broadcast
Persistence Agent
Query Dispatcher
Adapter For
Database
Adapter For
LDAP
Config Data
Replication
Agent
Adapter For
ABAP
SOAP
Database
LDAP
ABAP System
User Data
External
System
39
40
4. Roles
A security role is a logical grouping of users
that is defined by an application component
provider/developer. It is then mapped by an
administrator to security identities (e.g., users,
groups, etc.) in the operational environment.
A security role can be used either with
declarative or programmatic security. [SPEC]
The role concept aims to abstract from the
permissions and provide a pattern for sets of
permissions for several user groups.
During the design of a component the
developer should always think about the kind of
users who will employ the component. These
users are grouped into roles. (see J2EE roles)
The set of permissions of these roles should
reflect the responsibilities of the persons within
an organization. Any person within an enterprise
can usually be categorized into security roles.
These roles are to be assigned to only as much
permissions, as the users need to perform their
tasks. In ideal case they have exactly the set of
permissions they need, not too little nor too
much. The finished roles can be mapped to users
or user groups.
In the following part only the use of the
programmatic approach is assumed.
41
illustrated in figure 3.
User
is assigned to
Role
Superrole
Subrole
consists of
consists of
An action is a
collection of
permissions
Action
consists of
Permission
42
Web
Browser
Web
Container
Enterprise
Java
Bean
User
Management
Engine
Request For
A Resource
Generate Website
Start Operation
Invoke Method
Calculate First
Part Of The Result
Trigger
Authentication
References
User
User
Unknown Authenticated
Send Login
Form
Pass
Information
To UME
Users Types In
Their Credentials
Trigger
Authorization
Perform Authorization
Check Against User
Directory
Return Result
Throw
Exception
Return
Result
Send Page
With Result
Send Error
Page
Display
Display
Result Page Error Page
6. Conclusion
This paper has explained basic concepts of user
management and the UME architecture. The
UME internals and its integration in the overall
structure have been considered. The two major
goals, centralization of the user management and
parallel access to existing user directories, has
43
44
Abstract
Keywords:
1. Introduction
45
3. Monitoring infrastructure in
SAP installations
2.2. Profiling
2.3. Monitoring
46
Data suppliers
Long-term monitoring
data analyst
BW/Reporting
< monitoring
data
transfer
Alert Monitor
CPH
Cache
Push/Pull of monitoring
data
Via CCMS
Java System
External System
ABAP System
Data suppliers
objects
monitoring attribute
monitor
47
SAPCCM4X
ABAP System
Server
48
4.1.
To CEN
SAPCCMSR
Logs etc
Server
To SAPCCMSR shared
memory segment
CCMS
Connector
GRMG
Infrastructure
DSR
Service
Logging
To
Visual
Administrator
Mon.
data
Monitor Service
J2EE Engine
MBean
j2ee
Server
49
CEN
R
SAPCCMSR -j2ee
R
CCMS
Connector
Avail.
data
DSR
Service
DSRs
Logging
Logs
Visual
Administrator
Mon..
data
Server
Monitor Service
(JMX)
J2EE Engine
Figure 5: Monitoring a Web AS Java system using SAPCCMSR j2ee (own illustration)
Records
Distributed
Statistics
Records
passport
50
(DSR)
Subrecord
Main Record
Call Subrecords
DSR
Service
Global
Workload
Monitor
4.3.1. Tracing
GRMG
The
acts as an abstraction layer
above the actual database drivers used. As such, it
compensates for the differing implementation and
SQL dialects used among drivers of different
vendors (see [BS], [JPW]).
application
scenarios
To
CCMSR
GRMG
Infrastructure
DSR
Service
GRMG
Request/
Response
Logging
(HTTP/XML)
Monitor Service
(JMX)
J2EE Engine
Server
GRMG Application
(e.g. Servlet)
R
Run scenario
Monitored entity
(e.g. EJB,
HTTP Service
etc)
J2EE/ABAP
Server
GRMG infrastructure
51
52
5. Summary
53
54
Abstract
2. Overview
2.1. Who is Eclipse?
Primarily the Eclipse Platform was designed by
OTI 1 a subsidiary of IBM in April 1999. OTI
invested more than 40 Million Dollars in the
development of the Platform.
In June 2001 Eclipse 0.9 was shipped, version
1.0 followed in October of the same year. Only
one month later IBM donated the Eclipse source
base and established the Eclipse Foundation. The
website www.eclipse.org was launched, which is
the official homepage of the Eclipse Foundation.
From then on, the Foundation was directed and
managed by the Eclipse Consortium.
All following versions of Eclipse have been
released as open-source software. Version 2.0 was
published in June 2002. Current version (at date
of writing) is 3.0.
In February 2004 the Foundation formed into a
completely
independent,
not-for-profit
corporation [ECLIPSE1]. With this change a fulltime management organization was established,
called Board of Stewards. The Eclipse Foundation
1. Introduction
Nearly every programmer or software-designer
knows the Eclipse Platform. Most of them use it
for developing Java applications, because it is the
state-of-the-art Java Development Environment,
runs on any operating system and because it is for
free.
But the Eclipse Platform provides much more.
It can not only be used for developing
applications with every programming-language
55
Strategic Developers
Strategic Consumers
Add-In Providers and
Open Source Project leaders.
Eclipse Foundation
Eclipse Technology
Project
Eclipse Project
PDE Project
JDT Project
Platform Project
3. Concepts of Eclipse
3.1. Plug-ins
56
Eclipse SDK
Dependencies
If one plug-in depends on another one (which is
called the prerequisite) the functionality of the
prerequisite is mandatory for the functionality of
the dependent one. If the prerequisite does not
work properly, the dependent wont do too.
JDT
New PlugIn
Eclipse Platform
PDE
Extension Points
A plug-in can define interfaces where it allows its
functionality to be extended. These interfaces are
called Extension Points. The plug-in offering
Extension Points is called Host- plug-in. If another
plug-in implements one of these interfaces it can
append its own functionality to the Host- plug-in.
It is called the Extender- plug-in.
New PlugIn
57
packaging of plug-ins.
Platform plug-ins
Eclipse Platform
swt
Java VM
OS-windowing
system
Operating
System
Workbench
R
project k
Plug-in
Help
workspace
R
Update Manager
http
activated Plug-ins
Resource
Manager
Plug-in Registry
project n
IDE Framework
project 1
Platform Runtime
Eclipse(OSGi)
RCP
project i
.metadata
3rd party
plug-ins
JDT
Debug
Team
PDE
Help
Update
Manager
workspace directory
58
RCP
Eclipse Platform
Core
Plug-ins
UI
Plug-ins
plug-in directory
harddisk
4.1.1. Runtime
R
user
request
R
R
user
request
OS
dependent
show
workbench
user request
user
request
register
component
user
request
R
R
R
R
user
request
JFace
register
component
Plugin
R
R
R
R
OS
independent
register component
register
component
SWT
UI Manager
Workbench
4.1.2. Workbench
The Workbench provides the over-all-structure of
the Eclipse Platform and presents an extensible
user interface. In most cases the graphical user
interface is used, but the Workbench also offers a
59
60
Singleton
0..*
interface
IProject
1
1..*
interface
IResource
interface
IFile
0..*
member
interface
IFolder
61
6. Conclusion
References
62
Eclipse Plug-ins
Michael Perscheid
Seminar System Modeling 2005
Hasso-Plattner-Institute for Software Systems Engineering
michael.perscheid@hpi.uni-potsdam.de
bersicht
2. Problem
1. Einleitung
63
resources
Feature
icon
Manifest
owns
- name
- id
- version
uses
documentation
consists of
Plug-In
Java Code
Extension
Point
Fragment
0,1
contains
references to
consists of
library
Dependency
Point
provides
has parent
p , e provides , p , m owns
e , m references to
p , e uses , p , m owns
e , m references to
p - Plug-in / Fragment
e - Extension Point / Dependency Point
m - Manifest
Abbildung 1 Plug-in Struktur
Grobstruktur des jeweiligen Plug-ins beschreibt.
Zustzlich knnen noch optional Java Code oder
eine bzw. mehrere Ressourcen genutzt werden.
Die letzte Komponente sind die so genannten
Fragmente. Sie gelten als optionale Teile eines
Plug-ins. Damit ist es mglich sie unabhngig
vom Host-Plug-in zu installieren oder zu
verndern. Sie besitzen daher auch genau die
gleiche Struktur wie Plug-ins (d.h. ein Manifest,
optional Ressourcen, Java Code). Im Gegensatz zu
Plug-ins sind Fragmente nicht allein lauffhig,
denn sie bentigen immer ein Host-Plug-in von
dem sie auch die Abhngigkeiten erben und
somit benutzen knnen. Es gilt, dass Fragmente
von der Runtime logisch aber nicht physisch dem
Host-Plug-In zugeordnet werden, d.h. auch das
Plug-in selber sieht das Fragment als optional an
und ist auch ohne ihn lauffhig. Aus diesem
Grund werden sie gerne fr Spracherweiterungen
genutzt.
Ein verbreiterter Missbrauch von Fragmenten
findet beim Patchen von Plug-ins statt. Dabei
nutzt man den Ladezyklus der Runtime aus und
trgt das Fragment vor dem eigentlichen Laden
des Plug-ins ein. Diese Praxis ist zwar sehr
3. Plug-in Architektur
3.1. Struktur
Das Entity-Relationship-Diagramm in Abbildung
1 verdeutlicht den grundlegenden Aufbau von
Plug-ins. Dabei lsst sich dort leicht erkennen,
dass es 3 Teilarten von Komponenten gibt.
Das Feature besteht aus einem oder mehreren
Plug-ins.
Es
ist
damit
die
kleinste,
herunterladbare und installierbare Einheit in
Eclipse. Die Unterscheidung wird getroffen um,
groen Projekten eine Abstraktion von Plug-ins
zu geben und somit das Installieren von
Komponenten zu erleichtern. Features spielen
hier nur eine kleine Rolle und werden auerhalb
von Eclipse gerne mit dem Begriff Plug-in
gleichgesetzt.
Das
eigentliche
Plug-in
ist
die
Hauptkomponente in der Architektur. Es ist eine
Kapselung von Verhalten und/oder Daten,
welches dazu, dient mittels anderer Plug-ins ein
lauffhiges Programm zu erschaffen. Sie besitzen
jeweils genau ein Manifest, welches die
64
3.2. Manifest
Das Manifest beschreibt den groben Aufbau eines
Plug-ins oder Fragments. Darin enthalten sind
wenigstens der Name, die Version und eine
eindeutige ID mit der die Runtime das Plug-in
identifizieren kann. Ebenso findet man dort
smtliche Abhngigkeiten3 die ein Plug-in
bentigt oder benutzt.
An dieser Stelle sei kurz auf die Formel
unterhalb des Diagramms eingegangen. Sie
bedeutet, dass es fr jede Abhngigkeit im Plugin, sei es nun Bereitstellung oder Benutzung, eine
eindeutige Referenz im Manifest von ihm geben
muss. Sollte eine Abhngigkeit benutzt werden,
welche nicht hier aufgelistet ist, so kann man sie
auch nicht verwenden.
Das Manifest basiert auf der XMLTechnologie, wobei dies fr die Entwickler
zweitrangig ist, da Eclipse mit dem PDE einen
sehr guten Editor bereitstellt. Dieser sollte auch
unbedingt benutzt werden, da Fehler im Manifest
die Ladbarkeit des eigenen und anderer Plug-ins
gefhrden.
Zu beachten ist, dass die Manifestdatei
plugin.xml bzw. fragment.xml heien muss.
3.3. Dependencies
Mit Dependencies werden Verbindungen zu
Funktionen
anderer
Plug-ins
oder
Funktionsbibliotheken beschrieben, welche ein
Plug-in bentigt. Auch gibt es die Mglichkeit,
eigene Klassen etc. nach auen zu ffnen. Bei den
Dependencies unterscheidet Eclipse zwei Arten,
welche
sich
nur
im
Lademechanismus
unterscheiden.
Normale Dependencies werden erst beim
eigentlichen Bedarf im Sourcecode geladen. Fr
Entwickler heit dies, dass man sie erst mglichst
spt einbinden sollte.
Runtime Dependencies unterscheiden sich im
Gegensatz dazu in dem Punkt, dass sie immer
bevor das Plug-in gestartet wird, geladen sein
mssen.
Dies
sind
also
meist
die
Standardbibliotheken oder Core-Plug-ins.
Da Dependencies auch im Manifest stehen
mssen, unterscheidet man die Angebotsseite,
welche ebenso bekannt gemacht werden muss,
bevor das Plug-in geladen wird und die
Nachfrageseite, welche sich in Normal und
Runtime unterscheidet. Auch hier gilt wieder:
Wenn Fehler im Manifest auftreten, kann man
zwar sein Plug-in kompilieren aber nicht
ausfhren.
Beispiel
<?xml version="1.0" encoding="UTF-8"?>
<plugin
id="de.myExample.eclipse"
name="HelloWorld Plug-in"
version="1.0.0"
provider-name=Max Muster"
class="de.myExample.eclipse.HelloWorldPlugin">
65
Beispiel
<runtime>
<library name="eclipse.jar">
<export name="com.myExample.*">
</library>
</runtime>
<requires>
<import plugin="org.eclipse.core.*"/>
</requires>
66
Registry
Registry: Choose
Extension Point
Extension
Point
Read all
extensions in a list
Registry
Registry
Element
Read all elements
from extension in
a list
Element
Extension
no further
extensions
No further
elements
Handle Element
5
6
67
4. OSGi7 Framework
Workbench
Workbench
Plug-In
Java Execution Environment
JVM
Platform
Resources
R
Activated Plug-Ins
Lifecycle
Manager
Service registry
manager
Plug-In Registry
Security Service
Plug-In
OSGi Framework
Eclipse IDE
Platform Runtime
Plug-In Directory
(Modules)
harddisk
68
GUI
R
Packages
view
Type
hierarchy
view
Java editor
Java
outline
Run
Preference
Page
Action
Java Perspective
JDT UI
R
Java Model
Java Builder
Sourcefiles
files
Source
Binary
Binary
classfiles
files
class
classpath
Java Problems
Marker
Java Project
Nature
Java Element
Tree
Dependency
Graph
Workspace
JDT Core
5.1. Implementation
Realisiert wird das Ganze nun vornehmlich ber
das Konzept der Extension Points (Abbildung 6
zeigt
eine
Aufzhlung
der
wichtigsten
Erweiterungen). Eclipse stellt auf der linken Seite
Punkte fr Editoren, Views, Perspektiven usw.
bereit. Diese werden dann durch konkrete Plugins erweitert und implementiert. Man kann hier
auch eine eindeutige Trennung zwischen
Workbench und Workspace erkennen. Dies ist
darin
begrndet,
dass
die
grafische
Benutzerschnittstelle
vom
Laufzeitkern
abgekapselt wurde, um unabhngig davon
verschiedene Mglichkeiten zu bieten. Die
Trennung wurde ebenfalls vom JDT bernommen
und so findet man sie im JDT UI und JDT Core
wieder. Das erlaubt z.B. die Kompilation von Java
Projekten mittels der Core ber die Konsole.
69
5.1.2. JDT UI
JDT UI Elements
Workbench
Elements
Perspectives
extends
Java
Perspective
Perspectives
Type Hierarchy
Perspective
Views
extends
Views
Packages View
Type Hierarchy
View
Editors
extends
Editors
Java Editor
Scrapbook
Editor
Wizards For
extends
New Java
Project
Wizards
New Java
Package
New Scrapbook
Page
6. Schluss
extends
Action Sets
Property Pages
Jar Source
Attachments
Preference
Pages
extends
Classpath
Variables
Workspace
Elements
Code Formatter
Java Editor
JDT Core
Elements
extends
Project Natures
Java Project
Nature
extends
Builders
Java Builder
extends
Marker Types
Java Problem
70
http://www.eclipse.org
[3] Open Services Gateway Initiative
http://www.osgi.org
[4] Article of Javaspektrum 2/2005 (OSGi
Framework)
Referenzen
http://www.sigs.de/publications/js/2005/02/link
e_JS_02_05.pdf
http://wendtstud1.hpi.uni-potsdam.de/sysmodseminar/
71
72
1. Architecture Overview
To motivate the use of the Enterprise JavaBeans (EJB)
infrastructure, a brief example will illustrate the main concepts and the composition of a typical business application.
In this example two agents access counters, one increasing
a specific counter and the other generating a list from a set
of counters. These agents are called from a set of web pages
to count page views and a special web page that summarises
all collected data.
This simple example demonstrates the split into the typical three-tier architecture, with a presentation layer at the
top, the database layer at the bottom and the actual business
logic on the middle tier as shown in Figure 1. This pattern
can also be found in our model environment, the SAP Web
Application Server (WebAS), part of the SAP NetWeaver
suite.
This application can easily be modelled and implemented using the Enterprise JavaBeans concept. The web
pages residing in the presentation layer use Java Server
Pages technology to access the two agents realising the
business logic, which are implemented as session beans.
These session beans work together with entity beans, which
encapsulate the counter data and can be found partly in the
73
database, considering the persistent data, as well as the business layer, where all EJBs are executed. This counter bean
example will be continually referenced to support some underlying theoretical details of EJBs.
The following chapters introduce and discuss Enterprise
JavaBeans as a mean to develop such applications, how they
are embedded in the WebAS and how the deployment process is put into practice.
become persistent and the container maps them to a relational database. This service, offered in two variants, container managed persistence and bean managed persistence,
is the topic of another seminar contribution. [10]
Security services[3], in terms of authentication, access
control and secure communication, as well as transactions are also available to the bean. Transactions are either method-based managed by the container or specially
marked code fragments using the Java Transaction API.
The next primary service, concurrency, is slightly ambivalent. Although all business method calls are processed
concurrently by the container, there is no concurrent access
to single bean instances and no possibility for the developer
to control this concurrency1. Hence, the container uses a
pessimistic locking strategy and the EJB specification complies with a non-reentrance policy.
The last service, naming, which is essential for locating
bean objects and their interfaces, is realised with the Java
Naming and Directory Interface (JNDI).
2. Enterprise JavaBeans
Speaking academically, the Enterprise JavaBeans concept is a component architecture for building distributed applications and is classified in the category of component
transaction monitors. These involve convergence of traditional transaction processing, which typically deals with
high volume and mission critical data, and distributed object services, like CORBA or DCOM.
The concept of EJB, which tends to be platformindependent, scalable and reusable, was specified by Sun
Microsystems[13] and exists in different versions. Widely
used and accepted is version 1.1. The current version 2.0 includes two important changes. It adds the local client view
and introduces an additional bean type. The SAP WebAS
fully implements EJB 2.0.
Enterprise JavaBeans provide a convenient way to follow
an attribute-based programming approach using advanced
deployment descriptors to modify properties and to some
degree the behaviour of an application without changing its
programme code. Regarding the comprehensive supporting
infrastructure the developer can focus on its main task, programming the business logic.
In contrast to the similar names, Enterprise JavaBeans
and conventional JavaBeans differ substantially. The major difference lies in communication. Namely, that JavaBeans cover intraprocess communication, while Enterprise
JavaBeans are constructed for interprocess communication
between components and applications.
An essential part of EJB is the container concept. Bean
objects are embedded in the EJB container, which takes care
of the whole life cycle management and provides several
services.
1 In
2 Message-driven
74
!!!
75
76
77
78
In SAP NetWeaver, there are two kinds of deployment archives. Firstly, the Software Deployment Archive
(SDA) represents the smallest deployable software unit. In
the J2EE context, this unit is called Enterprise Application Archive (EAR). Secondly, the Software Component
Archive (SCA) comprises several SDAs and forms a more
complex application consisting of several sub components.
Based upon SCAs, the SDM offers software version management. [1]
Figure 7 illustrates the content of deployment archives
using the counter bean example. The EAR contains the application parts for the presentation layer and the business
layer. The Java Server Pages presenting the counter results and other required resources like images are included
in the Web Archive (WAR). The EJB Java Archive (EJBJAR) contains all bean classes and optionally other supporting Java classes.
The database vendor independent XML4 definitions of
the persistence tables of the example are included in an extra SDA. This special archive realises the idea of a Java Dictionary, see [10] for details.
79
! )
#$%&'
"
!
" (
!"
Deployment descriptors are XML files that contain serialised objects describing EJB structures, their integration
and relations. They are the linking devices for the separation of administration and development and increase the
portability of an application. Next, the most important deployment descriptors, which control the services provided
by the container, are presented.
The ejb-jar.xml configures the properties and behaviour
of the Enterprise JavaBeans. It contains the names of the interface classes and the implementing bean classes, relations
between beans and resource dependencies. It also includes
security related options, like identities, roles and access
control, as well as session related options, like timeouts,
transaction enabled methods or the stateless session flag.
In addition, it allows the setting of entity bean specifics,
e.g. aliases for JNDI lookups and the important EJBQL5 queries for the finder methods, which are translated to
JDBC6 calls during deployment. Defined in the home interface, these finder methods offer the possibility to search for
particular entities or a group of entities. For improving performance, the container provides object caching of found
entities.
Another main deployment descriptor is persistent.xml,
by which persistence of entity beans is managed. It includes
the persistent attributes of a bean class, the matching mappings to the table fields and information about the primary
keys.
Three further descriptors, web.xml, data-sourcealiases.xml and application.xml, allow the configuration of
web components and references to data sources, or setup
application wide properties. Web.xml presents another
possibility to abstract even more from bean details by
introducing symbolic names and virtual path mapping. In
application.xml for instance, the deployer can define the
application entry URL called context root.
The last set of deployment descriptors, *-j2eeengine.xml, includes J2EE and SAP specific settings, like
the application failover behaviour or the EJB instance pool
size.
The review of these deployment descriptors concludes
the brief discussion of the vital parts of EJBs.
References
[1] SAP Library - Development Manual, May 2005. From
http://help.sap.com.
[2] J. Farley, W. Crawford, and D. Flanagan. Java Enterprise in
a Nutshell. Cologne: OReilly, 2003.
[3] M. Helmich. UME: User Management & Security. 2005.
[4] E. Horn and T. Reinke. Softwarearchitektur und Softwarebauelemente. Munich: Hanser, 2002.
[5] M. Kangas. SAP Web AS - Architecture and Programming
Model. 2002.
[6] K. Kesser, P. Tillert, and P. Dobrikov. Java-Programmierung
mit dem SAP Web Application Server. Bonn: Galileo Press,
2005.
[7] R. Monson-Haefel. Enterprise JavaBeans. Sebastopol, CA:
OReilly, 1999.
[8] L. Neitsch. Enterprise JavaBeans und ihr Container. 2004.
[9] J. Nicolai. Web Services and the SAP Web AS. 2005.
[10] B. Schaeufele. J2EE-Persistenz-Mechanismen im SAP WebAS. 2005.
[11] T. Schreiter. The Clustering Concept of the SAP WebAS.
2005.
[12] D. Stollenwerk. SAP Web AS - Application Development J2EE Development. 2004.
[13] Sun Microsystems. Enterprise JavaBeans Specification,
Version 2.0, 2001.
4. Summary
Overall, Enterprise JavaBeans provide a portable and
scalable concept for building typical enterprise applications.
4 The Extensible Markup Language (XML) is a platform and vendor
independent document exchange format.
5 EJB-QL is a subset of the Structured Query Language (SQL) 2.0.
6 Java Database Connectivity (JDBC) provides uniform access to the
database layer.
80
Abstract
In this paper, the term Web Service itself as the related
terms WSDL, UDDI and SOAP are described to give
an impression about the basic technologies in the field
of Web Services.
Furthermore, information will be presented how to
implement Web Services on a J2EE platform. Finally,
the paper illustrates how to modify the J2EE view on
Web Services in order to port them to the SAP Web
Application Server.
1. Introduction
The term Web Service is a typical marketing
buzz word you can read in lots of IT magazines.
Unfortunately, most articles only describe Web
Services in a way that is not sufficient to
understand how they really work.
The author of this paper assumes, that
understanding the technical details of Web
Services is essential if you really plan to work
with them and not only use the word to be part of
the hype.
Understanding Web Services means that you
have to be familiar with the important terms and
technologies that are typically used in this field.
To facilitate the learning process, all abstract
definitions are explained on a concrete Web
Service example application, which will be
implemented based on the J2EE platform and the
SAP Web Application Server.
The rest of the paper is structured as follows:
Section 2 defines what Web Services really are
and describes a typical Web Service scenario.
Section 3 introduces the sample Web Service
application. Section 4 discusses important terms
and technologies in the field of Web Services.
is standardized
via protocols that
are
independent of a specific operating system,
platform, programming language, development
environment or programming model.
In
an
ideal
Web
Service
world,
communication between applications will not
require any human intervention. Figure 1
illustrates the general architecture of a Web
Service environment. At first, the Web Service
consumer uses a specific protocol to contact the
search engine for Web Services. According to its
request, the search engine browses through its
81
3. ASGDeployService
The mentioned example Web Service will be the
ASGDeployService developed as a first design
prototype for the Adaptive Services Grid project
[ASG]. You may download the sources on
http:/ / m y h pi.de / ~ nicolai /
Application Server
R
ASGDeploy
Client
ASGDeploy
Service
Developer
J2EE
components
Repository
Development files
Developer
publish
R
Search Engine
for Web
Services
search
Development Environment
request
R
Web Service
Specification
Generator
Parser
Web Service
Consumer
Virtual
Interfaces
Web Service
Configuration
Web Service
Tester
Web
Service
use
82
Element
-constraints
-name
refers to
Part
-name
specifies
1..*
references
Type
Complex Type
-name
Primitive Type
-native type
Message
-name
input
Service
-name
output
Operation
-name
-faults
Port Type
-name
<message name="ASGDeployService_deploy">
<part name="parameters" element="deploy"/>
</message>
<message
name="ASGDeployService_deployResponse">
<part name="result"
element="deployResponse"/>
</message>
publisher
Encoding
-input enc .
-output enc .
binds
determines
Port
-name
-address location
Binding
-transport protocol
-name
83
<portType name="ASGDeployService">
<operation name="deploy">
<input message="ASGDeployService_deploy"/>
<output
message="ASGDeployService_deployResponse"/>
</operation>
</portType>
<service name="DeployService">
<port name="ASGDeployServicePort"
binding="ASGDeployServiceBinding">
<soap:address location="http://asgplatform.org/asg/DeployService"/>
</port>
</service>
4.2. SOAP
SOAP (in earlier versions Simple Object Access
Protocol) [WSW] is a protocol to exchange
messages between systems via XML documents.
SOAP is typically used to call operations on Web
Services and to receive its result. Normally, the
communication follows the request / response
pattern illustrated in figure 10.
<binding name="ASGDeployServiceBinding"
type="ASGDeployService">
<soap:binding transport=
"http://schemas.xmlsoap.org/soap/http"/>
<operation name="deploy">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
Client side
Server side
Send message
via SOAP
request
Send SOAP
response mesage
Process result
84
contains
SOAP envelope
-namespace declarations
contains
SOAP Header
-optional data
-mustUnderstand
contains
SOAP Body
SOAP Request
-parameters part
SOAP Response
-result part
SOAP Failure
-reason
-detail
HTTP/1.1 200 OK
X-Powered-By: Servlet 2.4; Tomcat5.0.28/JBoss-4.0.1sp1 (build:
CVSTag=JBoss_4_0_1_SP1 date=200502160314)
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Mon, 11 Apr 2005 16:51:55 GMT
Server: Apache-Coyote/1.1
1d9
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soa
p/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">
<soapenv:Body>
<ns1:deployResponse
xmlns:ns1="http://asgdeployservice.asgplatfor
m.org/types">
<result>
<message>Deployment was successful.</message>
<result>true</result>
</result>
</ns1:deployResponse>
</soapenv:Body>
</soapenv:Envelope>
0
85
4.3. UDDI
UDDI (Universal Description, Discovery and
Integration) [UDDI] is the technology used to
publish and search Web Services according
certain criteria.
Information in the UDDI registry may be present
in different languages. Companies may use UDDI
to discover the services provided by their
business partners or to inform about companies,
they like to trade with in the future. UDDI
provides three different types of pages where you
can search for required information.
The white pages can be used to search
companies by their name and category. The
yellow pages provide all information about
available Web Services categorized by industries,
products, services and locations. The green
pages contain technical information about the
Web Services in question, for example the URL
where to get the corresponding WSDL document
from the Web Service specification generator (see
figure 1).
All pages are stored within a relational
database. The entities in this database are
illustrated in figure 14.
contain
White Pages
businessEntity
-businessKey
-discoveryURLs
-name
-description
-contacts
ID
references
contain
Yellow Pages
businessService
-businessKey
-serviceKey
-name
-description
category
tModel
-tModelKey
-name
-description
-overviewDoc
references
ServiceType
contain
Green Pages
bindingTemplate
-businessKey
-serviceKey
-bindingKey
-accessPoint
-hostingRedirector
86
XML parsing
SOAP processing
WSDL parsing and generation
Web Service consumption
UDDI searching and publishing
WSDL files
Java Classes
Developer
Deployment
descriptors
publish WSDL
(SOAP)
R
UDDI Registry
Server
search
(SOAP)
Development Environment
request
WSDL
R
WSDL
Generator
XML Parser
Web Service
Consumer
use
(SOAP)
Virtual
Interfaces
Web Service
Configuration
Web Service
Tester
Stateless
Session
Bean
or
Servlet
R
R
SOAP Processing
87
Java Class
provides
Virtual Interface
-selected methods
-default parameters
attributes
W eb Service
Deploym ent Descriptor
deploys
W eb Service Definition
-session mode
-authentification method
-security roles
-encryption mode
Java class
publishes
W eb Service C onfiguration
-transport binding
-W SDL port name
-target server address
results in
-further security settings
Create the
Java Clas
Generated W SD L
-types
-messages
-port types
-bindings
-service
EJB
Create the
Stateless
Session Bean
Java class
EJB
Generate JAR
Generate EAR
Add to EA project
Generate EAR
88
References
[ASG] Adaptive Services Grid Network, http://asgplatform.org
[J2EE] The J2EE 1.4 standard, http://java.sun.com
[JABW] Michael Girdley, Rob Woolen and Sandra L.
Emerson, J2EE Applications and BEA WebLogic
Server. Prentice Hall, 2003
[JWSA] Dapeng Wang, Thomas Bayer, Thilo Frotscher and
Marc Teufel, Java Web Services mit Apache Axis.
Software & Support Verlag, 2004
[MWS] Robert Taylor, Microsoft .NET XML Web Services.
SAMS, 2001
[PSW] Karl Kessler, Peter Tillert and Panayot Dobrikov,
Java Programmierung mit dem SAP Web Application
Server. SAP Press, 2005
[SSM] Seminar System Modeling,
http://wendtstud1.hpi.uni-potsdam.de/sysmod-seminar/
[SWA] Official information about the SAP Web AS,
http://www.sap.com/
[SWAH] Useful hints regarding the SAP Web AS,
http://help.sap.com/
[UDDI] Official information about UDDI,
http://www.uddi.org
[WSI] Official information about the WS -I standard,
http://www.ws-i.org
[WSW] Official information about Web Services, Soap and
WSDL, http://www.w3.org/2002/ws/Activity
8. Summary
This paper has given an overview about Web
Services and its basic related terms and
technologies. Web Services are entities that
provide an interface called by clients to exchange
(business) data over the web via open and
accepted standards independent of operating
system, programming language, programming
model and development platform.
The structure of its interfaces, the encoding of
the parameters of its operations, the protocols
used to transport operation requests and
responses and the concrete contact URL are
determined by a WSDL (Web Service Description
Language) document. The protocol used to
encode request and response messages to and
from an operation of a Web Service is SOAP.
Both WSDL and SOAP are XML-based protocols.
Web Services can be published and searched for
according certain criteria through an UDDI
(Universal
Description,
Discovery
and
Integration) registry server that acts as a Web
Service itself. UDDI provides three different
types of pages to structure its information.
89
90
Abstract
1. Introduction
As web applications in an enterprise environment
may become very large and complex, there is a
need for structuring these applications. This can
be done by separating different components of
the application to increase its maintainability and
extendibility.
The Struts framework, which has been initially
developed by Craig R. McClanahan and is now
under the auspices of the Apache Software
Foundation (ASF), is an open-source project that
91
<H1><c:out value="${myBean.myStr}"/></H1>
This
solution
increases
readability
and
maintainability, but the interaction with Beans
turns out to be somewhat complicated.
The forth approach combines the advantages
of JSPs with the flexibility of Servlets, by letting
the request be processed by a Servlet which then
passes the request to a JSP to render the output.
This last approach is one of the ideas Struts is
based on. Instead of having to redesign this
forwarding in every Servlet/JSP combination, the
use of a comprehensive framework such as Struts
provides a centralized ready-to-use solution for
this problem and of course addresses many
other issues.
change state
Controller
user
request
Model
trigger
view update
business
logic
application
data
View
response
to user
query state
2.4. Benefits
As the MVC pattern separates these three areas of
concern, its use increases maintainability and
testability of applications, simplifies the creation
of new kinds of user interfaces and finally helps
dividing tasks in the development process. Thus,
the Model-View-Controller pattern has been
adopted for the use in many different
environments, such as web applications.
92
WAR
EAR
JSPs
Java classes
TagLibs
libraries
EJB classes
struts-config.xml
Home interface
Struts libraries
web.xml
forwards
plug-ins
form-beans
message-resources
other config
Controller
Action
Servlet
form
data
ActionForm
R
forward
EJB
JavaBean
state
JavaBean
to DBMS
EJB
View
JSP
EJB-Container
HTTP
Web-Container
HTTP-Server
Browser
Action
Struts TagLibs
JavaBean
state
Resources
Client-Tier
Web-Tier
external libraries
configuration
log data
Business-Tier
Figure 2 The over-all architecture of the Struts framework and its surrounding components
4. Controller components
The Struts Controller is built up by three
components: the ActionServlet, which is the central
controlling unit, usually many Action classes that
perform the actual processing logic and possibly
one or more ActionForms, a Struts internal
representation of web forms.
93
<struts-config>
<! [...] -->
<action-mappings>
<action path="/login"
type="app.LoginAction"
name="app.LoginForm">
<forward name="failure"
path="/login.jsp" />
<forward name="success"
path="/welcome.jsp" />
</action>
</action-mappings>
<! [...] -->
</struts-config>
Listing 1 An action mapping in the struts-config.xml
4.1.1. struts-config.xml
4.2. Actions
94
4.3. ActionForms
Apart from the common Controller components
that are necessary to process a users request,
Struts offers an additional feature concerning
request handling - the ActionForms, often called
form beans.
Principally, ActionForms represent the data
stored in HTML forms by providing attributes
holding the state of the form and getter and setter
methods to access them. In the ActionForm, there
must be an equally named attribute for each filed
in the HTML form.
Similar to the Action classes, there is only one
general abstract ActionForm class shipped with
Struts, which must be extended in order to build
custom ActionForms. When a request containing
form data is received by the ActionServlet, it fills
the corresponding ActionForm with this data
before invoking any Action classes. Thus, the
Action class can easily access the submitted form
data through the ActionForm. The actual
mapping between HTML forms and ActionForms
is done in the struts-config.xml (see 4.2).
Similar to JavaBeans, ActionForms can be
stored in different scopes (see 6), which may be
either session or request scope, depending on the
95
5. The View
The View component in a Struts web application
is usually built of standard Java Server Pages
(JSPs) in conjunction with a set of tag libraries
provided by the Struts framework. However, JSPs
as the default Struts View component can be
replaced or extended by other techniques such as
the Velocity Template Engine [VTE], which can
very easily be integrated into the Struts
framework. Nevertheless, this text will only
consider JSPs and the Struts tag libraries as this is
the most common approach.
The Struts tag libraries aim to simplify the
development of Views using JSPs by providing
standardized access to Model data, enabling the
interaction with ActionForms and providing
simple structural logic such as iteration, among
others.
To understand the use of the Struts tag
libraries we will again have a look at the sample
96
6. The Model
Web-Container
ActionServlet
ActionForm
Action Class
JSP (View)
else
create/retrieve AF
reset()
fill AF with form data
store AF in scope
validate()
else
create/retrieve appr. Action Class
send response
display response
Figure 4 The typical control flow of a Struts web application when processing a request
97
8. Additional Features
The Struts framework offers some additional
features to simplify the development process of
Java web applications. Two of them are
particularly interesting and worth to be
mentioned: Tiles, a Struts plug-in that simplifies
the development of bigger composed web pages,
and Struts internationalization support.
9. Conclusion
8.1. Tiles
8.2. Internationalization
One of the great benefits of web-based
applications is their global accessibility. Thus, in a
more and more globalized world with globally
accessible web sites, there is a strong need for
localized web applications. But localizing web
applications can be a very monotonous and timeconsuming job.
From the beginning Struts has been designed
to offer easy solutions for internationalization
issues (often abbreviated as i18n). A central
component for this internationalization support is
constituted from the so called resource bundles.
5 In this simplified scenario, the possible use of the Commons
Validator is not considered.
98
References
99
100
Abstract
SAP Web Dynpro is a framework for developing user
interfaces for use with the SAP NetWeaver platform. It
comes with design tools that are part of the NetWeaver
developer studio, enabling developers to do most of the
programming in a graphical or declarative manner.
Web Dynpro applications can run on different
platforms, including Java, ABAP, and .NET.
Component-orientation supports reusability of user
interfaces.
The concepts covered in this article allow a
separation of layout and logics, and ease the
integration of different backends. Using contexts and
models, data may be synchronized automatically
between the user interface and the backend.
Besides discussion of basic concepts and a glance at
the development process, this article briefly illustrates
the client-driven execution of a Web Dynpro
application.
Keywords: Web
Interfaces
Dynpro,
NetWeaver,
User
1. Introduction
1.1. What is Web Dynpro?
Web Dynpro is a framework for development of
user interfaces (UIs) for use with SAP NetWeaver.
It supports programming for different platforms,
including Java, ABAP, and .NET. For Java
programming, Web Dynpro comes with extensive
design tools, which are based upon the Eclipse
framework and part of SAPs NetWeaver
Developer Studio.
The product name has a historical background:
SAPs legacy product lines, starting from the R/2
system, include a technology for interactive UIs
called Dynpro, an abbreviation for dynamic
program. Dynpro UIs are described in the ABAP
programming language and rendered in a
101
view
EmployeeForm
control
to the
backend
component
EmployeeBaseDataEditor
"model manager"
view controller
of EmployeeForm
component
controller
control
"name" text field
context
context
model class
Employee
control property
text
context element
employee/name
context element
employee/name
model property
"name" attribute
control property
context element
context element
model property
model
Human Ressources
2.1.1. View
2.1.2. Controller
For realization of dynamics, controllers are
required. Every view has a dedicated view
controller, and every component has a component
controller. Custom controllers may be added for
further structuring of the system.
A view controller performs event handling
based of the actions invoked in the view. For
example, the view controller of EmployeeForm
may react on pressing a button by updating data
(see section 2.1.6) or switching to another view.
Besides event handling (which is described in
event handler methods), controllers may perform
other activity described in methods.
2. Basic concepts
2.1. An example
The basic concepts of Web Dynpro are now
explained using the example in Figure 1. A form
for editing employee base data (like name, date of
birth and so on) should be realized as a Web
Dynpro application. Note that is a simple
example: it comes with only one view and no
further controllers beyond the view controller and
the component controller. Furthermore, it uses no
complex data types, i.e. only strings are mapped
between contexts.
2.1.3. Model
A model describes data in the backend, for
example using JavaBeans. Those data are
102
Figure 2 A context
2.1.4. Component
A reusable, encapsulated part of the system (and
the describing software package) is called a
component. In most cases, a component contains
several views and controllers (in fact, a
component controller is always present), and uses
one or more models. In the example, the
component is called EmployeeBaseDataEditor.
Components are able to communicate with other
components via component interfaces.
2.2. Meta-model
In Figure 3, all the concepts introduced so far are
put together to form a meta-model. The entity
types and relationships concerning screen layout
and navigation are grayed out since they are not
covered in this article.
As Figure 3 depicts, a component consists of
views and controllers, may use models, and is
started by an application. Controllers are
partitioned into view controllers, component
controllers, and custom controllers, whereas there
is exactly one component controller, and one view
controller per view. A view consists of controls,
which have control properties. As well, a model
consists of model classes, which have model
properties.
A context is part of each controller and
consists of context elements. To simplify matters,
context elements are not partitioned into non-leaf
and leaf elements in Figure 3, so it is true that
context elements may be bound to both model
classes and model properties. On the other hand,
context elements may be bound to control
properties, and can be mapped to context
elements in other contexts.
2.1.5. Application
An application, which is not embodied in Figure 1,
serves as the entry point for users in terms of
something runnable from the frontend. It is
identified by a uniform resource locator (URL).
Running an application means
1. starting a designated component, and
2. navigating to an initial view, which in turn is
displayed in an initial window.
2.1.6. Context
All data processing in a Web Dynpro application
is done via contexts. Each controller has a context,
which represents a hierarchical data model1 as
depicted in Figure 2, where leaf nodes are typed
using Java native types (e.g. String as in the
example) or Java dictionary types.
Typically, a view controllers context keeps the
Model means a structure of metadata (i.e. types and their
relationships) here. The quotation marks are used to
distinguish this term from a WebDynpro model as
introduced in section 2.1.3.
1
103
screen layout
application
start
component
have
use
window
consist of
component
controller
custom
controller
consist of
view
controller
controller
model
view
outbound
plug
have
navigation
link
context
inbound
plug
plug
model
class
control
have
have
model
property
context
element
control
property
bind
bind
navigation
map
Figure 3 Meta-model
3. Development process
As mentioned before, the NetWeaver Developer
Studio provides tools to create Web Dynpro
applications in a graphical or declarative manner.
Usually, this includes all the layout and
navigation, as well as context data and model
binding. These pieces of system description are
known as Web Dynpro metadata, for which the
corresponding
Java
code
is
generated
//@@begin javadoc:onActionBack(ServerEvent)
/** Declared validating event handler. */
//@@end
public void onActionBack(
<...> IWDCustomEvent wdEvent
)
{
//@@begin onActionBack(ServerEvent)
wdThis.wdFirePlugToStartView();
//@@end
}
developer
Generator
Web Dynpro
Metadata
Java Code
104
Step
Start
create component
(code is generated)
Design views
create view (code is generated)
place controls on view
(metadata are generated)
add control properties
(metadata are updated)
Design screen layout
apply screen layout to views
(metadata are generated)
Design navigation
create and connect navigation plugs
(code is generated)
write event handlers
Design data flow
populate and map contexts
(metadata are generated)
use models
(metadata are generated)
Add additional features
add controllers, write event
handlers and methods
Web Dynpro
client
4. Execution
decl.
decl.
graph.
decl.
graph.
graph./
decl.
proc.
graph./
decl.
graph./
decl.
proc.
Web-Dynprobased application
screen data
Type
Web Dynpro
runtime
RMI
Backend
application
J2EE
Application Server
business
data
Backend server
(J2EE-based)
User
R
R
Web browser
Web server
HTTP
Client
SAP Java
Connector
R
Presentation server
SOAP
105
Backend server
(ABAP-based)
References
[1] Kessler, K., Tillert, P., Dobrikov, P.: JavaProgrammierung mit dem SAP Web Application
Server. Galileo Press, Bonn 2005.
[2] McNulty, P.: Web Dynpro Overview. SAP AG,
2002.
5. Conclusion
106
WebDynpro
Navigation & Component-orientation
Christian Holz
Seminar System Modeling 2005
Hasso-Plattner-Institute for Software Systems Engineering
christian.holz@hpi.uni-potsdam.de
Abstract
WebDynpro is SAPs new approach for web application development. Developers are supposed to create their applications with visual tools that require little
knowledge concerning implementation details. Hence,
most of the source code is generated by the used development environment. The WebDynpro approach allows
developers to separate presentation- and business-logic.
In addition, WebDynpro Applications are operatingsystem independent. Developers can create WebDynpro
Applications using either ABAP- or Java-technology.
This paper aims to describe opportunities provided by
WebDynpro technology regarding front-end design, navigation logic and reusability. Besides, it focuses on the
Java-personality of the SAP Web Application Server
and, therefore, deals with the Netweaver Development
Studio regarding application design.
Keywords: WebDynpro, Netweaver,
Component, Context mapping
provides an application development framework to developers that have to be familiar with certain basic
vocabulary in order to use it. At the first glance, the
Metamodel seems restricting, but WebDynpro Applications feature a high maintainability and long life cycles. Although developers are not able to extend the
Metamodel1 ; they can create new elements using Component technology. Components can encapsulate certain operating sequences and are additionally able to
present a user interface. WebDynpro Applications consist of active parts (Controller) and passive elements
(Context), whereas Controllers are able to interact and
share memory with others. The latter is important regarding navigation and data transfer.
Developer
Developer
R
Navigation,
Project Manager
View Designer
Windows
Views
Applications
Navigation
Modeler
Data
Modeler
Controller
Context
Navigation
Graph
ViewSets
Components
system description
design time environment
Runtime environment
WebDynpro Runtime
Introduction
WebDynpro Component
WebDynpro creates a high abstraction level in comparison to JSP and Servlet technology. Indeed, the
runtime environment is based on Servlets, but developers do not get into contact with them. They range
within the scope of the WebDynpro Metamodel [2],
which provides various possibilities to develop an application. Furthermore, the Metamodel enables developers to control message dispatching, information transfer and frontend design of their application. Developers
have no need to deal with runtime or client technology, because WebDynpro Application development is
independent from both, client presentation and server
runtime operating-system. Additionally, WebDynpro
ComponentController
Interface
Controller
View
Controller
View
Controller
Custom
Controller
Custom
Controller
Interface
Controllers
Context
Context
Context
context
context
View
View
Component
Controllers
Context
described system
107
WebDynpro Tools
3.1
WebDynpro Client
The WebDynpro Client is the universal presentation system for end-users. It is capable of presenting the described screen content and forwards user actions to the server. Due to the current market situation, HTML and web browsers are currently used
on the client side of the application. In the course of
web applications, WebDynpro provides a web interface.
Hence, web browsers act as WebDynpro Clients as depicted in figure 3. Smart clients that do not require a
web interface are still to come anyway. The JavaScript
environment of the used web browser contains the WebDynpro Client framework. Framework functionalities
are necessary to check empty fields, mandatory checkboxes and the current state of web page elements . Besides, the framework provides functions for repositioning and resizing web page elements in order to adapt
the frontend to events like window size changes.
user
R
user
Browser Engine
R
WebDynpro Client
input
data
+
action
http
Scripting
Agent
Metadata
output
data
+
layout
WebDynpro Client
Framework
Site
Retriever
HTML Render
Agent
HTML/CSS/JS
Cache
Internal Cache
(Layout, Data)
sessions
WebDynpro
Runtime
WebDynpro
Client
policies
http
backend system
database
WebDynpro Applications
3.2
WebDynpro Runtime
Regarding the WebDynpro architecture, the predominant part of the WebDynpro Application is executed on the server side, i.e. business-logic2 is managed there, too. Since HTTP is a stateless protocol
[7], clients know single user-screens only. Clients have
no knowledge of background storage, dependencies and
flow logic. Thus, they have to request a web page from
the runtime in order to retrieve the current application state. The WebDynpro Layer within the J2EE
2 i.e.
108
Server resides on top of the Servlet layer [8]. It contains the WebDynpro Runtime and is based on Servlet
technology. The development environment generates
application code out of developers adjustments with
the WebDynpro Tools at design time. Additionally,
developers are able to extend applications manually.
Both, generated code and developers implementation
use the WebDynpro API that allows applications to
access running services in the WebDynpro Runtime.
WebDynpro Client
WebDynpro Runtime
preprocess
relevant data
execute local
checks
no errors detected
errors detected
handle
local errors
prepare request
print
detected errors
pose request
to the server
contains
0..1 ViewContainer
contains
check
data integrity
View
process data
errors detected
combines
no errors
perform
event handling
- Type
optionally
retrieve data
ViewArea
(backend system)
display
error page
displays
Component
no errors
generate
new View
send result
back to the client
embeds
display
new site
- Type
3.3
Roundtrip
Window
belongs to
Event Handlers
discovered errors
ViewSet
WebDynpro Terms
In the course of WebDynpro Application development, designers have to be familiar with certain basic
terms.
4.1
Window
109
4.2
View
Window is assigned to a Component, which is the super ordinate unit and features reusability as described
later on. ViewAreas are also able to display Components, which is interesting with respect to embedding
both Views and functionality.
Components
has
Window
4.3
ViewSet
4.4
ViewArea
MainWindow
defines
started by
Application
Component
entry point
Inbound Plug
- Parameter
Component Plug
has
Outbound Plug
5.1
110
WebDynpro Component
embeds
1
ComponentController
Interface
Controller
Interface
Controllers
Context
View
Controller
View
Controller
Context
Context
View
View
Custom
Controller
context
Transparent
Container
Navigational
Link
Custom
Controller
context
View
embeds
Component
Controllers
Context
0..1
RootUI
Container
Container
- Layout
UI Elements
Navigation
Layout
0..1
Attributes
1
- Name
Context
Controller
Controller
Local Data
Global Data
6.1
ViewController
6.2
CustomController
With regard to figure 7, developers can create additional Controllers that are not assigned to Views.
Those Controllers also feature a Context for data storage and are called CustomControllers. They offer similar functionality as other Controllers do, but may have
longer life cycles than ViewControllers. The meaning
of a Controllers life cycle is discussed in section 9.1.
6.3
ComponentController
111
6.4
InterfaceController
6.5
Context
Design
7.1
Static Design
A View is the only entity that can embed UIElements. They are organised hierarchically, too. Figure 8 depicts that Container elements provide the basic
region for embedded items. Hence, Views commence
with the initial RootUIContainer, which is the exclusive element that is placed on each View. Other UIElements that are placed on the View have a parent
Container. Apart from the RootUIContainer, developers are able to group UI-Elements with so-called TransparentContainers. This is useful regarding the visibility or capability state of a whole category of elements.
Each element placed on the View has certain named
attributes with values retained in the belonging ViewControllers Context4 . The View Designer also provides the ViewContainer UI Element. The usage of
this element expatiates space for embedded Views or
ViewSets as shown in figure 5. Hence, the ViewContainer offers an additional ViewArea and covers problems like text surrounding an embedded View5 . Views
can contain several ViewContainer UI-Elements and,
thus, compensate the ViewSet function, i.e. ViewContainers are an adequate substitution for missing
ViewSet layouts. Unusual to developers, WebDynpro
does not allow a precise arrangement of UI-Elements.
4 e.g.
5 e.g.
7.2
Dynamic Design
6 i.e.
112
at design time
save results to a backend system. However, situationdependent parts such as radio-buttons, checkboxes and
input fields can be created dynamically at runtime, because they are different for each question of the survey.
Navigation
8.1
Navigational Links
connects
View
8.2
Navigational
Link
Action Event
triggers
View
- Name
belongs to
Outbound
Plug
Plug
View
Actions
Possible
User Action
Navigation
Link
causes
Inbound
Plug
Controller
Roundtrip
treats
fires
Outbound
Plug
7 i.e.
evokes
Action
UI
Element
0..1
implements
Event
Handler
Custom
Coding
8.3
Event Handler
113
8.4
Implementation
Data Transfer
9.1
9.2
Data Binding
9.3
Context Mapping
114
10
WebDynpro Runtime
View request
initialisation
View request
Component Controller
View
Controller
View
Context
View
Controller
name
Context
10.1
Reusability
Components as special elements
View
WebDynpro Runtime
Controllers
Context
R
Component
Controller
R
R
Interface
Controller
View
Controller
View
Controller
Context mapping
embedded WebDynpro Component
ComponentController
Context
Context
name
name
name
View
Controller
Component
Controller
View
Controller
Context
name
Context
Context
Interface
Controllers
Context
Context
Interface
Controller
View
Controller
Interface
Controllers
Context
View
Context
View
Component
Controllers
Context
Component
Controllers
Context
Context
10.2
Aside from Components being the basis of each application, the most important function is to encapsulate reusable objects. As the term Component already
115
11
Conclusion
WebDynpro enables developers to model their application featuring the automatic generation of source
code. Besides, WebDynpro is intended to ease application development in order not to have the need to write
too much source code. Hence, little Custom Coding is
needed. In most cases the Netweaver Development Studio generates the source code for the developer. WebDynpro provides a wide range of UI-Elements. Although absolute positioning is possible with Adobe
16 nodes
technology, WebDynpro normally automates the placement of UI-Elements based on relative arrangements
adjusted by the developer at design time. As a matter of fact, developers create Views and Context statically. However, they are able to create additional elements dynamically at runtime, too. View transitions
are prepared statically while initiating the transfer is
done dynamically at runtime. Sectioning of the screen
is possible so that several Views can be visible at the
same time. Data transfer can be realised using data
binding and context mapping that enables WebDynpro Application to use shared memory for information
exchange. Relationships between Controllers build up
the fundament of every application. Developers model
data in the Context that is handled by the Controller at
runtime. Mappings between the Context of two Controllers lead to an automatic data exchange. Event
Handlers are implemented by Custom Coding. Components enable the reusability of WebDynpro Applications and can be integrated into other applications. In
addition, they are capable of representing a user interface. Hence, they can be embedded in other Views,
e.g. for the presentation of search results. With regard
to figure 1, the WebDynpro Tools that are provided
by the Netweaver Development Studio allow developers to work on all aspects of a WebDynpro Application.
This system description encloses the description of web
pages (Views, ViewSets), navigation logic (Plugs and
Navigational Links) and data relations (data binding
and context mapping). Whenever a WebDynpro Application is requested by a user, the WebDynpro Runtime loads this description and creates the application
system. It consists of active (Controllers) and passive
(Context and other storages) parts that put the described system into effect.
References
[1] K. Kessler, P. Tillert and P. Dobrikov
JavaProgrammierung mit dem SAP Web Application Server
SAP Press/Galileo Press, 1st Edition, 2005
[2] P. McNukty, 2004 WebDynpro Overview
[3] B. Ganz, 2004 WebDynpro Foundation Framework
[4] SAP Library http://help.sap.com
[5] SAP Developer Network http://sdn.sap.com
[6] E. Gamma, R. Helm, R. Johnson and J. Vlissides Design Patterns: Elements of Reusable Object-Oriented
Software Addison Wesley, 5th Edition, 1996
[7] Hypertext Transfer Protocol http://www.w3.org/
[8] J. Brunnert J2EE WebApplications Seminar Systemmodeling, 2004
[9] A. Fahle WebDynpro: An Overview Seminar Systemmodeling, 2005
[10] M. Weidlich WebDynpro: Data Binding and Context
Mapping Seminar Systemmodeling, 2005
116
Web Dynpro:
Context Mapping and Model Binding
Matthias Weidlich
Seminar System Modeling 2005
Hasso-Plattner-Institute for Software Systems Engineering
matthias.weidlich@hpi.uni-potsdam.de
Abstract
be explained. The first part ends with a short description of the approaches for context programming.
In the second part the focus will turn to the
dataflows in a Web Dynpro application. Therefore the
three different dataflow types, Data Binding, Context
Mapping and Model Binding, will be introduced. After the questions of the model origin will be answered,
communication scenarios are illustrated.
Finally the main points about dataflows in Web
Dynpro will be concluded.
2. Context Concept
1. Introduction
117
0..1
The node contains only one element instance,
which have not to be instanced.
!
1..1
Again the node contains only one element instance, but this time it has to be instanced.
0..n
The node is called multiple node and can contain
several element instances, of which none have to
be instanced.
1..n
Again the node is a multiple node and can contain
several element instances, of which at least one
have to be instanced.
118
! " "
!
%
&
Another important property is the singleton property that can be found in value nodes as well as in
model nodes. Unlike the cardinality of a node, which
describes the number of possible elements within
the node, the singleton property determines whether
these elements are set for all elements of the parent
node3 (non-singleton) or for exactly one element of the
parent node (singleton) [2]. The affiliation of these singleton elements is realized in the following way: the
singleton elements correspond to the parent node element which is highlighted by the property leadSelection (as it was described in 2.3). Therefore a change of
the lead selection in the element list of the parent node
makes it necessary to update the data in the singleton
elements.
For that reason a special type of controller methods for filling value nodes with elements exists, the
Supply Functions. These functions are called by the
Web Dynpro Runtime whenever the element list of
the associated node is accessed. Although each node
can have a Supply Function they are mainly used in
connection with singleton elements. The data origins
used to fill the singleton elements can be various, for
instance other elements of the current context.
3.1. Overview
In this chapter the three types of dataflows in a Web
Dynpro application, the Data Binding, the Context
Mapping and the Model Binding, will be explained.
Before the focus turns to the structural details the
relevance of these dataflows should be motivated. On
the one hand the Data Binding realizes the link between the user interface and the data structures behind, in the sense of ordinary input- and output mechanism. On the other hand it allows controlling the appearance of the user interface by the data structures.
The Context Mapping, which enables data to be circulated between contexts, is mainly used to make the
data persistent, due to the limited lifetime of view controllers. An example for such a usage can be found in
[5]. Moreover the Model Binding connects the internal data structures of a Web Dynpro application with
the model that represents the backend system (see also
3.4).
Furthermore it is necessary to envision the structure of a typical application which is shown in the
block diagram in figure 3. The Web Dynpro Runtime
embeds the application, which consists of agents, for
instance a view controller, a custom controller and a
model agent. To keep the diagram concise, the application consists of only one controller of each type and
some parts (e.g. interface controller and component
controller) are not even shown at all.
Additionally there is a big storage containing several smaller storages. As it was already mentioned,
every controller has its own context, in this case the
view controller context and the custom controller context. Moreover the view layout contains the properties of the user interface elements, while the structure
of the model is depicted in 3.4. Pointed out by the
figure, the big unnamed storage is fragmented by the
four smaller storages. Accordingly the imagination
119
"
'
&
%
120
context belongs to, they can be regarded as local variables. After a Context Mapping has been defined between two context elements located in different contexts, one and the same context element is visible in
both contexts. Similar to the Data Binding a Context
Mapping does not require any data transport, because
the same storage is assigned for mapped elements. In
figure 3 the Context Mapping involves the view controller context and the custom controller context. The
storage elements with the number 5 and 8 are context
elements that have not been mapped. In contrast, the
elements with the number 3, 4, 6 and 7 are mapped,
whereas the elements 3 and 4 are also bound with a
Data Binding as it is described in 3.2.
121
4 Advanced Business Application Programming (ABAP) is a programming language created by SAP, which is positioned as the language for programming SAPs Web Application Server.
5 Java Beans are reusable software components, for which a specification have been defined by Sun Microsystems.
122
J2EE based Web Dynpro Runtime [9]. To call procedures from a J2EE backend server, Remote Method
Invocation (RMI) is used. The data transfer to a web
service is done via SOAP, which is described in detail
in [10]. Moreover a ABAP backend server can not be
accessed directly. For that reason a middleware component named SAP Java Connector (JCo) is required
to generate RFCs out of Java calls and vice versa.
!"
# $
"
#$
!
" #
6 The
Web Service Description Language (WSDL) is an XML format published by the World Wide Web Consortium (W3C) for describing web services.
7 XML Metadata Interchange (XMI) is an OMG (Object Management Group) standard for exchanging metadata information via
XML.
8 Remote Function Calls (RFCs) are a standardized mechanism
for communication between applications on SAP systems as well as
non-SAP systems.
4. Summary
In conclusion the contexts are the main concept for
the storage, handling and management of data in Web
Dynpro. As contexts describe entities and their relations, they define the structure, the data model, in
123
References
[1] Introduction to Web Dynpro. SAP Developer Network.
www.sdn.sap.com.
[2] Web Dynpro Architecture.
SAP Library.
www.help.sap.com.
[3] Business
Application
Programming
Interfaces.
tse
technologieberatung
und
systementwicklung, Hamburg, 2005.
http://www.tsehamburg.de/Papers/SAP/sapBAPI.html.
[4] A. Fahle. SAP Web Dynpro: berblick. 2005.
[5] C. Holz. Web Dynpro: Navigation and Komponentenorientierung. 2005.
[6] T. Horn. Application Server, Web Application Server,
Web Services, SOAP, Java. 2005. http://www.torstenhorn.de/techdocs/applicationserver.htm.
[7] T. Horn.
SAP BAPI und SAP JCo.
2005.
http://www.torsten-horn.de/techdocs/sapbapi.htm.
[8] K. Kessler, P. Tillert, and P. Dobrikov. Java Programmierung mit dem SAP Web Application Server. Galileo
Press, 2005.
[9] P. McNulty. Web Dynpro Overview. SAP AG, 2003.
[10] J. Nicolai. Web Services im WebAS. 2005.
[11] P. Tillert. Wiederverwendbare Software (Web Dynpro).
2004. www.sap.info.
[12] P. Tillert. The Basic Facts About Web Dynpro. SAP AG,
2005.
[13] Winkler.
The new face of SAP - Web Dynpro.
2004. http://www.oio.de/web-dynpro-the-new-sapface.htm.
124
Abstract
In the development process of a Business Application,
there has to be a decision about the way, the application
data is kept persistent in a database. Often applications
should be database independent in order to be able to
use different databases. Therefore, the Java Enterprise
Edition (J2EE) standard defines several mechanisms
which allow database independent persistence, such as
Container Managed Entity Beans. On the other hand,
developers might want to use particular features of a
specific database or use complex persistence models.
For that reason, J2EE also allows to make application
data persistent with common SQL statements.
This paper is intended to explain the J2EE
persistence mechanisms and how they are realized in
the SAP Web Application Server (SAP WebAS).
Furthermore, it will be explained which additional
persistence features are offered by the SAP WebAS and
which solutions for essential issues of persistence, such
as transactions and locking, exist in the SAP WebAS.
Keywords: Persistence, J2EE, SAP WebAS, Entity
Beans, Database
1. Introduction
Often the development of a Business Application
begins with the design of the business logic and
the user interface. Developers tend to leave the
decision about how to keep the application data
persistent for later. The reason for that is mostly
the fact, that during development it is not yet sure
which database will be used later. Concepts
which allow database independent applications
facilitate development as well as administration,
since the database can be exchanged without any
problem.
With Container Managed Entity Beans, J2EE
Servers offer a strong concept to solve this
problem. But as persistence management is left
completely to the Web Application Server, the
125
2. Persistence theory
2.1. Persistence
Persistence means storing transient data, which is
usually held in the main memory of a computer,
in a non-transient storage, for example a database.
Without persistence mechanisms, the application
data is lost, when an application is terminated. In
a server environment, such as provided by the
SAP WebAS, after closing a session, the data of a
user must also be available for further sessions.
There are two major persistence concepts. The
first one is relational persistence and the second
one is object-relational persistence.
126
Additional services
Presentation Layer
JSP
Servlets
Web Dynpro
Business Layer
Data types
&
Structures
EJB Container
Session bean
Enqueue
Server
Locking
Manager
Java
Java
Transaction
Service
(JTS)
Entity beans
JDO
Dictionary
Database Layer
Open SQL Engine
R
R
Database
metadata
Vendor JDBC
R
DBMS
Database
DB Catalog
127
128
129
4. Entity Beans
The J2EE standard provides Entity Beans for Java
object persistence. One Entity Bean instance
represents one database table row of the
underlying relational database persistence, while
an Entity Bean class represents one table. Entity
Beans can be accessed by various clients
concurrently and remain persistent beyond a
client session. Different from Java Data Objects,
Entity Beans always run in a managed
environment, the EJB container. As they offer
object-relational persistence, J2EE applications
with persistent objects can be developed very
easily with them. The persistent data can be
accessed uncomplicated from Session Beans with
Get, Set and Find methods. Also relationships
between objects can be held persistent easily with
Entity Beans. There are two types of Entity Beans,
those which use Container Managed Persistence
(CMP) and those which use Bean Managed
Persistence (BMP).
Entity Beans, like all Enterprise Java Beans
(EJB), besides the class implementation in Java
code, are defined in the ejb-jar.xml Deployment
Descriptor. This Deployment Descriptor offers
important information to the EJB Container about
the Entity Bean, such as name, persistent fields,
primary key and relations to other Entity Beans.
There is a Home Interface for each EJB, thus
also for Entity Beans. It acts as a bean factory and
hence provides a way to create, destroy and find
Entity Bean objects. There are Local and Remote
Interfaces dedicated to calls from local or remote
clients. These Interfaces are not implemented by
the Entity Beans themselves, but objects that
correspond to these Interfaces are provided by the
EJB Container.
Often applications need to find certain
persistent data, e.g. information about a customer
with help of the Customer ID in an online-shop
application. For this purpose, Finder Methods
exist. Each Entity Bean class must at least have a
findByPrimaryKey() method. Additional Finder
Methods, e.g. findByName(), can be defined. These
methods are defined in the Home Interface,
starting with the key expression find. The
respective EJB class, then must include a method,
which begins with the keyword ejbFind, e.g.
ejbFindByName(). Find methods return references
to Entity Beans. As all Find methods, except
findByPrimaryKey(), potentially return more than
one object, the type of the return value should be
130
Business Layer
Deployment
Descriptor
EJB Container
ejb-jar.xml
persistent.xml
CMP
Manager
Session bean
Entity beans
JDO
Manager
JDO
Persistence layer
131
5. Java Dictionary
The Java Dictionary is a central storage, in which
database objects, data types and structures can be
defined. It provides additional information in
comparison to the vendor-specific database
catalog of the database used. This allows the
developer to describe data types redundancy-free
and independently of the program code. The
defined database structures and data types are
absolutely platform independent, the description
system is based on XML.
Elementary data types and structures of the
Java Dictionary can be used for user interfaces
and Web Dynpro2 in the Presentation Layer. If a
data type of the Java Dictionary is assigned to an
input field, the type of entered values is
automatically checked by the Web Dynpro
runtime. Dropdown menus with possible values
are shown automatically to the user, if a type with
a limited range of values is used. Also the field
names can be derived automatically from the
information about a persistent field in the Java
Dictionary.
The Java Dictionary allows different versions
of the metadata of database tables and fields. This
is useful because during the development of an
application, it usually is not run on only one
database, but e.g. on developer databases, testing
databases etc.
Type checking in the Open SQL Engine is
performed with help of Java Dictionary
definitions, too. As the SQLJ Translator compares
table names, column names and data types of the
SQL statements with the Java Dictionary,
semantic security is provided already during the
development. JDBC queries can at least be
checked at runtime, so that database errors are
avoided. For JDO and Container Managed Entity
Beans, the consistence with the corresponding
Deployment Descriptor is assured.
132
6. Transactions
Transactions are defined as a set of operations,
which fulfill the four ACID Properties: Atomicity,
Consistency,
Isolation
and
Durability.
Transactions are a very important issue
concerning databases and persistence.
Atomicity means, that all operations of a
transaction must be executed successfully, or
none of them is executed at all. This means that if
one operation fails, all other operations must be
rolled back, too. For example, if in a bank transfer
transaction the debiting is successful but the
crediting fails, the debiting must be rolled back,
too.
Consistency implies that a resource that has
been in a consistent state before a transaction,
must also be in a consistent state after it. The
Isolation property requires, that concurrent
accesses to the same resource must be isolated
from each other. Changes made in a transaction
may not be seen by other transactions, before it
has terminated. Durability means that results of
transactions have to be kept persistent, even in
case of system failure.
Isolation and durability are realized differently
in each context. Isolation of concurrent access to
Entity Beans by different users is realized by the
EJB container while it is realized by locks for the
database. The locking mechanisms will be
explained more detailed in chapter 7. Durability is
assured by most modern database systems with
logging techniques.
Concerning atomicity
and consistency,
different approaches can be used in the SAP
WebAS. If persistence is not Container Managed,
but realized by the developer using SQLJ or
JDBC, these programming approaches, offer an
API to realize transactions. In both cases the
AutoCommit mode of the database connection
has to be disabled. Both APIs offer statements to
commit a transaction and to roll it back, if an
exception occurs.
Moreover, there is a third possibility to
manage transactions, the Java Transaction Service
7. Locking
Locks guarantee that two transactions that are
running concurrently do not affect each other.
Locks can be set on database table rows before
reading or writing access. Usually, databases offer
133
8. Conclusion
The SAP WebAS offers a wide range of
persistence mechanisms. It supports both
relational and object-relational persistence. The
developer can decide whether to handle
persistence in a programmatic way or leave the
persistence completely to the EJB container, with
CMP Entity Beans or JDO.
Hence persistence can be handled very easy
and comfortable without having to bother much
about programming, or it can be handled very
freely, allowing complex persistence scenarios
and database specific queries. With the Open SQL
Engine, also when persistence is realized by
programming own SQL statements, syntax and
semantic of them can be checked during
development time and runtime. Furthermore, the
Java Dictionary provides a facility to define
database metadata and data types centrally and in
a database independent manner. Moreover, the
Java Transaction Service and the Enqueue Server
allow to handle these important persistence
concerns absolutely database independent. For
these reasons, the SAP WebAS offers a complete
environment for handling persistence of
Enterprise Applications.
References
[SLIB] SAP Library, http://help.sap.com
[JPWAS] Karl Kessler, Peter Tillert and Panayot
Dobrikov, Java-Programmierung mit dem SAP Web
Application Server, SAP Press/Galileo Press, 2005
[JEN] Jim Farley, William Crawford, David Flanagan,
Java Enterprise in a Nutshell, OReilly (2002)
[JDO] Stefan Marr, The JDO Persistency Model, 2005
[WDYN] Christian Holz, WebDynpro, Navigation and
Component-Orientation, 2005
[TRS] Silvan T. Golega, J2EE Transaction Services, 2004
[EJBC] Lukas Neitsch, Enterprise JavaBeans und ihr
Container, 2004
[WASA] Benny Schaich, SAP Web Application Server
Architecture, Presentation, 2003,
https://www.sdn.sap.com
[DEPL] Ralf Gldemeister, Enterprise Java Beans and
their Deployment using SAP NetWeaver
134
Abstract
persistence itself.
2. JDO
2.1. What is JDO?
The Java Data Objects (JDO) API is a standard
interface-based definition of object persistence. It
describes the transparent storage and retrieval of
Java objects.
JDO is intended to provide transparent
mechanisms to persist the whole object domain
model of an application, including mapping of
JDO instances to data
storage and implicit
updates of persistent
object states.
It is intended to
reduce most efforts of
introducing
a
persistence layer by
the use of automated
enhancements.
Figure 1 is a
simplified example of
a typical application
using
JDO
as
persistence
service.
The
[JDOSPEC]
requires
all
JDO
implementations to be
binary
compatible. Figure 1 Structure of a
Thereby, it is possible JDO-based application
to exchange a specific
JDO implementation and start to use another type
of datastore without the need to recompile.
A JDO implementation, delivered by a thirdparty vendor is highly optimized on a particular
data storage system like common RDBMS
ODBMS or maybe XML-based file storage
depending on the area of application. The
1. Introduction
Persistence of data is one of the main
requirements of business application software.
Relational databases are the most commonly used
systems to meet these requirements. They are
wide spread and highly optimized for
performance and reliability.
However, the use of RDBMS requires mapping
of business object models to a specific database
schema and introduces complexity and
dependencies into the development process and
the resulting product. This leads to a reduced
exchangeability of the used data storage which
delimitates the reusability and spectrum of
applications.
So, an effort should be the introduction of a
standardized abstraction layer. This makes you
independent of a specific data storage type,
disposes the necessity of mapping your object
model on a data schema, and reduces the
modeling and programming complexity for
135
136
container
itself
takes
responsibility
for
configuring the service, managing transactions,
providing security services, or pooling of
PersistenceManagers.
The JDO transactions are harmonized with
J2EE transactions. It is up to the programmer to
decide, which type of transaction will be used.
JDO implementations can synchronize there
transaction to distributed J2EE transactions.
Standards like EJB, JSP, Servlets, CMT, and BMT
are supported and JDO is designed to be used in
such environments.
137
3. Using JDO
This part aims to give a short introduction into
the main classes and interface a JDO programmer
has to concern with. Furthermore, the used
concepts for object identity, object lifecycle, and
the JDO-Query Language are outlined.
<<interface>>
PersistenceManagerFactory
creates
1
0..n
creates
0..1
0..n
handles
<<interface>>
Query
uses
0..1
<<interface>>
PersistenceManager
returns
0..n
0..1
creates
0..1
has a
1
1
<<interface>>
Transaction
0..n
<<interface>>
PersistenceCapable
0..n
contains
0..n
<<interface>>
Extent
0..1
138
3.2. Transactions
A transaction is a group of modifications on
persistent objects; these modifications must be
completed in its entirety or not at all. The
demands for ACID (Atomic, Consistent, Isolated,
Durable) have to be met.
Most resource managers allow different levels
of isolation. Nevertheless, developers should not
rely on any isolation level greater than Read
Committed, because JDO does not explicitly
specify the isolation level that will be applied.
On isolation level of Read Committed, state
changes of persisted objects within a transaction
cannot be seen by other transactions until a
commit has been issued.
Per PersistenceManager, only a single
transaction is possible at a time. Furthermore,
JDO does not support the concept of nested
transactions.
To work with concurrent transactions
additional PersistenceManager instances are
139
3.4.1. Transient
JDO does not influence standard object
construction mechanisms in conjunction with the
new operator. Therefore, all with a developerwritten constructor created objects are transient
by default. They behave like instances of the unenhanced class. Until they are made persistent,
there is no identity associated with these objects.
Moreover, there is no handling of persistent fields
and no transactional behavior.
If a transient object of an enhanced class is
referred by a persistent object at commit time, it
will be persisted.
3.4.2. Persistent-New
Instances are in this state if they have been made
persistent during the current transaction. During
the transition from transient to persistent, the
associated
PersistenceManager
becomes
140
3.4.3. Persistent-New-Deleted
This state will be reached if an object has made
persistent and be deleted within one single
transaction.
3.4.4. Hollow
Objects in the Hollow state are already persisted,
but at this state only their object identity is
loaded. All ordinary attribute values have not
been loaded.
3.4.5. Persistent-Clean
The data of these objects had been read, but not
modified within the current transaction.
3.4.6. Persistent-Dirty
The data of objects in this state had been changed
in the current transaction, or the makeDirty()
method of JDOHelper had been invoked.
A call to makeDirty() is useful, when changes to
a persistent field of an array type had been made,
since JDO does not require automatic tracking of
changes made to array fields.
3.4.7. Persistent-Deleted
JDO instances that have been deleted in the
current transaction are Persistent-Deleted.
3.5. Extents
An Extent represents the complete set of all
persistent instances of a class. It is obtained from
a PersistenceManager by getExtent and it is possible
to decide whether items of subclasses should be
included or excluded.
The primary purpose of an extent is to provide
a candidate collection of objects to be used in a
query, where filtering or ordering can be applied.
Nevertheless, it can be used to access all
persisted objects of a given class and maybe its
subclasses, therefore an Iterator is provided by the
Extent interface.
The data-retrieval process will not start until
the first invocation of next() on a obtained Iterator.
Thus, it is possible to delegate an Extent to a
Query without unnecessary data access.
141
5. Conclusion
Persistence is one of the most important concepts
in business applications. Therefore, an easy to use
and common interface is required to meet
business requirements.
JDO will meet these requirements in most
cases. It is a standardized interface-based
definition of object persistence, which is
supported by leading vendors.
Provided transparency will help to reduce
modeling and programming efforts, compared to
ordinary JDBC and SQL usage, which
nevertheless is not obsolete in specific use cases.
Furthermore, the abstraction of specific data
storage will lead to an improved portability of the
whole application.
The programmer itself will benefit in an API
for accessing persistent data with object model
information only and tools which provide this
transparency by automated code enhancement.
While JDO 1.0 may not suit anyone, JDO 2.0
will bring a lot of promising improvements and
may be considered when choosing a persistence
framework.
References
[JDOSPEC] Java Data Objects Specification
http://jcp.org/aboutJava/communityprocess/final
/jsr012/index2.html
142
Zusammenfassung
In der vorliegenden Arbeit werden zwei Versionskontrollsysteme verglichen. Zum einen das
Open-Source-Tool Subversion (SVN) und zum
anderen das von SAP entwickelte und in die
NetWeaver Entwicklungsumgebung integrierte
Design-Time-Repository (DTR).
Hierbei soll eine Diskussion bez
uglich OpenSource pro und kontra vermieden werden. Vielmehr steht der Vergleich des Aufbaus, der
Funktionsweise und der Verwendung der beiden Programme im Vordergrund. Daf
ur werden einleitend generelle Begriffe und Konzepte des Themenbereiches Versionskontrollsystem
gekl
art, um anschlieend die beiden Systeme
im Aufbau und in der Verwendung einzeln zu
erl
autern. Abschlieend werden die haupts
achlichen Gemeinsamkeiten und Unterschiede noch
einmal aufgezeigt. Aspekte wie Installation,
Konfiguration und Sicherheit werden in dieser
Arbeit nicht behandelt.
Schlu
orter: Aufbau, Verwendung,
sselw
Konflikte, Check-In, Check-Out, Zweige
Einfu
hrung
Bei der Entwicklung von groen Softwareanwendungen mit langen Lebenszyklen arbeiten viele Entwicklerteams meist zur selben Zeit auf
den selben Ressourcen. Deshalb werden in heutigen Entwicklungen von groen Softwaresystemen Orte gebraucht, in denen die Entwickler ih-
143
samt Bildern und Ahnlichem wahrend der Entwicklungsarbeit gespeichert werden. Es soll also
moglich sein in einem Repository Dateien unabhangig vom Typ abzulegen.
Auf das Repository soll auerdem gesteuert
und organisiert zugegriffen werden konnen. Dies
bedeutet, dass Entwickler eigene Sichten auf die
Ressourcen sich erstellen oder erstellt bekommen. Ein Versionskontrollsystem soll aber mehr
leisten als ein herkommlicher Dateiserver. Durch
den Zugriff soll ermoglicht werden, dass Entwickler Informationen teilen und Daten simultan bearbeiten konnen. Nach dem Editieren sollen Resultate des simultanen Bearbeitens nicht
verloren gehen, sondern es ist w
unschenswert,
dass die Ergebnisse der verschiedenen Entwickler verschmolzen werden. Es soll auch moglich
sein auf altere Zustande, d.h. altere Versionen
von Ressourcen zugreifen zu konnen.
In Abbildung 1 ist zu erkennen, wie der Nutzer im Allgemeinen auf ein Versionkontrollsystem mit Hilfe seines lokalen Client-Programmes,
meist u
ber ein Netzwerk, auf den Server zugreift. Durch ein Check-Out werden Daten empfangen und in den lokalen Arbeitsplatz ablegt.
welche eine oder meist mehrere Nachfolger besitzt und beim Anlegen einer Ressource erzeugt
wird. Diese Nachfolger stellen jeweils die Anderungen zu den jeweiligen Vorgangern dar. Das
heit, dass eine Ressource aus einer Ausgangs
version und einer Liste mit Anderungen
besteht.
1.1.2
1.1
Funktionsweise
Um mit Ressourcen in einem Versionskontrollsystem zu arbeiten, wobei mehr als ein Entwickler an derselben Ressource simultan arbeiten kann, m
ussen die in den folgenden Abschnitten beschriebenen drei Hauptfunktionen realisiert werden (entnommen aus [SAP1]):
1.1.1
Versionskontrolle
144
Oft ist eine lineare Entwicklung einer Ressource, wie dies eine Liste ermoglicht, nicht ausreichend. Vielmehr ist es w
unschenswert das gesamte Projekt moglicherweise in verschiedene
Richtungen weiterzuentwickeln, um zum Beispiel lander- oder sprachspezifische Anpassungen vorzunehmen. Hierf
ur sind Zweige (Branches) nutzbar. Ein Zweig ist eine Liste von Verweisen. Jeder Verweis zeigt auf eine Ressource.
Da Ressourcen, wie schon erwahnt, Listen von
Anderungen
sind, kann dieser Verweis nicht nur
auf die aktuelle Version, sondern auf eine beliebige Version einer Ressource weisen. Um Zweige
von dem Hauptzweig (Head ) zu unterscheiden,
m
ussen sie benannt werden. Nun konnen an die
sen Verweisen weitere Anderungen
hinzugef
ugt
werden. Somit konnen Ressourcen unterschiedliche Entwicklungsgeschichten (Histories) haben.
Wird auf das weitere Entwickeln verzichtet,
so spricht man von Marken (Tags). Eine Marke
ist eine Moglichkeit stabile Zustande des Repositories zu speichern, um etwa eine zu veroffentlichende Version des Projektes zu haben, auf die
man gezielt auch spater zugreifen kann.
Zweige konne auch als Sichten auf ein Repository verstanden werden. Angenommen ein
Entwickler A will Teile des Repositories grundlegend u
berarbeiten, wobei jedoch die normalen Entwicklungsarbeiten an dem Projekt durch
weitere Entwickler fortgesetzt werden. Da Entwickler A nun von Ressource zu Ressource seine
Arbeit durchf
uhrt, w
urde er vermutlich das Entwicklerteam beeintrachtigen. Besser ist, wenn A
sich einen eigenen Zweig erstellt und an dem un
abhangig von anderen Nutzern Anderungen
vornimmt. Er hat nun seine personliche Sicht auf
das Projekt. Wenn A seine Arbeit beendet hat,
kann er seinen Zweig in den Hauptzweig integrieren.
1.1.3
Simultane Entwicklung
1.2
Beispiel
F
ur ein besseres Verstandnis ist in der Abbildung 2 ein Beispiel einer Entwicklungsgeschichte
eines Repositories aufgezeigt.
Design-Time-Repository
Das von der SAP entwickelte und auf Perforce basierende Versionskontrollsystem DTR
ist die zentrale Ressourcenverwaltung in der
NetWeaver-Entwicklungsumgebung. Es lauft,
ahnlich wie andere Programme der Entwicklungsumgebung, auf einen SAP Web Application Server als J2EE-Applikation.
2.1
145
und spater auch an Produktivsysteme. Dies geschieht durch die Freigabe der Entwickler. Somit
ist das CMS in der Lage den gesamten Zyklus
der Entwicklung von Software zu kapseln.
2.1.4
2.2
2.1.3
146
Name Service
Das DTR besteht aus dem DTR-Server und verschiedenen Client-Programmen, normalerweise
wird hier das NetWeaver Developer Studio verwendet, aber jeder andere WebDAV-Client ist
denkbar. Client und Server kommunizieren mit
Hilfe des DeltaV -Protokolls1 . Der Server speichert alle Dateien als Binary Large Objects
(BLOB) in eine rationale Datenbank.
Der Zugriff auf die Ressourcen geschieht u
ber logische Speicherorte, die DTRWorkspaces, welche nicht mit dem Konzept
des Workspaces zu verwechseln ist, wie er
etwa in der Entwicklungsumgebung Eclipse
vorkommt. DTR-Workspaces sind neben den
versionierten Ressourcen der zweite Bestandteil
der DTR-Datenbank. Wie in der 4. Abbildung
zu erkennen ist, besteht zwischen diesen beiden Entitaten Beziehungen derart, dass die
DTR-Workspaces Ressourcen referenzieren. Um
jedoch auf jede beliebige Version verweisen zu
konnen, geschieht dies nicht direkt, sondern der
DTR-Workspace zeigt auf Activities. Activities
sind im Kontext des SAP DTR genau die oben
genannten Differenzen zwischen benachbarten
Zustanden einer Ressource.
f
ur Distributed Authoring und Versioning. Uber
dieses
Protokoll wird der Zugriff (
ahnlich wie bei einen Dateiserver) auf entfernte Dateien via HTTP gew
ahrleistet.
Jedoch wurde die M
oglichkeit zu Versionierung in WebDAV noch nicht standardisiert. Deshalb wurde DeltaV
entwickelt, welches ein Standard ist, der auf HTTP und
WebDAV aufsetzt und die Versionierung von Dateien regelt (siehe [WD]).
147
2.3
Die enge Bindung der Komponenten des JDI haben auch Einfluss auf die Verwendung des DTR.
mit Anderungen
gef
ullt, welche durch Hoch-
148
Subversion
In diesem Kapitel werden nicht nur der Aufbau, die Funktionsweise und die Verwendung
von Subversion erlautert, sondern gleich dar
an Gemeinsamkeiten, Ahnlichkeiten
und Unterschiede zum DTR aufgezeigt.
Subversion ist eine Open-Source-Software,
das viele Schwachen des sehr beliebten Programms CVS behebt. Deshalb wird Subversion
oft als dessen Nachfolger bezeichnet, obwohl es
sich um ein eigenstandiges Projekt handelt.
3.1
149
Nutzern nicht von einen Administrator der Maschine, sondern durch einen Administrator des
Repositories durchgef
uhrt werden kann.
Die Subversion-Daten liegen im Gegensatz
zum DTR-Repository nicht in einer Datenbank,
sondern direkt im Dateisystem. Das SubversionVerzeichnis enthalt im wesentlichen 6 Verzeichnisse und eine Datei:
1. Das Conf-Verzeichnis enthalt Daten u
ber
die Konfiguration des Repositories.
2. Das Dav-Verzeichnis wird vom Webserver
und dem dazugehorigen Subversion-Modul
als eigener Zustandsspeicher genutzt.
3. Die Format-Datei enthalt genau einen Integerwert, die aktuelle Revision-Nummer
des Repositories. Durch jeden Check-In
wird diese Nummer inkrementiert. In einem neuen, noch leeren Repository ist diese Nummer gleich null.
4. Das Hook-Verzeichnis enthalt Hooks. Ein
Hook ist ein Script, welches durch ein Ereignis im Repository ausgelost wird. So
kann etwa dadurch die Autorisierung von
Entwicklern im Repository realisiert werden (was jedoch sehr aufwendig ware).
5. Subversion unterst
utzt, wenn gew
unscht,
wie das DTR das Sperren von Dateien, sodass kein simultanes Bearbeiten moglich
ist. Diese Informationen werden im LockVerzeichnis abgelegt.
6. Das Repository an sich liegt in einer BerkeleyDB2 oder direkt im Dateisystem3 in
einem Unterverzeichnis.
Die Revision-Nummer ist eine Besonderheit
von Subversion. In anderen Versionskontrollsystemen (wie etwa in DTR) werden Versionsnummern f
ur jede Ressource einzeln vergeben. In
Subversion gibt es hierf
ur nur eine Nummer, die
2
Eine BerkeleyDB ist eine Datenbank, welche aus Dateien im Dateisystem besteht auf welche direkt, d.h. ohne
Server, zugegriffen werden kann.
3
Diese Option wird erst ab der Subversion-Version 1.1
unterst
utzt.
150
Revision-Nummer. Das heit sobald eine Ressource geandert wird, wird diese Nummer inkrementiert. Commits sind analog zu Activities
Abbildung 8: Relationen
Repository-Inhaltes
des
Subversion-
Da bei jeder Inkrementierung der RevisionNummer jede Ressource geandert wird, meint
man mit Working-Revision-Nummer, die
Revision-Nummer zu der die Ressource das
letzte Mal geandert wurde. Wie auch der 8.
Abbildung zu entnehmen ist, besitzt jede Ressource eine eigene Working-Revision-Nummer.
Die hochste Working-Revision-Nummer ist
gerade die globale Revision-Nummer. Durch
Beispiel
Die 9. Abbildung soll dazu dienen den Zusammenhang zwischen den versionierten Ressourcen
und der Revision-Nummer an einem Beispiel zu
verdeutlichen. Im ersten Schritt wird das Repository angelegt, es hat die Revision-Nummer
0. Mit den 1. Commit werden 2 Ressourcen erzeugt (Development Resource 1 und 2), nun hat
das gesamte Repository die Revision-Nummer 1.
Durch das zweite Commit wird die 1. Ressource und nur diese geandert, nun ist die aktuelle Revision-Nummer 2. Jedoch ist die WorkingRevision-Nummer von der 2. Ressource immer
noch 1, da zu diesem Zeitpunkt die Ressource
das letzte Mal geandert wurde. Schlielich, nach
der 8. Revision, ist die Revision-Nummer eben
8, die Working-Revision-Nummer der Ressource
2 auch und die Working-Revision-Nummer der
Ressource 1 ist 7.
Abbildung 9:
Repositories
Beispiel
eines
mits sich nicht auf eine Ressource beziehen, sondern auf das gesamte Repository, konnen diese
nicht einfach zu einer einzelnen Ressource hinzugef
ugt werden. Deshalb funktioniert eine Integration in Subversion durch das Hinzuf
ugen
eines Commits, welcher die Differenz zwischen
dem Quellzweig und dem Zielzweig an den Zielzweig hangt.
3.2
Subversion-
Aus der Abbildung 9 ist noch weiteres erkennbar: Auch in Subversion werden nur die
Differenzen zwischen den einzelnen Zustanden
von Ressourcen gespeichert. Jeder Zustand einer Ressource zeigt auf seinen Vorganger, indem
in ihm die Revision-Nummer gespeichert ist, in
welcher vor ihm das letzte Mal die Ressource
geandert wurde. Dieses Konzept wird auch f
ur
Zweige und Marken genutzt. Dadurch sind Zweige und Marken sehr kosteng
unstig, da sie nur
Zeiger auf einen bestimmten Zustand sind. Zweige konnen als einzigen Unterschied zu Marken
nicht nur eine Vorgangergeschichte haben, sondern auch eine Nachfolgergeschichte. Somit sind
Zweige und Marken fast das gleiche: lazy copies
von Ressourcen.
Dieses Konzept kann bei der Integration
zweier Zweige nicht durchgesetzt werden. Im
DTR werden bei einer Integration alle Activities einer Ressource aus dem Quellzweig in den
Zielzweig integriert. Da aber in Subversion Com-
151
Fazit
Nachdem nun im Detail der Vergleich abgeschlossen ist, im Folgenden eine Zusammenfassung der wesentlichen Gemeinsamkeiten und
Unterschiede. Vorab sollte aber erw
ahnt werden, dass eine Entscheidung f
ur ein bestimmtes Programm nicht notwendig sein wird, da das
DTR in der SAP Entwicklungsumgebung nicht
ersetzbar ist und auch nur dort eingesetzt werden kann.
Es lasst sich festhalten, dass beide Systeme weitentwickelte Programme sind, welche im
Aufbau und damit im Kern sehr ahnlich funk
tionieren. Beide nutzen das Konzept der Anderungen, was Speicherplatz und auch Bandbreite spart, da nur Differenzen (Deltas) versendet und gespeichert werden. Desweiteren sind
Workspaces im DTR den Zweigen im Subversion ahnlich, wenn man Zweige als Sichten
auf ein Repository versteht. Beide referenzieren auf eine Menge von Zustanden, was bedeutet, dass Workspaces und auch Zweige sehr
kosteng
unstig sind. Erwahnenswert sind noch
folgende Funktionalitaten, welche von beiden
System unterst
utzt werden: So konnen Dateien unabhangig vom Typ versioniert werden. Es
konnen Ressourcen im Repository verschoben
werden, ohne das die Entwicklungsgeschichte
verloren geht. Und es ist ein bedingter CheckOut moglich, indem etwa Zustande von Ressourcen ausgecheckt werden, welche zu einem bestimmten Zeitpunkt aktuell waren.
4
Literatur
[KK5] Java-Programmierung mit dem SAP
Web Application Server, Karl Kessler et
all., Galileo Press, Bonn 2005
[SAP1] DTR User Documentation, 2001 SAP
AG
[SAP2] Architecture and Concepts of the Design Time Repository, SAP Online
(help.sap.com)
[SAP3] Administration
des
Repository Servers,
(help.sap.com)
152
Design-TimeSAP
Online
(subversi-
WebDav-Homepage (www.webdav.org)
Abstract
2. bersicht
1. Einfhrung
Die Herausforderungen bei groen SoftwareProjekten liegen in der Gre und der Anzahl der
beteiligten Entwicklungsgruppen, welche auf
verschiedene Standorte verteilt sein knnen, und
dem Software-Lebenszyklus.
Diese Projekte mssen ber einen langen
Zeitraum gewartet werden, wobei auch von
Kundenseite
eingebrachte
Modifikationen
bercksichtigt werden mssen.
Um diesen Herausforderungen entgegentreten
zu knnen, bedarf es einer konsistenten
Umgebung, die den Entwicklern alle Ressourcen
und Archive in den bentigten Versionen zur
Verfgung
stellt,
Modifikationsmanagement
erlaubt und Stabilitt im Software-Lebenszyklus
gewhrleistet.
Die SAP NetWeaver Java Development
Infrastructure adressiert diese Probleme durch
vordefinierte Entwicklungsprozesse, die von den
Infrastruktur-Komponenten verarbeitet werden
knnen und durch Entwicklungskonzepte wie
das von SAP entwickelte Komponentenmodell.
153
Local File
System
Component Build
Service
Name Service
Design Time
Repository
Namespace
Archives
Landscape
Configurator
Configurator
Development
Resources
Transport
Studio
System
Landscape
Directory
R
Quality Manager
Operator
Development
Configuration
Das
Komponentenmodell
ist
hierarchisch
strukturiert und beinhaltet 3 Schichten.
Zuoberst steht immer das Produkt, das es zu
entwickeln gilt. Das Produkt gehrt nicht zum
Komponentenmodell und wird in der NWDI
durch
die
so
genannte
Development
Configuration realisiert.
Ein Produkt beinhaltet eine oder mehrere
Software Components, die entweder entwickelt
werden knnen oder bereits in fertiger Form
(zum Beispiel als Bibliotheken) vorliegen.
154
155
P r o p a g a t e s o b je c t s
D epends / U se
D epends / U se
has
c o n t a in s
D epends / U se
P u b lic P a r t
D e v e lo p m e n t
Com ponent
S o ftw a r e
C om ponent
c o n t a in s
L is t s u s a b le
has
F o ld e r
W e b D y n p ro
Com ponent
A c c e s s C o n tro l
L is t
D e v e lo p m e n t
O b je c t
J a v a C la s s
G ra n ts a c c e s s
4. Infrastruktur Komponenten
Auf dem Bild 3 ist zu erkennen, dass das DTR
aus einer Client und einer Serverseite besteht.
156
nderungen
in
einem
Workspace
157
DTR Database
Cons
(Workespacefolder)
R
Active
Dev.
Object 1
Vers 1
Inactive
DTR Client
Workspace Folder of Software Component X
Dev.
Object 1
Vers n
DEV
(Workspacefolder)
Active
Inactive
Versioned Resources
Dev.
Object n
Vers 1
Dev.
Object n
Vers n
158
D e s ig n T im e R e p o s ito ry C lie n t
C hange
M anagem ent
S e rv ic e
A rc h iv e P o o l
(B u ild s p a c e s )
CBS
R equest
R e c ie v e
N e tW e a v e r
D e v e lo p e r
S tu d io
D a ta b a s e
B u ild
E n g in e
T e m p o ra ry
F o ld e r
R equest
Q ueue
B u ild
E n g in e
R
W e b B ro w s e r
C BS W eb U I
(J 2 E E S e rv ic e )
C B S B u ild
C o n tro lle r
C o m p o n e n t B u ild S e rv ic e
159
Local File
System
Local File
System
Local File
System
Central
Development
System
Consolidation
System
Test System
Production
System
QA
Manager
R
Change Management
System
Landscape
Configurator
Transport
Service
Database
Admin
Development
Configuration
System
Landscape
Directory
DTR
DEV
CONS
Component Build
Service
Archive Pool
(Buildspaces)
5. Fazit
Die NWDI bietet eine Abbildung des gesamten
Software Lebenszyklus in einer integrierten
Entwicklungslandschaft.
Das zugrunde liegende Komponentenmodell
mit der starken Kapselung und den exakt
definierten
Schnittstellen
erleichtert
die
Wartbarkeit und Wiederverwendbarkeit und
erlaubt
fr
einen
Build-Prozess
auf
Komponentenebene mit vordefinierten BuildProzessen.
Das globale Versionierungssystem ermglicht
die verteile Entwicklung auf einer gemeinsamen
160
konsistenten
Code-Basis
und
Modifikationsmglichkeiten beim Kunden, ohne
diesen von Updates und Support-Packages
auszuschlieen.
Zustzlich zu den Quellen werden auch die
Archive
konsistent
gehalten
und
die
Komponenten
der
Infrastruktur
erkennen
automatisch
Inkonsistenzen
und
bieten
automatische Lsungsvorschlge an.
Qualittsmanager und Administratoren haben
jederzeit Einblick auf die komplette Landschaft
und
zustzliche
Testsysteme
ermglichen
umfassende Qualittsmanahmen nach dem
Abschluss der Entwicklung als auch whrend
dieser.
Damit bietet die NWDI eine effiziente
Umgebung zur Entwicklung sowohl in groen
und verteilten Teams als auch fr kleinere
Projekte mit wenigen Entwicklern.
Literatur
[KK5] Java-Programmierung mit dem SAP
Web Application Server, Karl Kessler
et all., Galileo Press, Bonn 2005
[SAP1] SAP NetWeaver Java Development
Infrastructure, SAP Online
(help.sap.com)
[SAP2] Working with the SAP NetWeaver Java
Development Infrastructure, SAP Online
(help.sap.com)
161
162
Stefan Httenrauch
Seminar Systemmodellierung 2005
Hasso-Plattner-Institut fr Softwaresystemtechnik, Universitt Potsdam
stefan.huettenrauch@hpi.uni-potsdam.de
st.huettenrauch@freenet.de
Abstract
1. Motivation
Die verteilte Entwicklung mit einer Vielzahl von
Entwicklern bzw. Entwicklerteams ist eine der
Herausforderungen, der sich heute nahezu alle
Softwareentwickler stellen mssen. Hierbei gilt es
Abhngigkeiten zwischen Entwicklern aufzulsen, Kontroversen (z.B. Versionskonflikte) zu
vermeiden und die Mglichkeit zu schaffen,
unabhngig voneinander zu arbeiten, um eine
parallele, mglichst konfliktfreie Entwicklung zu
ermglichen.
Mit dem Konzept des Tracks und der Definition zugehriger Rollen (engl. Roles) versucht
SAP, innerhalb der NetWeaver Java Development
Infrastructure (NWDI) und dem NetWeaver
Development Studio, diesen Problemen zu
begegnen.
163
Fr den zentralen Build der Softwarekomponenten (engl. Software Component, kurz SC) wird
der Component Build Service (CBS) genutzt.
Das Change Management System (CMS) steuert
als bergeordnete Instanz den gesamten
Entwicklungsprozess und greift dabei auf die drei
zuvor genannten Architekturelemente zurck.
Fr die Entwicklung kann z.B. zu Test- oder
Consolidationzwecken auf Laufzeitsysteme
(engl. Runtime Systems) zurckgegriffen werden.
164
eine Vorbereitungsphase voranstellen (Preparation). Die Phase Development lsst sich darber
hinaus in die Subphasen Programming, local build /
local test und Activation unterteilen.
Jede zu entwickelnde Softwarekomponente
durchluft alle Phasen dieses Workflows.
3.2.1. Programming
Der Developer bearbeitet nun existierende
Quellcodedateien und Objekte oder erstellt selbst
neue Artefakte.
3.1. Preparation
In Hinblick auf die durchzufhrende Entwicklung wird durch den Configurator das zu
erreichende Endergebnis der Entwicklung z.B.
ein Softwareprodukt definiert. Dazu werden ein
oder mehrere Tracks angelegt. Jeder Track enthlt
eine Referenz auf die Softwarekomponenten, die
in dem jeweiligen Track entwickelt werden sollen.
Zustzlich werden Referenzen auf Softwarekomponenten hinterlegt, von denen der Track
abhngig ist. Der Configurator nutzt dazu den
Landscape Configurator des CMS. Die dabei
erstellte Development Configuration wird im
Speicher des SLD abgelegt.
Im nchsten Schritt importiert der Developer
diese Development Configuration in sein
NetWeaver Developer Studio (NWDS). Alle
Komponenten die er auf Grundlage der Trackdefinition fr seine weitere Entwicklungsarbeit
bentigt, werden daraufhin automatisch in das
NWDS importiert.
Als Ergebnis dieser Phase erhlt der Developer
eine von Auen unabhngige Entwicklungsumgebung mit allen fr seine Entwicklung bentigten Softwarekomponenten. Ebenso ist das zu
entwickelnde Softwareprodukt inklusive seiner
Abhngigkeiten definiert.
3.2. Development
Wie im Abschnitt 2.2.2 erwhnt, lsst sich die
umfangreiche Phase Development in 3 Subphasen
zerlegen, die nachfolgend erlutert werden.
Hierbei knnen sich die Subphasen Program-
165
3.2.3. Activation
Im Zuge der Activation wird das erste Mal nach
der Entwicklung wieder auf die NWDI zurckgegriffen.
Durch die Aktivierung der Activities eines
Developers wird der Inhalt des lokalen Dateisystems in den zugehrigen Workspace inactive im
DTR bertragen. Danach wird ein Build Request
an das CBS gesendet, um den Build in Zusammenhang mit anderen Softwarekomponenten
durchzufhren. Wie in Abbildung 6 zu sehen,
fhrt das CBS den Build durch und importiert
zuvor nur die im Track festgelegten Softwarekomponenten in der aktuellsten Version aus den
aktiven Workspaces des DTR und die vom
Developer synchronisierten Quellcodedateien aus
den Workspaces inactive.
Es ist somit mglich nur einzelne Module der
gesamten Software durch einen Build zusammenzufhren und zu berprfen. Ein zeitaufwndiger Build des gesamten Produktes ist nicht
erforderlich. Dies hat weiterhin den Vorteil, dass
ein fehlgeschlagener Build nur geringe Auswirkungen auf andere Developer hat.
Nach erfolgreichem Kompilieren und Zusammenfhren werden die Daten aus dem Workspace inactive in den Workspace active berfhrt.
Somit stehen die entwickelten Komponenten
anderen Entwicklern zur Verfgung (vgl.
Abschnitt 4.1). Parallel wird ein zentraler Test
angestoen, der die soeben erstellten Archive im
globalen Kontext testet. Die bereits angesprochenen Laufzeitsysteme zum Testen werden dafr
genutzt.
166
4. Parallele Entwicklung
Nachdem nun der gesamte, auf einem Track
basierende Entwicklungsprozess erlutert wurde,
geht dieses Kapitel in einem Szenario beispielhaft
auf die parallel verlaufende Entwicklung unter
Verwendung von Tracks ein.
167
168
Glossar
CBS
CMS
DC
DTR
J2EE
NWDI
NWDS
QM
SAP
SC
WS
Referenzen
[SAPAr] SAP help online. Architecture Manual.
http://help.sap.com/saphelp_nw04/helpdata/de/
01/9c4940d1ba6913e10000000a1550b0/frameset.ht
m. Stand Juni 2005.
6. Zusammenfassung
Tracks dienen im Kontext der NetWeaver
Development Infrastructure dem Management
von Softwareentwicklungsprozessen. Sie knnen
als ein System von Speichern und Laufzeitsystemen oder als Workflow verstanden werden.
Durch die in einem Track definierten Abhngigkeiten zu anderen Softwarekomponenten und
der exakten Angabe der zu entwickelnden
Softwarekomponenten, ist eine weitestgehend
unabhngige, parallele und teamorientierte
Softwareentwicklung mglich. Der Entwicklungsprozess ist stabil; dem Developer bleibt das
Softwareprodukt
als
Ganzes
weitgehend
verborgen.
Die Definition von Rollen und den damit
verbundenen Zugriffsrechten untersttzt die
Entwicklung mit Hilfe von Tracks und schrnkt
die Verantwortlichkeiten der beteiligten Personen
ein.
Den Vorteilen fr die Entwicklung stehen ein
hoher administrativer Aufwand und die Arbeit
mit einer komplexen Infrastruktur gegenber.
169
Anhang
170
Abbildung 12: Ablauf der Entwicklung im berblick, unter der Annahme, dass keine Fehler auftreten
171