Command Line Parameters

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Command Line Parameters

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:46 am

by Evan Thwaites >> Thu, 6 Jan 2000 15:25:04 GMT

Hi All

I'm wanting to specify some non-Jade command line parameters to be
used by a fat Jade client.
The Installation and Admin Guide says you should use the "endjade" parameter after the Jade parameters, and before your own parameters.
This sounds fine - what I need to know now is how to access them from within the Jade Application once it's started.
Anyone got any ideas/experiences on doing this?

Thanks
Evan.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Command Line Parameters - Fat, smart/thin and web

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:46 am

by Stuart Greaves >> Thu, 20 Jan 2000 1:13:22 GMT

Evan,

I'd like to know this too, from fat, smart/thin and web client viewpoints.

I was advised that JADE does not currently support the passing of parameter arguments to (jadehttp) Web applications for security reasons. Then came the giveaway in the footnote:
("Have you booked your place for the JADE User Group Seminar yet? * " http://news.jadeworld.com/jadehttp.dll? ... s_menu.htm)

OK, so it would appear to be an unsupported feature. Any hints, anyone?

Stuart

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Command Line Parameters - Fat, smart/thin and web

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:46 am

by Craig Shearer >> Thu, 20 Jan 2000 10:01:49 GMT

It can be done (obviously)... and we have done it in a system, but it does require inside knowledge, and yes, it is an unsupported feature. But, a Cardinal person told me, so here I am passing it on...

On the WebSession class, there is a subschemaHidden method called processRequest that takes the HTTP and Query Strings from the client (ie. Web Browser) and processes them.

You could reimplement the processRequest method to parse the query string, and strip out any command line arguments, then set some property on your WebSession object, which could later be interrogated by your application.

Note, you'll have trouble implementing a processRequest method as JADE won't let you create a new method on your WebSession subclass called processRequest. But you can load a processRequest method (at least in the current release - I hear that in a future release, this will be disallowed) using a schema load.

Here's the signature:

processRequest(httpIn: String; queryStr: String): Integer updating;

So typically, you'd process queryStr, then:

return inheritMethod(httpIn, queryStr);


Regarding whether it's a security problem - it only is if you allow users to command your application using parameters and then don't check that the user is actually allowed access to that part of the application. So, you just have to be aware of this, but I'm sure you're smart enough to work that out.

Craig.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Command Line Parameters

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:46 am

by BeeJay >> Wed, 22 Mar 2000 23:59:03 GMT

I defined the following external function for this purpose

getCommandLine() :String is GetCommandLineA in kernel32;

I then parse the resultant string, find the endJade parameter and then parse the remaining user parameters as appropriate.

Hope that helps,
BeeJay.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Command Line Parameters

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:46 am

by BeeJay >> Thu, 23 Mar 2000 0:22:12 GMT

Further to this, you could get the Server's command line by calling this method from a serverExecution method.

In Thin Client mode if you wanted the AppServers command line then you would need to define an additional external function with applicationServerExecution as follows:

getCommandLineAppServer() :String is GetCommandLineA in kernel32 applicationServerExecution;

Cheers,
BeeJay.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Command Line Parameters

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:47 am

by Torrie Moore >> Thu, 23 Mar 2000 0:38:48 GMT

Just a question

We have some external methods that we want to run either at the app server of the thin client end. Is there some way of doing this with defining two methods?

Torrie

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Command Line Parameters

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:47 am

by BeeJay >> Thu, 23 Mar 2000 22:28:19 GMT

I would anticipate the answer to this would be no. When running in Thin Client mode, ExternalMethods must always run on the AppServer in order to be able to reference the JADE object against which the ExternalMethod is processing.

I suspect that if you could execute external methods at the presentation client, then it would not be a very thin client as it would require the full Jade database environment to execute.

BeeJay.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Command Line Parameters

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:47 am

by Dean Cooper >> Thu, 23 Mar 2000 23:14:41 GMT
We have some external methods that we want to run either at the app server of the thin client end. Is there some way of doing this with defining two methods?

I assume you meant external functions and not external methods, as external methods can never execute in the thin client. Methods are dispatched to an object and therefore require an instance of the object manager (ie: a node). External functions do not have a receiver; they are called directly. Right now, if you want to programmatically control where a function executes (ie: app server or thin client), you need to define two external functions.

Dean.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest