• No results found

9$' - % ' % !!*! +, + % - % %. % $ + ' % ! * - % = ' % >! % % -! . %% / 0 1%2 6 % % 7 . * % ! " #$%& ' $ 3! $!4 % 5 6 % %

N/A
N/A
Protected

Academic year: 2021

Share "9$' - % ' % !!*! +, + % - % %. % $ + ' % ! * - % = ' % >! % % -! . %% / 0 1%2 6 % % 7 . * % ! " #$%& ' $ 3! $!4 % 5 6 % %"

Copied!
7
0
0

Loading.... (view fulltext now)

Full text

(1)

!

"

#$ %

&

'

$

(

)

!

!

*

!

+

,

+

%

-

%

%

.

%

$

+

.

%

%

'

%

/

0

!

1%2

.

%

%

3

!

$

! 4

%

5

6

%

%

7

8

9

:%

;

/

/ 7/ 7

9$'

- *

-

% !

6

!

*

!

9$'

-

%

6

!

5

.

1<$

!

%

.

!

*

-

%

%

-

!

5

!

'

%

!

*

-

%

=

'

%

>

!

%

%

-

!

.

!

5

'

%

%

?7 %

. ! 3

@

%

A ! - 2 ! . >

9 &%

$ % 2 % A 7 2 ! . >

?7 %

%

!

<

% &%

?

9

-

%

6

%

%

-2

' %

6

!

%

!

9 &%

6

7

%

6

*

%

2 *

%

1%2

*

% & 139

!

%

!

!

%2

2

<

6

139

-

!

.

*

9

5

+

6

%

%

5

A

4

# !

-

5

2

4

%

!

3

0

'

%

!

-

0

(2)

//

//

-' ! 4

*

2

!

2

=

7 0

!

)

-

%2

!

7 0

- %2

!

%

!

-

%

!

*

2

!

2

-

%

8

;*

2

!

6

*

+

&

$ %

7

+

7

7

*

2

$

*

7

8

7 ;

!

$

7

7

&

#

2

$

2

!

8

;

&8

7

%;

.

#

2 4 $

!

-2

4

7

readFile { abrir el archivo; determinar su tamaño; reservar esa cantidad de memoria; leer el archivo a memoria; cerrar el archivo; }

B

*

%

7 C

B

C

B

7

C

B

C

B

C

$

!

7

errorCodeTypereadFile { initializar errorCode = 0; abrir el archivo; if (archivoAbierto) {

determinar el tamaño del archivo; if (obtuveMedida) {

reservar esa cantidad de memoria; if (tengoMemoria) {

leer el archivo a memoria; if (fallaLectura) { errorCode = -1; } } else { errorCode = -2; } } else { errorCode = -3; } cerrar el archivo; if (archivoNoCierra && errorCode == 0) {

errorCode = -4; } else {

errorCode = errorCode and -4; } } else { errorCode = -5; } return errorCode; }

%

7

D

EFG

H

6

*

%

B

$

7

7

C-

)

I +

!

$

!

readFile { try { abrir el archivo; determinar su tamaño; reservar esa cantidad de memoria; leer el archivo a memoria; cerrar el archivo; } catch (fallaApertura) { hacerAlgo; } catch (fallaDeterminandoMedida) { hacerAlgo; } catch (fallaReservaMemoria) { hacerAlgo; } catch (fallaLectura) { hacerAlgo; } catch (fileCloseFailed) { hacerAlgo; } }

#

2 4

!

$

*

readFile

method1 { call method2; } method2 { call method3; } method3 { call readFile; }

I*

method1

J

(3)

K

1

$

7

method1 { errorCodeType error; error = call method2; if (error) procesarError; else seguir; } errorCodeTypemethod2 { errorCodeType error; error = call method3; if (error) return error; else seguir; } errorCodeTypemethod3 { errorCodeType error; error = call readFile; if (error) return error; else seguir; }

$

!

6

8 *

;

2

4

method1 { try { call method2; } catch (exception) { doErrorProcessing; } }

method2 throws exception { call method3; }

method3 throws exception { call readFile; }

*

%2

6

*

2

5 J%

'

8

;

*

* 7

#

2 K4 .

!

6

-2

4

!

L

>

!

A

%

.

M

*

6

%2

-

5 !

%

2

*

.

N

7

!

4

catch (InvalidIndexException e) { . . . }

1

4

catch (ArrayException e) { . . . }

1

4

catch (Exception e) { . . . }

-

%

+

!

+

e

7*

+

-

M

*

8

7

;

*

4

.

8

-*

;

*

-

%

*

!

//

//

.

%

%

'

5

3

/ /

$

*

<

+

- 3

5 *

%

+

-<

$

/ /

-

% *

$

J

7

3

0

3

!

*

1 / 7

INIT

W

C

A

Go / EXEC *

OK* / COMMIT *

NOK , timeout /

ABORT *

INIT

W

C

A

EXEC / OK

COMMIT /

ABORT /

EXEC / NOK

TM

RM

(4)

9 *

$

*

J

7

$

<

+

?

%

!

$

+

!

! 7%

%

A

7%

*

7%

1O

$

<

7%

*

%

P

% *

<0 / 7

INIT

W

P

C

A

TM

Go / EXEC *

OK * / PREPARE *

ACK * / COMMIT *

NOK / ABORT *

INIT

W

P

C

A

RM

EXEC / OK

PREPARE / ACK

COMMIT /

ABORT /

EXEC / NOK

!

$

5

<

$

J

75

+

7

$

J

% !

+

%

$

+

%

<

*

*

-

+

$

+

7

I 7%

1O

?

.

!

)

-

<

)

-<

*

+

K)

$

+

.

1

>

<Q

.913<Q

)

$

7

3-

.3-*

?)$

7

.913<Q)

*

%

7

%

$

%

*

)

<

!

<

!

<

- *

7 &

!

+

!

%

-2

4

!

<

=

+%

N

!

7

% &

7

N

% &

*

+%

% &

%+%

%

. >

'

!

*

%2

!

%

+

.

+

'

!

-

< * *

!

<

% &

3 *

2

!

!

6

*

% &

'

!

+

- <

6

6

%

!

6

!

!

+

+

R(

1

'

%

<

1

@

- +

%

<

'9 $

-<R4

<

<

R.4 %

3

<

=

SQ

3

=

SQ

<

TX XA

(5)

T

>

5<R

3 7 7 )<%4 <R> R(1 '< tx_info $ ) tx_set_transaction_timeo ut $0 7 % 0 7 7 )> 7 7 7 0 & % & 0 77 % )1 0 & % & 7 7 7 ) tx_set_transaction_contr ol 7 ) tx_set_commit_return 7 ) tx_commit 3% &7 ) tx_rollback 9 0 ) tx_begin 7 7 ) tx_close 1 7 7 ) tx_open

>

5R.

= 7 7 0 7 7 ) xa_forget 3 7 7 % & xa_recover 7 )> % 7 7 7 7 0 / 7 ) xa_commit 7 7 )> % 7 7 7 7 0 / 7 ) xa_prepare - 7 0 7 7 ) xa_end ' 7% * * % % 7 ) xa_start ' 7 ) ax_unreg ' 0 7 7 ) ax_reg

' !

R(

1

'<

>

5<R

<R$

(

-

>

9

<

(

? %6

9-.$

.<U<@>

$

1

<

<R

R.

>

5R.

1

$%

>

$$P6$

P$

$ P

1 @1%2 <

$

-

!

139.

J

%2

139.

$ %

R(

1

'<

1<$

% R. <R

>

'6 11

6

%2

139. % >

>

1

R(

1

'<

>

<

$

>

1% 1<

>

1<$.32

.2

< 9 &

"

7$ 0

M

<

$

M

<

. >

=

M

<$ M

<.

. * M

<$

!

1 @1<$

M

<.

<R R.

R(

1

'<

1 @1<$

>

>

1

<

$

=

<$

$

1

6

1

!

.

2

<$

%2

)

'<

<

<$

- 3

'

%

% /

6 3

16-<

5

1

R.

>

%

$/R(

1

R.

'

%

<

$'<

*

*

7%

16-<

<

. *

<$

?

(6)

V

1 W )

A-<

'

<$

*

? O

)

A-<

0 &

$

P

$'<

<

+

)

A-<

6

!

+

%

Transaction

Disabled

)

NotSupported

)A

!

Supported

)$7

Required

)$7

X

RequiresNew

)

-

+

#

!

)

A-<

. %

AutoComplete

$

$

7

7 0

!

%

6

!

2

ContextUtil.SetComplete

ContextUtil.SetAbort

-

M

9

=

-M

9

.

*

<$

2

7

)

6 7

!

6

M

A'>M

A

'

>

7

-M

9

<

5

<

+

-M

9

$

%

NotSupported

)A

%

%

Required

)N

%

Supports

)$

!

X

RequiresNew

)

Mandatory

)$

7 *

!

$

% &

javax.ejb.EJBContext.setRollbackOnly()

-

+

3 *

-M

9/ 0

//

//

.*

Y

!

Design Patterns: Elements of Reusable

Object-Oriented Software

"# $ " % $ "&" &" ' # ( # (

)

*

*

)

*

+

)

,

-

)

.*

*

/

0

'

1

*

2

,

/

3

,

(7)

D

4

1 , * 4 , 5 , 5 * , 1 6 7

! "

' % = 5 * $ ! -2

#

6 ) $ , $ , $ ,

4 -2

).*

(

6

. 7

.

* 2

)

N> !

+

)

X

7

N>

"

#

!

N>

'9

% &

*

%

)6

!

*

!

*

7

(

-

1

)

%

*

!

*

5 !

!

!

)-!

)

4 -2

).*

(

$1.

N

*

!

)

2

)

#

1

@N>

/

)- ! $ "

X %

%

X

7

)-

"

%

X

5

@-< 1$< *

)

3-.>

6

*

3-.>

2

%

%

% )$ %

& ' $ "

#" $

#

!

$

#" $

' $" $

'

M--/'

M--/ '

(

Intercepting Filter intercepts incoming requests and outgoing responses and applies a filter. These filters may be added and removed in a eclarative manner, allowing them to be applied unobtrusively in a variety of combinations. After this preprocessing and/or post-processing is complete, the final filter in the group vectors control to the original target object. For an incoming request, this is often a Front Controller, but may be a View. Front Controller is a container to hold the common processing logic that occurs within the presentation tier and that may otherwise be erroneously placed

in a View. A controller handles requests and manages content retrieval, security, view management, and navigation, delegating to a Dispatcher component to dispatch to a View.

Application Controller centralizes control, retrieval, and invocation of view and command processing. While a Front Controller acts as a centralized access point and controller for incoming requests, the Application Controller is responsible for identifying and invoking commands, and for identifying and dispatching to views.

Context Object encapsulates state in a protocol-independent way to be shared throughout your application. Using Context Object makes testing easier, facilitating a more generic test environment with reduced dependence upon a specific container.

View Helper encourages the separation of formatting-related code from other business logic. It suggests using Helper components to encapsulate logic relating to initiating content retrieval, validation, and adapting and formatting the model. The View component is then left to encapsulate the presentation formatting. Helper components typically delegate to the business services via a Business Delegate or an Application Service, while a View may be composed of multiple subcomponents to create its template.

Composite View suggests composing a View from numerous atomic pieces. Multiple smaller views, both static and dynamic, are pieced together to create a single template. The Service to Worker and Dispatcher View patterns represent a common combination of other patterns from the catalog. The two patterns share a common structure, consisting of a controller working with a Dispatcher, Views, and Helpers. Service to Worker and Dispatcher View have similar participant roles, but differ in the division of labor among those roles. Unlike Service to Worker, Dispatcher View defers business processing until view processing has been performed.

Business Delegate reduces coupling between remote tiers and provides an entry point for accessing remote services in the business tier. A Business Delegate might also cache data as necessary to improve performance. A Business Delegate encapsulates a Session Façade and maintains a one-to-one relationship with that Session Façade. An Application Service uses a Business Delegate to invoke a Session Façade. Service Locator encapsulates the implementation mechanisms for looking up business service components. A Business Delegate uses a Service Locator

to connect to a Session Façade. Other clients that need to locate and connect to Session Façade, other business-tier services, and web services can use a Service Locator.

M--/'

(

Session Façade provides coarse-grained services to the clients by hiding the complexities of the business service interactions. A Session Façade might invoke several Application Service implementations or Business Objects. A Session Façade can also encapsulate a Value List Handler. Application Service centralizes and aggregates behavior to provide a uniform service layer to the business tier services. An Application Service might interact with other services or Business Objects. An Application Service can invoke other Application Services and thus create a layer of services in your application.

Business Object implements your conceptual domain model using an object model. Business Objects separate business data and logic into a separate layer in your application. Business Objects typically represent persistent objects and can be transparently persisted using Domain Store.

Composite Entity implements a Business Object using local entity beans and POJOs. When implemented with bean-managed persistence, a Composite Entity uses Data Access Objects to facilitate persistence.

The Transfer Object pattern provides the best techniques and strategies to exchange data across tiers (that is, across system boundaries) to reduce the network overhead by minimizing the number of calls to get data from another tier.

The Transfer Object Assembler constructs a composite Transfer Object from various sources. These sources could be EJB components, Data Access Objects, or other arbitrary Java objects. This pattern is most useful when the client needs to obtain data for the application model or part of the model.

The Value List Handler uses the GoF iterator pattern to provide query execution and processing services. The Value List Handler caches the results of the query execution and return subsets of the result to the clients as requested. By using this pattern, it is possible to avoid overheads associated with finding large numbers of entity beans. The Value List Handler uses a Data Access Object to execute a query and fetch the results from a persistent store.

Data Access Object enables loose coupling between the business and resource tiers. Data Access Object encapsulates all the data access logic to create, retrieve, delete, and update data from a persistent store. Data Access Object uses Transfer Object to send and receive data. Service Activator enables asynchronous processing in your enterprise applications using JMS. A Service Activator can invoke Application Service,

Session Façade or Business Objects. You can also use several Service Activators to provide parallel asynchronous processing for long running tasks.

Domain Store provides a powerful mechanism to implement transparent persistence for your object model. It combines and links several other patterns including Data Access Objects.

Web Service Broker exposes and brokers one or more services in your application to external clients as a web service using XML and standard web protocols. A Web Service Broker can interact with Application Service and Session Façade. A Web Service Broker uses one or more Service Activators to perform asynchronous processing of a request.

"

$

#

9

< &

$

(

>

'

6

(

begin(transaction)

read(pregunta)

if (sé (pregunta)) {

write (respuesta)

commit (transaction)

}

References

Related documents

18 th Sunday in Ordinary Time Saint Rose of Lima Parish Parroquia Santa Rosa de Lima.. August

Although total labor earnings increase with the unskilled unions’ bargaining power, we can say nothing when the increase in production is due to stronger skilled unions, since

Using a nationwide database of hospital admissions, we established that diverticulitis patients admitted to hospitals that encounter a low volume of diverticulitis cases have

shapes of the AGN and star formation IR SEDs (see blue dashed and red solid curves in Fig. 2 ), which results in sources with a signif- icant contribution from the AGN component

de Klerk, South Africa’s last leader under the apartheid regime, Mandela found a negotiation partner who shared his vision of a peaceful transition and showed the courage to

This Service Level Agreement (SLA or Agreement) document describes the general scope and nature of the services the Company will provide in relation to the System Software (RMS

Game referred to in the second column in the affected Magisterial Districts referred to in the third column, excluding the Magisterial Districts referred to in the fourth.. column

Although theoretically the likelihood of finding evidence that dumped imports have in- jured the domestic industry should fall as the industry increases its output, the results from