Creates a new application server object or returns the IAppServer
interface to an existing application server object.
Namespace:
GrassValley.Mseries.AppServerAssembly: GrassValley.Mseries.AppServer (in GrassValley.Mseries.AppServer.dll) Version: 1.0.0.0
Syntax
C# |
---|
IAppServer CreateAppServer( string suiteName, string app, out bool isNewConnection ) |
Visual Basic (Declaration) |
---|
Function CreateAppServer ( _ suiteName As String, _ app As String, _ <OutAttribute> ByRef isNewConnection As Boolean _ ) As IAppServer |
Visual C++ |
---|
IAppServer^ CreateAppServer( String^ suiteName, String^ app, [OutAttribute] bool% isNewConnection ) |
Parameters
- suiteName
- Type: System..::.String
Name of the suite.
- app
- Type: System..::.String
App.
- isNewConnection
- Type:
System..::.Boolean
%
Is new connection.
Return Value
an IAppServer interface to a new or existing application serverRemarks
AppService is designed so that when a user is finished running their
client application, they have a choice whether to close or suspend
their connection. This is handled by the AppServer. If the AppServer
is closed, all channel connections that it owns will be closed and
disconnected. If the AppServer is suspended, all connections will
remain running as long as their channels are not stolen or until the
user reconnects and closes the connections. The user may reconnect to
the same AppServer on any machine as long as their suite name and user
name remain the same. This means that 2 different users may not each
have an AppServer with the same suite name. Here's is the logic flow
of how AppServers are created:
1. AppServerMgr first looks at the suite name passed in.
2. If no AppServer exists with that suite name, AppServerMgr creates a
new AppServer with that suite name and returns a “isNewConnection” value
of true.
3. If AppServerMgr has an AppServer with that suitename, it checks if the
user that is requesting it is the same as the one that originally created
it.
4. If the user is the same, AppServerMgr returns the AppServer and returns
a “isNewConnection” value of false because it did not create a new AppServer.
5. If the user is different, a SuiteInUseException is thrown with a “AppServer
is in use by...” message. If the user is different, an InvalidOperationException is thrown with the “AppServer is in use...” message.