[progress Communities] [progress Openedge Abl] Forum Post: Re: Jsdosession Mixed...

  • Thread starter Thread starter egarcia
  • Start date Start date
Status
Not open for further replies.
E

egarcia

Guest
Hello, Thank you for the info. When a session is created and a catalog is loaded, the resources specified in the catalog are registered internally. This allows you to later use syntax such as "new progress.data.JSDO({name: pResourceName});" to instantiate a JSDO without specifying the session. However, only one resource with a given name can be used. You would get the error message "A resource named ' ' was already loaded" if a resource with the same name is found in another catalog. Notice that in this case, because an exception is thrown, the regular processing of the catalog is stopped, i.e., additional resources listed in the catalog might have not been registered. Depending on your needs, you could just leave the specific resource in one catalog / session. For example, if the resource needed to be anonymous, the access to this resource would always be anonymous. Another approach, would be to logically create two resources, perhaps, two Business Entities with different names. You could use inheritance or wrap the methods to reuse the code. This would allow you to logically access the data anonymously then with authentication (for example if you want to do auditing). We have a story in our backlog to allow one resource to be in more than one session, in which case you would need to qualify the name of the resource. This may be addressed in a future version. I hope this helps.

Continue reading...
 
Status
Not open for further replies.
Back
Top