Ibm WebSphere Adapters Manual do Utilizador Página 197

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 196
If you use the FFDCSupport aspect, you can ensure a consistent FFDC policy for
your application by adding declare warning or error advice to your aspects While this
capability is not explicitly provided by the FFDCSupport aspect, you can leverage
the use of AspectJ and follow a standard pattern of enforcing a policy
implemented using an aspect with compiler warnings or errors.
In Figure 6, aspect Example_6 illustrates how to prevent direct use of the FFDC API
or undesired dumping of exception messages and stack traces to the console. The
declare warning statements on lines 51 and 57 instruct the AspectJ compiler to
issue warnings during weaving if join points are matched by the accompanying
pointcuts on lines 48 and 54 respectively.
The statements are only evaluated during compilation and have no impact on the
runtime.
import com.ibm.websphere.ffdc.FFDCSupport;
public aspect Example_3 extends FFDCSupport {
protected pointcut ffdcScope () :
within(com.foo.*)
&& !within(com.foo.Goo);
}
In Figure 3 aspect Example_3 has the same effect as Example_1 except it excludes FFDC for class com.foo.Goo by
using the && and ! operators to form a pointcut expression.
Figure 9. Add FFDC to all classes in the com.foo package excluding com.foo.Goo
import com.ibm.websphere.ffdc.FFDCSupport;
public aspect Example_3 extends FFDCSupport {
protected pointcut ffdcScope () :
within(com.foo.*)
&& !withincode(* com.foo.Goo.aMethod(..));
}
In Figure 4, aspect Example_4 is also similar to Example_1, however FFDC is excluded from a particular method on
line 30 using the withincode() PCD.
Figure 10. Add FFDC to the com.foo package but exclude aMethod
import com.ibm.websphere.ffdc.FFDCSupport;
public aspect Example_4 extends FFDCSupport {
protected pointcut ffdcScope () :
within(com.foo.*)
&& !args(ClassNotFoundException);
}
In Figure 5 aspect Example_5 illustrates how to account for a programming by exception, where certain exceptions are
not considered to be a failure and should not be reported. In the example, the handling of ClassNotFoundException
will not be reported to FFDC. The args() PCD on line 39 selects a join points based on contextual information in this
case the exception passed to the handler join point.
Figure 11. Add FFDC to the com.foo package but exclude catch blocks for ClassNotFoundException handling
WebSphere Adapter development overview 191
Vista de página 196
1 2 ... 192 193 194 195 196 197 198 199 200 201 202 ... 225 226

Comentários a estes Manuais

Sem comentários

Conceptronic 1300079 manuales

Manuales del propietario y guías del usuario para Hdd / ssd recintos Conceptronic 1300079.
Ofrecemos 1 manuales en pdf Conceptronic 1300079 para descargar gratis por tipos de documentos: Ficha de datos






Más productos y manuales para Hdd / ssd recintos Conceptronic

Modelos Tipo de documento
1300007 Ficha de datos   Conceptronic CHD2ULB USB powered, 4 paginas
C20-257 Ficha de datos   Conceptronic 2,5" Harddisk Box Mini Yellow USB powered, 3 paginas
C05-310 Ficha de datos   Conceptronic CHD3UL, 4 paginas
C20-351 Ficha de datos   Conceptronic CHD3SUSB3, 4 paginas
C20-278 Ficha de datos   Conceptronic 2,5" Exclusive Hard Disk Box USB powered, 2 paginas
C20-256 Ficha de datos   Conceptronic 2,5" Harddisk Box Mini Pink USB powered, 3 paginas
C20-001 Ficha de datos   Conceptronic 3,5” Harddisk Box USB, 3 paginas
C20-275 Ficha de datos   Conceptronic 2,5" Hard Disk Box DeLux USB powered, 2 paginas
C20-277 Ficha de datos   Conceptronic 2,5" Exclusive Hard Disk Box USB powered, 2 paginas
C20-300 Ficha de datos   Conceptronic 3.5” Harddisk Box USB 3.0, 3 paginas
C05-212 Ficha de datos   Conceptronic Storage box 5.25 inch, 3 paginas
C05-165 Ficha de datos   Conceptronic Harddisk 3.5 SATA FW/USB 2.0, 3 paginas
C20-254 Ficha de datos   Conceptronic 2,5" Harddisk Box Mini Turquoise USB powered, 3 paginas
C10-696 Ficha de datos   Conceptronic 2,5" Harddisk Box Mini Black, 3 paginas
C20-251 Ficha de datos   Conceptronic 2,5" Harddisk Box Mini White USB powered, 3 paginas
C20-152 Ficha de datos   Conceptronic 2,5" Harddisk Box Mini USB 3.0 USB powered, 3 paginas
C20-150 Ficha de datos   Conceptronic 2,5" Harddisk Box USB 3.0 USB powered, 3 paginas
C20-258 Ficha de datos   Conceptronic 2,5" Harddisk Box Mini Violet USB powered, 3 paginas
C05-210 Ficha de datos   Conceptronic 3,5 inch USB hard disk box for SATA hard disk, 3 paginas
C05-500 Ficha de datos   Conceptronic 2,5 / 3,5 inch hard disk docking station eSATA/USB, 3 paginas