SlideShare una empresa de Scribd logo
1 de 30
Developing e-Commerce Applications Using
Oracle and Java




                                    Megh Thakkar
                Director of Database Technologies
                                  Quest Software
Industry Directions


    Web Based
    Companies




           E-Commerce




                    Brick and Mortar
e-Commerce Challenges
       High Availability (24*7*365/366)



       Performance



       Scalability



       Security / Hackers
Reality Check
Company             Outage              Cost           Results
                    June 12, 1999                      26% stock price
eBay                                    $3-5 Million
                    22 hours                           drop

AT&T                April 13, 1998      $40 Million    Changed
                    26 hours            in rebates     infrastructure
                                                       Upgrade
                    April 6, 1996       $3 Million
AOL                                                    infrastructure
                    24 hours            in rebates     $80 Million
                    Feb 24-Apr 21, 99                  Upgrade
Charles Schwab                          undetermined   infrastructure
                    4 hours                            $70 Million
                                                       Loss of integrity
Bank of Singapore July 1-8, 1999        undetermined
                                                       and interest

                                        $10 Million    Key betting days
Tabcorp Australia   October 1999
                                        in rebates     lost
                                                       22% stock price
E*Trade             March 3-4, 1999     undetermined
                                                       drop
Important Java Features
  Object-oriented language
  It allows the development of applications using an
   open standard
  It enables the development of portable applications
  It allows the reuse of code by means of JavaBeans
   and Enterprise JavaBeans (EJB) resulting in
   improved productivity
  It can execute in browsers, application servers, and
   databases
  It allows applications to be deployed in two-tier and
   multi-tier configurations
When to use Java?
  CPU-intensive “number crunching”
   operations
  To overcome PL/SQL limitations
    - Host command
    - Limitations with UTL_SMTP
  Extend the client types
  When object-oriented features are more
   suitable

 REMEMBER THAT JAVA IS CASE-SENSITIVE
PL/SQL Packages and Their
Java Equivalents
    Standard PL/SQL   Equivalent Java implementation
    package
    DBMS_ALERT        No pure Java equivalent.
    DBMS_DDL          JDBC has an equivalent mechanism for this.
    DBMS_JOB          No pure Java equivalent.
    DBMS_LOCK         No pure Java equivalent.
    DBMS_MAIL         JavaMail
    DBMS_OUTPUT       DBMS_JAVA.SET_STREAMS can be used to
                      redirect System.out to DBMS_OUTPUT. The
                      standard Java OutputStream api can be used
                      with the subclass
                      oracle.aurora.rdbms.OracleDBMSOutputStream
    DBMS_SESSION      JDBC can be used to execute ALTER SESSION
    DBMS_SQL          JDBC can be used.
    DBMS_UTILITY      No pure Java equivalent
    UTL_FILE          Classes File, FileOutputStream and
                      FileInputStream. Use of these classes
                      requires the granting of JAVAUSERPRIV
                      privilege.
Java Server Platforms
   Two related Java execution
   environments are provided in Oracle9i:
    Oracle JServer VM that is integrated
     with Oracle9i allowing data intensive
     Java logic to run and
    Java VM integrated with Oracle
   Application Server (iAS) as a Java
   cartridge
Ensuring JVM Setup
    Select count(*) from
    dba_objects where object_type
    like ‘JAVA%’;
    Select
    dbms_java.longname(name)
    from sys.obj$ where
    type# = 29 and status != 1;
Configuration Tips
     Use MTS
     Configure Large pool
Checking IIOP Connectivity

     Lsnrctl services
     netstat
     sess_sh
Support for Different Types of
Application Developers
        Database programmers can write traditional stored
         procedures, triggers and object-relational methods
         in Java
        Component-based Java developers can write
         reusable server code in the form of Enterprise
         Java Beans
        Distributed system developers can develop
         CORBA servers in Java
        Web developers can use Java Server Pages to
          embed Java tags in HTML pages to dynamically
          generate HTML pages directly from Oracle9i
Client-side Programmatic
Interface
 Oracle9i provides two different
 client-side programmatic interfaces
 for Java developers:

  JDBC (Four types)

  SQLJ (allowing SQL to be
   embedded in Java)
Choosing the Appropriate JDBC
Driver
    Fr
    ee
    at
     u     JOr
           DCi
           B Iv
            C dr
               e   Jt d r
                   Dh r
                   Bi i
                    Cnve

    S rr l N
    u t a to
    p fps
     p op
     o   e         Y
                   e
                   s

    S rr * A Qt
    u t S el L
    p f Q tl *
     p oL
     o   N  SeN   OT P
                  nC i
                  lP s
                   y/I
           aer
           dre
           as
            p a
            t     sr
                  ut
                  pe
                   pd
                   o
           s r id
           u t ni
           p ec n
            p dl g
            o   u
           IN P
           Pa i
           Cm p
            ,e e
              d s
           aC
           nP
           d/
            TPI

    Ep
    nt
    ci
     ro
     yn    Y B ih Nu t
           e y ne op e
           s u t
            . sg  tp d
                   sr
                    o
           A c ek
           det
           v dw
            a Nr
            n   o
           OnN
           p ot
           t f8
            i
            o e

    D re
    r t
    i y
     v p
     e     T 2 vJ T4 v
           y d r By d r
           p r . Cp r .
            e i D
               e   e ie
           if a
           na r
           tc e
            ee
            rs    M ufa
                  a s J
                  k e a
                   e ov
                   s
           i m dt st c c
           me t
           pn h
            lt a
            ee    os o t
                  c tn
                   k on
                   e    e
           u C i ad t o
           s I n ci l a
           e t t tr y n
            O oer  e t
                   c
           wtr
           iha
           t ec
            h Oe Oe a
                l r da
                  a as
                   c te
                   l b
           da
           as
           te
            a
            b
Choosing the Right Tool
    Characteristics   Enterprise         Jdeveloper        WebDB (portals)
                      developer suite:   Suite (+ UML):
                      Designer,          Java IDE, BC4J,
                      Developer,         UML Modeling
                      Developer Server
    Interactive       Best               Good              Good
    user interface
    Single point of   Good               Better            Best
    access to
    corporate
    services
    E-Commerce        Intranet-based Internet-             Internet-
    support                          based                 based
    Programming       PL/SQL-based;  Java-based;           Java-based;
    model             declarative    component             component
                      model          model                 model
    Mature & proven   Yes            Partial               No
    technology
    Web enabling      Best               Good              Good
    legacy systems
Challenges in Developing a
Scalable Java Environment
        Interaction of threads and automated
         storage management or garbage collection
       Achieving minimum incremental per-user
         session footprint
       Java executes platform-independent
         byte codes on top of a virtual machine. The
         virtual machine then deals with the specific

        hardware platform. This makes the
        execution slightly inefficient
Garbage Collection Issues
 Garbage collection is a major aspect of the Java language’s
 automated storage management mechanism

    Although Oracle9i supports Java language level threads, all
      Java code in Oracle9i executes as a call within a session
    Java programs can use the same scalability architecture used

     by Oracle internally
    The garbage collector used in Oracle9i Java virtual
     machine never collects garbage from more than one user at
     any time
    Each user experiences as if she is executing her own Java
     code in her own virtual machine
Factors Affecting Footprint
        Size of the program
         This is determined by the number of classes and
          methods and the amount of code they contain.
        Program complexity
         Amount of core class libraries used as the
         program executes
        State objects used
         This depends upon the number of objects
          allocated, their size and how many are retained
          across calls
        Ability of the garbage collector and memory
          manager to cope with the demands of the program
Reducing Footprint

     Footprint can be reduced by sharing resources across
      Java processes
     Release large data structures at end-of-call
     Data structures that are candidates for end-of-call
      optimization include:
        - Buffers or caches
        - Static fields
        - Dynamically built data structures
Initialization Parameters
    The following parameters affect memory usage
     and performance of Java code:
       - shared_pool_size
        - java_pool_size
        - java_soft_sessionspace_limit (default 1MB)
        - java_max_sessionspace_size (ORA-29554) (default 4GB)

   SELECT * FROM v$sgastat WHERE
   pool = ‘java pool’;
Improving Speed of Execution

    Use natively compiled code such as core Java
     class libraries and Oracle-provided Java code
Oracle9i Solutions for Increasing
the Concurrent Connections

       Multi-Threaded Server

       Connection manager

       Connection pooling

       Orastack (Windows NT only)
Multi-threaded Server

     Allows many user threads to share very few
      server threads
     User threads connect to a dispatcher
      process which routes client requests to the
      next available server thread

  Result: More users are supported
Connection Manager

    Concentrates multiple clients into a single
     multiplexed data connection

    Clients can use different protocols

 Result: Applications can be used continuously by
 the clients
Connection Pooling

     Places idle users in a suspended mode and
      reassigns their physical connections until they
      become active again

  Result: Ideal for users that need to be logged on all
  the time but don’t need to really use the application
Orastack

    Can be used to change the default reserved
     stack space used by each Oracle thread

       USE WITH EXTREME CAUTION
 Result: Allows more user connections
Using PL/SQL in JAVA – PL2Java

  Part of the iAS product
  Must first install DBMS_PACKAGE in the SYS schema
  Generates JAVA wrapper classes for PL/SQL procedures and
 functions in PL/SQL packages
  The wrapper classes can be called from the JAVA programs to
 invoke the PL/SQL program units

 Syntax:
 pl2java username/password@connect-string plsql_package
Java Server Pages

  HTML pages with JAVA as the embedded language
  Different from mod_plsql (or PL/SQL cartridge)
  JSPs cache compiled code
  Creation, compilation and execution of servlets is
 handled by the JSP engine
Java Security
  Oracle 8.1.5 allows security through roles
  Oracle 8.1.6 and above allows roles as well as Java 2 security
  initjvm.sql creates 2 roles:
      JAVAUSERPRIVS (open a TCP/IP socket; read/write file using
      UTL_FILE_DIR)
      JAVASYSPRIVS (all privs from JAVAUSERPRIVS + create
      subprocess, set socket factory, set stream handler, listen on
      specific ports)
  Use DBMS_JAVA package
  Views: DBA_JAVA_POLICY and USER_JAVA_POLICY
THANK YOU
BUY QUEST
FOR LISTENING

PRODUCTS

Más contenido relacionado

Similar a Developing e-Commerce Applications Using Oracle and Java

Why everyone speaks about DR but only few use it?
Why everyone speaks about DR but only few use it?Why everyone speaks about DR but only few use it?
Why everyone speaks about DR but only few use it?Francisco Alvarez
 
Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Gábor Hojtsy
 
Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?Kristofferson A
 
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...Yuji Kubota
 
Scaling Up AI Research to Production with PyTorch and MLFlow
Scaling Up AI Research to Production with PyTorch and MLFlowScaling Up AI Research to Production with PyTorch and MLFlow
Scaling Up AI Research to Production with PyTorch and MLFlowDatabricks
 
Enabling Research Using Cloud Computing
Enabling Research Using Cloud ComputingEnabling Research Using Cloud Computing
Enabling Research Using Cloud ComputingAmazon Web Services
 
Scaling AI in production using PyTorch
Scaling AI in production using PyTorchScaling AI in production using PyTorch
Scaling AI in production using PyTorchgeetachauhan
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnelukdpe
 
The Digital Future of PLM
The Digital Future of PLM The Digital Future of PLM
The Digital Future of PLM Oleg Shilovitsky
 
So Your OpenStack Cloud is Built...Now What?
So Your OpenStack Cloud is Built...Now What? So Your OpenStack Cloud is Built...Now What?
So Your OpenStack Cloud is Built...Now What? Tesora
 
My Name is E & Open Standards
My Name is E & Open StandardsMy Name is E & Open Standards
My Name is E & Open StandardsAndreas - Creten
 
Profiling PyTorch for Efficiency & Sustainability
Profiling PyTorch for Efficiency & SustainabilityProfiling PyTorch for Efficiency & Sustainability
Profiling PyTorch for Efficiency & Sustainabilitygeetachauhan
 
Architecture tests: Setting a common standard
Architecture tests: Setting a common standardArchitecture tests: Setting a common standard
Architecture tests: Setting a common standardPiotr Horzycki
 
AI Deeplearning Programming
AI Deeplearning ProgrammingAI Deeplearning Programming
AI Deeplearning ProgrammingPaulSombat
 
Katello on TorqueBox
Katello on TorqueBoxKatello on TorqueBox
Katello on TorqueBoxlzap
 
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops RollsPuppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops RollsPuppet
 
So Your OpenStack Cloud is Built... Now What's Next - Walter Bentley - OpenSt...
So Your OpenStack Cloud is Built... Now What's Next - Walter Bentley - OpenSt...So Your OpenStack Cloud is Built... Now What's Next - Walter Bentley - OpenSt...
So Your OpenStack Cloud is Built... Now What's Next - Walter Bentley - OpenSt...Cloud Native Day Tel Aviv
 

Similar a Developing e-Commerce Applications Using Oracle and Java (20)

Open Esb 20081104 V2
Open Esb 20081104 V2Open Esb 20081104 V2
Open Esb 20081104 V2
 
Why everyone speaks about DR but only few use it?
Why everyone speaks about DR but only few use it?Why everyone speaks about DR but only few use it?
Why everyone speaks about DR but only few use it?
 
Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?
 
Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?
 
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
 
Scaling Up AI Research to Production with PyTorch and MLFlow
Scaling Up AI Research to Production with PyTorch and MLFlowScaling Up AI Research to Production with PyTorch and MLFlow
Scaling Up AI Research to Production with PyTorch and MLFlow
 
Enabling Research Using Cloud Computing
Enabling Research Using Cloud ComputingEnabling Research Using Cloud Computing
Enabling Research Using Cloud Computing
 
Scaling AI in production using PyTorch
Scaling AI in production using PyTorchScaling AI in production using PyTorch
Scaling AI in production using PyTorch
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnel
 
Dev381.Pp
Dev381.PpDev381.Pp
Dev381.Pp
 
The Digital Future of PLM
The Digital Future of PLM The Digital Future of PLM
The Digital Future of PLM
 
So Your OpenStack Cloud is Built...Now What?
So Your OpenStack Cloud is Built...Now What? So Your OpenStack Cloud is Built...Now What?
So Your OpenStack Cloud is Built...Now What?
 
My Name is E & Open Standards
My Name is E & Open StandardsMy Name is E & Open Standards
My Name is E & Open Standards
 
Profiling PyTorch for Efficiency & Sustainability
Profiling PyTorch for Efficiency & SustainabilityProfiling PyTorch for Efficiency & Sustainability
Profiling PyTorch for Efficiency & Sustainability
 
Architecture tests: Setting a common standard
Architecture tests: Setting a common standardArchitecture tests: Setting a common standard
Architecture tests: Setting a common standard
 
AI Deeplearning Programming
AI Deeplearning ProgrammingAI Deeplearning Programming
AI Deeplearning Programming
 
Katello on TorqueBox
Katello on TorqueBoxKatello on TorqueBox
Katello on TorqueBox
 
OFA Apps
OFA AppsOFA Apps
OFA Apps
 
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops RollsPuppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops Rolls
 
So Your OpenStack Cloud is Built... Now What's Next - Walter Bentley - OpenSt...
So Your OpenStack Cloud is Built... Now What's Next - Walter Bentley - OpenSt...So Your OpenStack Cloud is Built... Now What's Next - Walter Bentley - OpenSt...
So Your OpenStack Cloud is Built... Now What's Next - Walter Bentley - OpenSt...
 

Developing e-Commerce Applications Using Oracle and Java

  • 1. Developing e-Commerce Applications Using Oracle and Java Megh Thakkar Director of Database Technologies Quest Software
  • 2. Industry Directions Web Based Companies E-Commerce Brick and Mortar
  • 3. e-Commerce Challenges High Availability (24*7*365/366) Performance Scalability Security / Hackers
  • 4. Reality Check Company Outage Cost Results June 12, 1999 26% stock price eBay $3-5 Million 22 hours drop AT&T April 13, 1998 $40 Million Changed 26 hours in rebates infrastructure Upgrade April 6, 1996 $3 Million AOL infrastructure 24 hours in rebates $80 Million Feb 24-Apr 21, 99 Upgrade Charles Schwab undetermined infrastructure 4 hours $70 Million Loss of integrity Bank of Singapore July 1-8, 1999 undetermined and interest $10 Million Key betting days Tabcorp Australia October 1999 in rebates lost 22% stock price E*Trade March 3-4, 1999 undetermined drop
  • 5. Important Java Features  Object-oriented language  It allows the development of applications using an open standard  It enables the development of portable applications  It allows the reuse of code by means of JavaBeans and Enterprise JavaBeans (EJB) resulting in improved productivity  It can execute in browsers, application servers, and databases  It allows applications to be deployed in two-tier and multi-tier configurations
  • 6. When to use Java?  CPU-intensive “number crunching” operations  To overcome PL/SQL limitations - Host command - Limitations with UTL_SMTP  Extend the client types  When object-oriented features are more suitable REMEMBER THAT JAVA IS CASE-SENSITIVE
  • 7. PL/SQL Packages and Their Java Equivalents Standard PL/SQL Equivalent Java implementation package DBMS_ALERT No pure Java equivalent. DBMS_DDL JDBC has an equivalent mechanism for this. DBMS_JOB No pure Java equivalent. DBMS_LOCK No pure Java equivalent. DBMS_MAIL JavaMail DBMS_OUTPUT DBMS_JAVA.SET_STREAMS can be used to redirect System.out to DBMS_OUTPUT. The standard Java OutputStream api can be used with the subclass oracle.aurora.rdbms.OracleDBMSOutputStream DBMS_SESSION JDBC can be used to execute ALTER SESSION DBMS_SQL JDBC can be used. DBMS_UTILITY No pure Java equivalent UTL_FILE Classes File, FileOutputStream and FileInputStream. Use of these classes requires the granting of JAVAUSERPRIV privilege.
  • 8. Java Server Platforms Two related Java execution environments are provided in Oracle9i:  Oracle JServer VM that is integrated with Oracle9i allowing data intensive Java logic to run and  Java VM integrated with Oracle Application Server (iAS) as a Java cartridge
  • 9. Ensuring JVM Setup Select count(*) from dba_objects where object_type like ‘JAVA%’; Select dbms_java.longname(name) from sys.obj$ where type# = 29 and status != 1;
  • 10. Configuration Tips  Use MTS  Configure Large pool
  • 11. Checking IIOP Connectivity  Lsnrctl services  netstat  sess_sh
  • 12. Support for Different Types of Application Developers  Database programmers can write traditional stored procedures, triggers and object-relational methods in Java  Component-based Java developers can write reusable server code in the form of Enterprise Java Beans  Distributed system developers can develop CORBA servers in Java  Web developers can use Java Server Pages to embed Java tags in HTML pages to dynamically generate HTML pages directly from Oracle9i
  • 13. Client-side Programmatic Interface Oracle9i provides two different client-side programmatic interfaces for Java developers:  JDBC (Four types)  SQLJ (allowing SQL to be embedded in Java)
  • 14. Choosing the Appropriate JDBC Driver Fr ee at u JOr DCi B Iv C dr e Jt d r Dh r Bi i Cnve S rr l N u t a to p fps p op o e Y e s S rr * A Qt u t S el L p f Q tl * p oL o N SeN OT P nC i lP s y/I aer dre as p a t sr ut pe pd o s r id u t ni p ec n p dl g o u IN P Pa i Cm p ,e e d s aC nP d/ TPI Ep nt ci ro yn Y B ih Nu t e y ne op e s u t . sg tp d sr o A c ek det v dw a Nr n o OnN p ot t f8 i o e D re r t i y v p e T 2 vJ T4 v y d r By d r p r . Cp r . e i D e e ie if a na r tc e ee rs M ufa a s J k e a e ov s i m dt st c c me t pn h lt a ee os o t c tn k on e e u C i ad t o s I n ci l a e t t tr y n O oer e t c wtr iha t ec h Oe Oe a l r da a as c te l b da as te a b
  • 15. Choosing the Right Tool Characteristics Enterprise Jdeveloper WebDB (portals) developer suite: Suite (+ UML): Designer, Java IDE, BC4J, Developer, UML Modeling Developer Server Interactive Best Good Good user interface Single point of Good Better Best access to corporate services E-Commerce Intranet-based Internet- Internet- support based based Programming PL/SQL-based; Java-based; Java-based; model declarative component component model model model Mature & proven Yes Partial No technology Web enabling Best Good Good legacy systems
  • 16. Challenges in Developing a Scalable Java Environment  Interaction of threads and automated storage management or garbage collection  Achieving minimum incremental per-user session footprint  Java executes platform-independent byte codes on top of a virtual machine. The virtual machine then deals with the specific hardware platform. This makes the execution slightly inefficient
  • 17. Garbage Collection Issues Garbage collection is a major aspect of the Java language’s automated storage management mechanism  Although Oracle9i supports Java language level threads, all Java code in Oracle9i executes as a call within a session  Java programs can use the same scalability architecture used by Oracle internally  The garbage collector used in Oracle9i Java virtual machine never collects garbage from more than one user at any time  Each user experiences as if she is executing her own Java code in her own virtual machine
  • 18. Factors Affecting Footprint  Size of the program This is determined by the number of classes and methods and the amount of code they contain.  Program complexity Amount of core class libraries used as the program executes  State objects used This depends upon the number of objects allocated, their size and how many are retained across calls  Ability of the garbage collector and memory manager to cope with the demands of the program
  • 19. Reducing Footprint  Footprint can be reduced by sharing resources across Java processes  Release large data structures at end-of-call  Data structures that are candidates for end-of-call optimization include: - Buffers or caches - Static fields - Dynamically built data structures
  • 20. Initialization Parameters  The following parameters affect memory usage and performance of Java code: - shared_pool_size - java_pool_size - java_soft_sessionspace_limit (default 1MB) - java_max_sessionspace_size (ORA-29554) (default 4GB) SELECT * FROM v$sgastat WHERE pool = ‘java pool’;
  • 21. Improving Speed of Execution  Use natively compiled code such as core Java class libraries and Oracle-provided Java code
  • 22. Oracle9i Solutions for Increasing the Concurrent Connections  Multi-Threaded Server  Connection manager  Connection pooling  Orastack (Windows NT only)
  • 23. Multi-threaded Server  Allows many user threads to share very few server threads  User threads connect to a dispatcher process which routes client requests to the next available server thread Result: More users are supported
  • 24. Connection Manager  Concentrates multiple clients into a single multiplexed data connection  Clients can use different protocols Result: Applications can be used continuously by the clients
  • 25. Connection Pooling  Places idle users in a suspended mode and reassigns their physical connections until they become active again Result: Ideal for users that need to be logged on all the time but don’t need to really use the application
  • 26. Orastack  Can be used to change the default reserved stack space used by each Oracle thread USE WITH EXTREME CAUTION Result: Allows more user connections
  • 27. Using PL/SQL in JAVA – PL2Java  Part of the iAS product  Must first install DBMS_PACKAGE in the SYS schema  Generates JAVA wrapper classes for PL/SQL procedures and functions in PL/SQL packages  The wrapper classes can be called from the JAVA programs to invoke the PL/SQL program units Syntax: pl2java username/password@connect-string plsql_package
  • 28. Java Server Pages  HTML pages with JAVA as the embedded language  Different from mod_plsql (or PL/SQL cartridge)  JSPs cache compiled code  Creation, compilation and execution of servlets is handled by the JSP engine
  • 29. Java Security  Oracle 8.1.5 allows security through roles  Oracle 8.1.6 and above allows roles as well as Java 2 security  initjvm.sql creates 2 roles: JAVAUSERPRIVS (open a TCP/IP socket; read/write file using UTL_FILE_DIR) JAVASYSPRIVS (all privs from JAVAUSERPRIVS + create subprocess, set socket factory, set stream handler, listen on specific ports)  Use DBMS_JAVA package  Views: DBA_JAVA_POLICY and USER_JAVA_POLICY
  • 30. THANK YOU BUY QUEST FOR LISTENING PRODUCTS