Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Write to System Store to share across multiple ALs

34 views
Skip to first unread message

active1SM

unread,
Feb 4, 2011, 10:57:46 AM2/4/11
to
Hi, again,
I have a short name value file that several ALs need to read in. The
content and length will change as I move forward so initially just put
them into an array. Which is great in that AL but then I end up
repeating it again and again. SO was hoping to read the name/values
once and place the array in system store. Was looking for examples of
the Memory Stream Connector and other memory connectors but spending
way too much time in trial and error.
Anyone have a way to do a system.setPersistentObject with an array in
mind?
Thanks
Steve

Eddie Hartman

unread,
Feb 5, 2011, 4:33:32 AM2/5/11
to

If they are all running on the same TDI Server (and therefore same
JVM) you could have on AL read the array and then store it in a Java
property.

java.lang.System.getProperties().put("shortnames", myArrayList);

Then the other ALs just use the .get("shortnames") call to retrieve
it. And I would suggest an ArrayList since it dynamically grows for
you:

myArrayList = new java.util.ArrayList();
myArrayList.add(xxxx);

Hope this helps!
-Eddie

Andrew Findlay

unread,
Feb 15, 2011, 5:19:00 AM2/15/11
to
On Feb 4, 3:57 pm, active1SM <active...@gmail.com> wrote:

> I have a short name value file that several ALs need to read in. The
> content and length will change as I move forward so initially just put
> them into an array. Which is great in that AL but then I end up
> repeating it again and again. SO was hoping to read the name/values
> once and place the array in system store.

Remember that the System Store is a relational database. It would make
more sense to create a table for your data and store each item as a
separate row. You can then use normal TDI connectors to add and
retrieve items. This will give you persistent storage so you do not
have to worry about the startup sequence of your assembly lines. You
can then treat the file->system store synchronisation just like any
other TDI flow.

Eddie's solution will be faster at run-time.

Andrew

0 new messages