    All Examples  All WebLogic Enterprise Connectivity Examples  JSP University Example

## jsp_servlet
Class UniversityHelper

    java.lang.Object
      |
      +--jsp_servlet.UniversityHelper

public class UniversityHelper
extends java.lang.Object

This example demonstrates how a WebLogic Servlet can connect to WebLogic Enterprise and invoke operations on CORBA objects. This contains a set of methods which are called by the jsp servlets that are included as part of this sample.

- When the Weblogic Server comes up, it opens multiple connections to the WebLogic Enterprise IIOP listener.
- The servlet picks up a connection from the connection pool; that is, it acts as a WebLogic Enterprise client and gets a client context from the bootstrap factory.
- The servlet then finds the factory finder and the Registrar factory and gets the Registrar object.
- When the user submits the form, the appropriate operation is invoked. This request goes through the ISL/ISH to the appropriate server in the WebLogic Enterprise domain.
- The server performs the requested operation and sends the data back to the servlet.
- The servlet returns the data to the client browser within some generated HTML.

Field Summary
`UniversityT.Registrar` | `gRegistrarObjRef`
`UniversityT.StudentDetails` | `gStudentDetails`
`org.omg.CosTransactions.Current` | `gTransCur`

Constructor Summary
`UniversityHelper()`

Method Summary
`UniversityT.CourseDetails[]` | `get_course_details(java.lang.String courseNum)`
`UniversityT.CourseSynopsis[]` | `get_courses(java.lang.String aCriteria)`
`org.omg.CosTransactions.Current` | `getTransCur()`
`void` | `univInit()` Since there is no way to override the init method, we need to come up with a local initialization method which can be called from a jsp servlet.
`boolean` | `verifyStudent(java.lang.String studentIden)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### gRegistrarObjRef

    public UniversityT.Registrar gRegistrarObjRef

### gStudentDetails

    public UniversityT.StudentDetails gStudentDetails

### gTransCur

    public org.omg.CosTransactions.Current gTransCur

Constructor Detail

### UniversityHelper

    public UniversityHelper()

Method Detail

### univInit

    public void univInit()
                  throws java.lang.Exception

  Since there is no way to override the init method, we need to come up with a local initialization method which can be called from a jsp servlet. It initializes the servlet. Here, we get the Bootstrap object, the Factory Finder and the Registrar factory during the startup.
  Throws:
    java.lang.Exception - if the servlet fails

### getTransCur

    public org.omg.CosTransactions.Current getTransCur()

### verifyStudent

    public boolean verifyStudent(java.lang.String studentIden)
                          throws java.lang.Exception

### get_courses

    public UniversityT.CourseSynopsis[] get_courses(java.lang.String aCriteria)
                                             throws java.lang.Exception

### get_course_details

    public UniversityT.CourseDetails[] get_course_details(java.lang.String courseNum)
                                                   throws java.lang.Exception