BBjJettyContextConfiguration::setSessionStartProgram


Description

In BBj 15.0 and higher, a BBj program can be executed when an HTTP session is created.

This method sets the name of the BBj program to be executed when a BBjHttpSession is created

Syntax

Return Value

Method

void

setSessionStartProgram(string program)

Parameters

Variable

Description

program

the BBj program to execute

Return Value

None.

Remarks

The program can access the BBjHttpSession by calling:
session! = api!.getClientProperty("session")

Example

declare BBjAPI api!
declare BBjAdmin admin!
declare BBjJettyServerConfiguration config!
declare BBjJettyContextConfiguration root!

api! = BBJAPI()
admin! = api!.getAdmin("admin","admin123")
config! = admin!.getJettyServerConfig()
root! = config!.getRootContextInfo()

REM == Create the Session Listening programs if not done yet.
if root!.getSessionStartProgram() = null
  root!.setSessionStartProgram("/WORK/BBJ_SRC/StartSession.bbj")
  root!.setSessionStopProgram("/WORK/BBJ_SRC/StopSession.bbj")
endif

config!.saveConfig()

See Also

BBjHttpSession

BBjAPI

BBjJettyContextConfiguration