Synchronization issues about FMS server side language!

My FMS applicaiton(FMS4.5) use a Array on the main.asc ,
anyone who connect to the server will change(remove/add) item of the Array,
i'm worry about that if there is a synchronization issues with that?
Is there any class i can use to lock/unlock the Array when i  modify the Array?
THX!

You can have synchronization issues. For using lock/unlock, you can use server side Shared Objects. For more details about Shared Object, check the below link:
http://help.adobe.com/en_US/adobemediaserver/ssaslr/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7 e63SSASLR.2.3.html

Similar Messages

  • JNI via Server-Side Language

    I'd like to use the following post as a reference: http://72.5.124.102/thread.jspa?threadID=788137&messageID=4479784
    "The DLL will remain loaded between calls, so if you use a global variable to store the connection then it should be ok. "
    Of course this makes logical sense. However, JNI doesn't have a handle from my understanding... JNI looks like this:
    private native void nativeMethodInvoke();
    static {
        System.load(path+dllName) // many alts to this, but yea.
    // somewhere in main thread....
    SelfClass varRefToSelf=new SelfClass();
    // where SelfClass is the current class running.
    // This doesn't make sense to me, considering usage of 'this' - so if anyone can explain that, I would greatly appreciate it.
    varRefToSelf.nativeMethodInvoke();So.... am I supposed to keep a global reference within my class, to itself?!?
    The actual problem is that I'm using a server-side language to invoke Java, and thus C++ via JNI. However, the server-side language is creating a new instance of the JAR upon each invocation. So my plan was to pass a reference to the module handle, and somehow manage to get that back to server-side language, and then furthermore back to Java JNI. Am thinking about moving to a servlet instead, since this doesn't appear to be possible - as unfortunate as that is.
    Would SingleThreadModel work in this case? Or should I have C++ thread itself, so when Java makes a call, I can let C++ handle data by forwarding to correct module in memory? Assuming the above mentioned post is accurate, then the DLL, when loaded by Java, will stay in memory until unloaded. If the jvm is exiting after each server-side invocation, I must assume multiple instances of the dll are being created. So, am thinking this prospect will work... servlets aside...
    Any help is appreciated. I clearly do not understand JNI as well as I should.
    *Edit:
    I have already tried this, and found that C++ DLL's thread is definitely active in memory post-jvm exit. The DLL also appears to be loaded multiple times, as the data I'm dealing with appears to be unique, in that it's not "stepping into itself" and overwriting pointers, or anything.
    Am I going to have to create an instance of my class, via itself, to launch itself in the jvm manually - to keep the reference to dll in memory?
    Although that statement sounds terribly redundant... I believe it's accurate...
    1.) Create instance of class that's called by server-side, launch it under new jvm
    2.) Have orig class return to server-side as normal, and forward any new requests to the jvm-launched "self"; based on detection of class/jvm in memory...
    For being cross-platform "magical", Java sure makes it difficult to perform pretty basic tasks....

    Thanks for the great information jschell, this clears up alot. I'll play around with these new prospects and see if I can get this running properly.
    Also, let me define more what I'm actually doing.
    I'm using Railo, and a CFX "tag" to invoke a JAR. This Jar contains the JNI to execute a DLL's code. This dll's code is merely in place to perform some server tasks - mostly routine file maintenance, and checks to ensure normal operation. Some of this includes db queries. Yes this can be done in Java for the most part, but we plan to use the DLL exports later in a deployment scenario.
    So, "Did you mean it is loading the jar each time?", I do believe so. However, the instances appear to be different. If i were to create a thread within the JNI invoking class, which i have tried by the way, and create a global variable with some value, the second calling of the JAR file reports that it has not been defined yet on class initialization. Additionally, the thread I mentioned also halts, and does not exist within the second calling.
    Let me show some actual code...
    Test.cfm...
    <cfx_mytag Library="myLibrary.dll" task="function1">
    <cfscript>
    ... // do some stuff.
    </cfscript>If I were to alter that to:
    <cfx_mytag Library="myLibrary.dll" task="function1">
    <cfx_mytag Library="myLibrary.dll" task="function2">
    <cfscript>
    ... // do some stuff.
    </cfscript>I found that function2 in the same JAR, loaded via "cfx_mytag", reports inexistance of function1's execution - which registered a value into a global var.
    This is why I must assume that the JAR is being loaded independantly - each time. Correct me if wrong. Perhaps my terminology is off - the class within the jar file is multi-instanced, as far as I can tell. Or rather... Railo is creating mutliple instances of this class - and thus I lose my handle to my dll - every call... Seemingly at least.
    //Java...
    import com.allaire.cfx.*;
    public final class myClass implements CustomTag {
         private Request req;
         private Response res;
            public boolean igetresetoften;
         private native void gogoGadgetDLL();
         public myClass() {
        public void processRequest(Request request,Response response) throws Exception {
             this.req=request;this.res=response;
              if (!this.igetresetoften) {
                     igetresetoften=true;
                     res.write("yea... this is annoying");
                // in actual code - function1() assigns global var.
                // and function2() reports to response buffer the value of the global var , which is constantly false each run.
    }Notice the similarity to a servlet (request/response buffers). I've dealt with servlets, so I know that all requests are threaded.. but the global vars in a servlet are, in fact, ... global. Not in this case, it would seem.
    Thanks again, I'll let you know of my results, late tonight.
    Edited by: jSD7 on Nov 13, 2009 4:20 PM

  • When php is the server side language...

    Can SQL injection happen to a flash website which uses php as the server side language?
    (Highly appreciate your input)

    you're welcome.
    and, it's easy to prevent using mysql_real_escape_string():  http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php
    i always use a for-loop to convert all the variables to php variables and while i'm at it, prevent injection:
    foreach ($_POST as $key => $value) {
       $$key = $value;
       $$key = mysql_real_escape_string($$key);

  • Security issues for Java server side code

    When reading the Oracle 8i documentation regarding using JDBC
    with Java running within the database, I found that the Oracle-
    specific call 'defaultConnection()' can be used instead of the
    standard 'getConnection()'.
    This appears to be what I want to use as it avoids Net8.
    However, in the documentation it states that the user ID and
    password are ignored. Is there no way, then, of implementing
    user based security in a Java program using defaultConnection()?
    Thanks,
    null

    Hi Kiran
              See u know how to call serverside java objects from remoteobject?  If u know that every thing same that replace coldfusion and place ur java stuff
              but nothing will change at client side cairngorm architecture.. use blaze ds server to connect with the server and make a remote call to the server and have fun.
             i think u know how to initialize services in cairngorm framework and make some struff on delegate and call serverside java methods from remote object service.
              u can try this dont try for examples in the net or something.. u have a complete knowledge on cairngorm framework .. and just u want to develop j2ee applications ..
              make try with sample applications with j2ee server.. its very easy and little interesting.. make some pojos in serverside to communicate with the database and call that methods..
                i think this will help u and i dont have perfect example for serverside java code...
                   this is not and example in cairngorm and java .. but u know cairngorm  and i am posting here only the tutorial how to communicate with java methods
             read this article    http://www.adobe.com/devnet/flex/articles/file_upload.html

  • HI,MASTER,IS FMS server-side NetGroup.sendToNearest () and NetGroup.post () can reliably send it?

    I do a chat room, and use of FMS NetGroup.post () to do the public chat, with the FMS NetGroup.sendToNearest () do private chat whisper, test all normal, but I've heard, these two methods are not 100% reliable transmission of data, can I use these two methods do, a very large number of my application, I have used the forward。
    if(e.info.fromLocal == true){
    // We have reached final destination
    trace("Received Message: "+e.info.message.value);
    }else{
    // Forwarding
    netGroup.sendToNearest(e.info.message, e.info.message.destination);
    break;
    Rule out a firewall problem, these messages can pass 100% to destination?
    I do not understand English, so sorry, please help me

    THANK YOU VERY MUCH Mike.
    Will my chat room this can be used NetGroup.post () to do an open chat with NetGroup.sendToNearest () do private chat。Or that the use of traditional Application.broadcastMsg () to do the public chat, I used your advice

  • How to implement server side methods in client side player from main.asc?

    Hi,
    I am developing video player using RTMP NetConnection and NetStream object but it is giving me below Error. Can you please tell me how can I handle this. I have main.asc file form FMS server side but I don't know how to use it. 
    Async Error found = <br>Error #2095: flash.net.NetConnection was unable to invoke callback setUserID.
    Async Error found = <br>Error #2095: flash.net.NetConnection was unable to invoke callback syncChat.
    Async Error found = <br>Error #2095: flash.net.NetConnection was unable to invoke callback playingNotComplete.
    Async Error found = <br>Error #2095: flash.net.NetConnection was unable to invoke callback nowPlaying.
    Can anyone please help me ot solve this issue?
    Best regards,
    Sunil kumar

    javascript are run on the client side.. but i think what you actually mean is getting some validation to your database without submitting the form?. yes it doesn't consumes time and memory of server.. why not use ajax so you can only submit a little request.. rather than submitting the whole page..

  • Server side tracking on non-OSX server

    Does anyone aware of attempts of reproducing server side tracking on non-MacOSX server platform?
    Our primary storage is based on opensolaris + zfs, giving us a lot of advantages. But synchronization of mobile users always takes some serious amount of time.
    Obviously re-exporting home directories through OSX server doesn't change something, because server side tracking requires filesystem to be local on server.
    I can guess that protocol should be relatively simple and doable on other unixes (as soon you get some way to track filesystem changes).

    while part of it may be technically feasible, i've never seen or heard anything about implementing server side tracking on a non-os x server. at the very least, the server runs sshd on an alternate port for client communication. beyond that, i don't know what magic is involved.
    in practice, i haven't seen it work reliably on os x server, though i haven't done any testing with this enabled on 10.6 server yet. it may not be worth pursuing.

  • What event does FMS server fire when a clients starts/stops streaming

    I want to log activities on my stream (both live and recorded) using a web service I've made. In the FMS server side AS3 documentation I can find events for onconnect/ondisconnect, but that is not quite what I want. What I want is and event that fires when a user start viewing a stream, or stops viewing.  Today I'm using the following code:
    application.onConnect = function(client)
              client.getStreamLength = function( streamName ) {
                        LogStart('', this.id, this.ip, streamName);
                        return Stream.length( streamName );
       this.acceptConnection(client);
    However not all clients uses the getStreamLength, so this does not realy work. The problem is that in the "onConnect" even I do not have access to the streamname, else I think I could have used this event.
    Thanks in advance

    Hi Wujemurray,
    If you'd be so kind as to email me offlist we'll get a support incident opened for this and can get to the bottom of the issue you're facing.
    Asa
    [email protected]

  • HTTP SERVICE - How to get the value of my params on the server side

    I am new to flex and with the url limitation i was trying to
    do the following ....send a bunch of ids... using params variable
    var myservice:HTTPService = new HTTPService();
    myservice.url = url;
    myservice.method = "POST";
    myservice.resultFormat = "e4x";
    myservice.send(params);
    The question is how do i get the value i passed on using
    params on the server side? can the variable params be a string or
    array or does it have to be object type?
    Any help would be greatly appreciated.

    Most server side languages have a function or an array where
    you extract the variables. in PHP they arrive in global arrays
    called $_POST and $_GET.
    Other languages have methods like request.formvars or
    request.query. Check your serverside language on how that is
    done.

  • ODAC, ODT why do they need server side install?

    I am a DBA who was recently asked to do some research on Oracle development tools for Visual Studio .Net 2008.
    I downloaded the ODAC and ODT (ODTwithODAC1020221.exe) from OTN. I am under the impression that these development tools are installed on the client workstation. Is this correct? If yes, then I cannot explain why the installation of ODAC and ODT fails immediately complaining that it needs Oracle development extension for .Net installed in the Oracle home.
    I go to the Oracle development extensions for .Net and it is a server side install. Can someone please tell me what exactly needs to be done to get the Oracle development tools for VS .Net working?
    I have read the documentation and it does not say anything about a server side install. Sorry if I am not very clear. This is unknown territory for me.
    Database version: 10.2.0.3
    Visual Studio .Net 2008
    Oracle client version 10.2.0.3
    Thanks

    Thanks for the reply. As I said, this is totally new to me so can you please point me to a download link?
    As far as I know, I tried to install ODT on the client. I tried both with 10g and 11g. The installation stop at the third screen complaining it cannot find Oracle Database Extension for .Net in the Oracle home where I am trying to install. I am trying to install in c:\oracle\product\10.2.0\client_1.
    I downloaded from:
    http://www.oracle.com/technology/software/tech/windows/odpnet/index.html
    I tried the following downloads:
    ODAC 11.1.0.6.20 with Oracle Developer Tools for Visual Studio
    Oracle Developer Tools for Visual Studio .NET with ODAC 10.2.0.2.21
    Both the downloads clearly say that these are ODT but they fail to install. Please help me understand what do I need to download.
    Thanks

  • Edit Save Server Side XML [HELP]

    I have an XML that is keeping a few scores. ( 5 entries ).
    I need a Flash interface to be able to edit these nodes and save the XML back to the server.
    Has anyone done anything like this ?  I am open to using PHP with it to make it work.
    Any guidance with this is appreciated.

    Exactly you need a server side language to do it, PHP is good option.
    You need save the scores to a database (using PHP) then load the data from the Data base (using PHP) in a XML format
    To call the PHP files from Flash use URLLoader
    http://library.creativecow.net/articles/brimelow_lee/php_mysql.php

  • Issues with server side recording in FMS

    I have FMS installed on Windows XP machine.
    I am recording using the server side Stream class. This
    creates a FLV but when I play it back it does not play though it
    has created the file under the dir in FMS.
    After a lot of research I figured out that the recording is
    done properly but I have to restart my FMS before the play back.
    After which the play back goes on smoothly.
    Can any one help me with this. I need to know if this is a
    known issue or else I have to do something on stream at the the
    server side after recording so that I can play it back immediately.

    **Bump**
    I am having a similar issue. I have an app that will redirect
    the stream to the same application but a different instance. The
    ns.publish method is called for recording and the file will write
    correctly. However, after I stop publishing and go in to play the
    file in flv player, it doesnt play back. Looks like the meta data
    is there but no video. Is there a specific procedure to close off
    the file or something that I'm not performing?

  • MS CRM 2105 server side synchronization

    Hello ,
    My online CRM is integrated with server side synchronization. The incoming and outgoing emails are working fine before.
    But yesterday onwards the incoming emails are not receiving in to CRM. But I see the emails are exists in the exchange server.
    I have tried with test and enable the Mailbox. From yesterday onward the status is still showing the
    "the email configuration test is in progress". 
    I have a plugin which was triggering on email creation but in post operation, I have disabled the steps also.
    But still the issue is not fixed.
    Any help will be appreciated.
    Regards,
    Priya

    Hello,
    Enable tracing it will give you pointer, what is wrong.
    You could also refer: https://technet.microsoft.com/en-us/library/dn850386.aspx?f=255&MSPPError=-2147217396
    http://gustafwesterlund.blogspot.in/2014/04/server-side-sync-trouble-shooting.html
    Microsoft Dynamics CRM Training|Our Blog |
    Follow US |
    Our Facebook Page |
    Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

  • How do I tell FMS to only serve a section of a file using server-side ActionScript?

    We have a bunch of mp3 files on our server and we'd like to serve only particular sections of particular files to users.  For example, hello.mp3 might be four minutes long, but when user 1 tries to play it, he should only be able to play the section from 0:30 to 1:00, whereas user 2 should be able to play the whole thing.
    I'm coming from a background using Wowza Media Server, where this is fairly easy to achieve: http://fmsguru.com/showtutorial.cfm?tutorialID=78.
    Wowza doesn't require any change to the player (it doesn't call any special methods), so I'm looking for the same here.
    I've been fiddling around with the main.asc file and the "Server-Side ActionScript" API to try and achieve something similar.  In particular I've found the Stream.play method, which seems relevant.  But I can't figure out how to attach a handler to a "play" event; all the examples I've seen only attach to Application.onConnect, which doesn't seem to include a connection to a particular file, which I need in order to determine the section that can be played.
    So I'd like to do something along the lines of this (this is completely made up and doesn't follow any of the APIs; it's just an illustration of what I'm trying to achieve):
    application.onConnect = function(client) {
       client.onPlay = function(stream) { // Client.onPlay doesn't exist; what should I do here?
           var section = getStreamSection(client, stream);
           stream.play(section.start, section.end);
    var getStreamSection = function(client, stream) {
       return { start: 30, end: 60 }; // Return value is based on the user's credentials and the file they're trying to stream

    You can find the documentation for Plug-ins here:
    http://help.adobe.com/en_US/flashmediaserver/plugin_apiref/index.html
    http://help.adobe.com/en_US/flashmediaserver/devguide/WS5b3ccc516d4fbf351e63e3d11a0d662434 -7ff6PluginAPI.html
    Basically you need to concentrate on E_PLAY event and two fields F_STREAM_LENGTH & F_STREAM_POSITION. I am pasting below some code which you need to paste in your sample Auth Plug-in which you can find in : <installdir>/samples/plug-ins. You would have paste below code in case E_PLAY section in MyFmsAuthorizeEvent::authorize() function and compile it. You would basically get AuthModule.dll which you need to place in modules/auth and restart FMS.
    // Set the Stream to be played back only for 10 seconds starting from 10 th second
                                  // Stream will play from 10th Second to 20th Second
                                     float fValue;
                                  char buf[1024];
                                  if (getFloatField(m_pAev, IFmsAuthEvent::F_STREAM_LENGTH, fValue))
                                            float fLength = fValue; // in seconds
                                            sprintf(buf,"Original Stream length value passed from player %f\n",fLength);
                    m_pFmsAuthServerContext->log(buf, IFmsServerContext::kInformation, false);
                                            fLength=10.0;
                                            sprintf(buf,"Modifying Stream length value passed from player %f\n",fLength);
                    m_pFmsAuthServerContext->log(buf, IFmsServerContext::kInformation, false);
                                            setFloatField(m_pAev,IFmsAuthEvent::F_STREAM_LENGTH,fLength);
                                  if (getFloatField(m_pAev, IFmsAuthEvent::F_STREAM_POSITION, fValue))
                                            float iPosition = fValue; // in seconds
                                            sprintf(buf,"Original Stream Position value passed from player %f\n",iPosition);
                    m_pFmsAuthServerContext->log(buf, IFmsServerContext::kInformation, false);
                                            iPosition=10.0;
                                            sprintf(buf,"Modifying Stream length value passed from player %f\n",iPosition);
                    m_pFmsAuthServerContext->log(buf, IFmsServerContext::kInformation, false);
                                            setFloatField(m_pAev,IFmsAuthEvent::F_STREAM_POSITION,iPosition);

  • What's wrong about  "JSF that emits Ajax-widgets" on the server side?

    Hi,
    I just read this chat about Ajax on the server side and I wonder what this comment bellow means when we are building JSF application with Ajax:
    Another thing to consider is that in a pure Ajax application (i.e. one that's not a hybrid of a server-side technology like JSF that emits Ajax-widgets), the server can pretty much just respond to requests from the Ajax client in a stateless manner, and all of the state gets distributed to the client, greatly reducing the memory resources on the server. I'm working on an app like this for IBM Rational and we're really excited about the *decreased* load on the server by distributing state to clients.
    http://www.devwebsphere.com/devwebsphere/2006/04/ajax_and_its_im.html
    Thanks in advance.

    Just created a half an hour ago application:
    http://jsfbyexamples.com/facesTrace/
    shows that the AJAX request spends less time on the server even it walk though the whole life-cycle. This is a very small page, BTW. On the complicated page, the difference will be more significant. It is about server resources.
    About network traffic: Do you actually believe that sending the whole page produces less traffic than the portion updates? Just mathematically speaking?
    OK, I guess you mean the AJAX application requires traffic comes back and forward to produce the AJAX functionality. Non-AJAX application does not produce the traffic, but it does not produce the functionality you have in the first case.
    People who argue about it just try to compare Something to Nothing. So, where is the point?
    Sergey : http://jsfTutorials.net

Maybe you are looking for

  • Imac extended display with win 7

    Hi, I currently own an imac 27" and i'm looking for an option to have both mac os and win 7 running simultaneously. Is this possible? Instead of using bootcamp, i was thinking of using a virtualized copy of win 7 and have it extended onto a second 27

  • Info record and source list mandatory for PO creation?

    Hi Gurus, Client wants to make Info record and source list mandatory for PO creation? If Inforec and source list not available for that material, then user can't able to create PO. How can I achieve this requirement? Any user exit available? pls help

  • BEx Prompt not visible in webi

    Hello EveryOne, I am creating a Web intelligence Report on BEx query ( Coming from .UNV Universe ) , My problem is i have used two key dates in query . One is visible in webi another one is not. In Query analyzer both dates are visible . Can someone

  • Why does Flash10e.ocx cause IE7 to crash?

    An associate is having a problem when a website attempts to run Flash10e.ocx in Shockwave Flash Object.  Internet Explorer 7 is the browser being used on a computer running Windows XP Professional SP2.  I've updated to Flash Player 10.0.45.2 but the

  • OD, Kerberos and DNS

    Hi, heres the debug log file when im trying to connect to Kerio webmail with an OD user get the following error 'Cannot resolve network address for KDC in requested realm' kinit <user> works fine though any clue ? tia Jeff [18/Nov/2010 16:20:37][2982