Solved

VSA scripting

Posted on 2003-11-14
5
242 Views
Last Modified: 2010-04-16
I am working on a method of extending our application to allow customers to create scripts and have these scripts run at certain key points within our system.

I have managed to get the scripts loaded, and can execute them successfully.

However to speed the run time process up I want to precompile all the scripts and have subsequent calls make reference to these pre compiled scripts.  The issue I have is that I have no idea when the site loses the compiled scripts.  Under IIS the objects seem to hang around between calls, if I create the script site under a regular Windows App the site goes away after I close the app.

I thought about creating a service to keep the site definetly running, however I notice that you only get one call to the GetGlobalInstance, which probably means that a single global object would be used by many clients, and therefore can not be used in a multi user environment.

Lots of things don't make sense and I can't find any answers, your help would be appreciated.
0
Comment
Question by:dhodge
  • 2
5 Comments
 
LVL 10

Expert Comment

by:smegghead
ID: 9754760
What to you mean by 'the site loses the compiled scripts' ?? and 'the site goes away'??
0
 
LVL 2

Author Comment

by:dhodge
ID: 9765169
I guess when the engine I have created goes out of scope the scripts are no longer loaded.  This is kind of what you'd expect, however when you create a site you specify a URI that identifies your code to the script engine.  I would have expected this URI to be available to other objects.  I basically want to be able to compile once and run many.

When I try adding the object to a service (or remoting it) I get problems instantiating the object, I think that's because the class I have to derive from IBaseVsa class can not be serialized.
0
 
LVL 2

Author Comment

by:dhodge
ID: 9766688
I made the object serializable and that seems to work now.  Thanks for the help.
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 11747194
PAQed, with points refunded (500)
ee_ai_construct - CS Mod
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now