×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Reload Java Collaboration Rule in Multi Mode eWay

Reload Java Collaboration Rule in Multi Mode eWay

Reload Java Collaboration Rule in Multi Mode eWay

(OP)
Hi, I do not think this can be done but I will ask anyway.  We are in the process of converting some of our Monk eWays to Multi Mode Java (stceway.exe) eWays.  One requirement of the project is that we support all of the functionality we supported in our Monk eWays, and one bit of functionality is the ability to reload a "subcollaboration" without having to stop and restart the eWay.  We have hundreds of collaborations and they are frequently being modified for a variety of reasons and it is not possible for us to shut down the application every time we want to promote an updated collab.

In Monk it is very easy, the eWay accepts a specific message type which tells the eWay to reload the collab and the code looks like this:
      ;;Check if this is just a reload message
      (if (string-begins-with? message-string "RELOAD")
       (begin
        ;; Reload collab
        (load (substring message-string 6 (string-length message-string)))
       )
      )

In a Java Collaboration Rule when you want to load a subcollaboration the code looks like this:
JSubCollabMapInfo mapForSubCollab = jCollabController.createSubCollabMapInfo(sCollabName, this);

Once the subcollaboration is loaded the JCollabController class apparently keeps a cached copy of the JSubCollabMapInfo class created in the above statement.  So even though I remove all references to this class instance, the next time I call createSubCollabMapInfo I get the same instance loaded from the cache.

Does anyone know how I can force the JCollabController to reload a collaboration rule?

RE: Reload Java Collaboration Rule in Multi Mode eWay

Cliffbob,

We think that you are in fact rebuilding the JSubCollabMapInfo instance, but that you may be doing it with the old 'version' of the collaboration rule. Can you verify that when you promote your collaboration rule that you want to load is that it is updating in the client directory of the participating host?

We think it may not be updating, and that you are still using the same class file from the client directory...

-DevIntProd

RE: Reload Java Collaboration Rule in Multi Mode eWay

(OP)
DevIntProd,

Your assessment was absolutely correct on one hand.  The collaboration rule files specified in the rule's .ctl file get loaded from the registry to the client directory when the collaboration rule first loads. And as you suggested these files were not getting loaded in to the client directory when I promoted the new version of the collaboration rule.

So based on your input I tried manually copying the updated collaboration rule files from the registry to the client directory after I had promoted the new version of the collaboration rule, and prior to sending the reload command. Unfortunately the outcome was the same, the JCollabController apparently returned a cached instance of the JSubCollabMapInfo object which had been loaded from the previous version of the collab rule.

One piece of evidence that seems to suggest that the collab rule is not being reloaded is that the first time the main collab rule calls createSubCollabMapInfo() for a particular collab rule it takes approximately 10 seconds for the JSubCollabMapInfo instance to be returned.  Subsequent calls to this method for a collab rule which had been loaded previously are virtually instantaneous.

Regardless of the outcome however your initial assessment was dead on.  Thanks for your input.

RE: Reload Java Collaboration Rule in Multi Mode eWay

Cliffbob,

There is a command you could have run in your main collaboration rule to retrieve the file from the registry every time before creating the new instance to work from. The control broker would go to the registry for the file, do a checksum campare, and if the file from the registry is different it would reload it into the client directory.

I don't know if you want to incur any performance cost that might result, but I think the command is:

retrieveRegistryFile(java.lang.String aFileName, java.lang.String aRegistryFilePath)

Retrieves a file from the e*Gate Registry to the client directory.

as taken from the javadocs (JCollabController).

Hope this helps, and glad the first post was correct.

-DevIntProd

RE: Reload Java Collaboration Rule in Multi Mode eWay

(OP)
Thanks DevIntProd, this unfortunately does not work either.  This bit of functionality although it has been useful to us in our Monk eWays, we are willing to live without.  Thanks for your posts, they have been very helpful.

-Ben

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close