Re: Events in Service Objects
At 12:32 AM 8/20/97 EDT, Gerard R. Connolly wrote:
>
The default partitioning in Forte does some strange things, in particular its
placement of user-visible service objects in the client partition no matter
where they are referenced and used.Do you have any sense about whether this relates to how well-stuctured the
projects are when you go to do the partitioning? I.e., if you had a tool
which helped in analyzing the way in which projects referenced each other
and could use this to create an idea project structure before you did the
partitioning, would the default partitioning be more likely to conform to
the desired end partitioning?
=========================================================================
Thomas Mercer Hursh, Ph.D email: [email protected]
Computing Integrity, Inc. sales: 510-233-9329
550 Casey Drive - Cypress Point support: 510-233-9327
Point Richmond, CA 94801-3751 fax: 510-233-6950
Similar Messages
-
Hi,
Is it possible to have a service object checking permanently for events
posted by other service objects? I have not been able to start this type of
object.
Thanks,
Guillermo Turk
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>I have something this (please, some patience :-) ):
//Example: handle event (the event is Beep)
interface AlarmListener{
void Beep(String hour); //declare a event handler
//The class that "raise" an event Beep
class Clock{
AlarmListener theAlarmListener; //Referecne to an listener object
//Register an listener object
public addAlarmListener(AlarmListener theAlarmListener){
this.theAlarmListener = theAlarmListener;
private ringAlarm(){
theAlarmListener.Beep("10:00 P.M."); //Raise Beep event
class Guy implements AlarmListener{
public Guy(){
Clock clock = new Clock();
clock.addAlarmListener(this);
//Handle Beep event
void Beep(String hour){
System.out.println("Ohhh, its time of wake up!!!");
//End
But, in this model my source object have only an listener object.
This can be improved by a array, like this:
class Clock{
AlarmListener[] theAlarmListener = new AlarmListener[10];
private int i = 0;
//Register an listener object
public addAlarmListener(AlarmListener theAlarmListener){
this.theAlarmListener[i++] = theAlarmListener;
//More code...
making to a side the limitation of size of an array (although this can be managed somehow if it is necessary), the problem begining to be more and more complex... i.e., it is necessary to create a method for unregister a listener...
And, what about with multi-threads programs??? The addAlarmListener method should be synchronized or something??
It should have an easier way!
PD: I think that I have used the Delegate pattern in conjunction with some other pattern.
PD: Forget my English. It is terrible
Saludos -
RE: Re[2]: Service Object events and LockMgr
I think there are a lot to implement a lock manager. If several objects
should be updated in one transaction, the lock manager should be able to
handle rollbacks. Other things like release lock when exception happens,
avoiding dead locks, etc. Most of the features are provided by DBMS, so
I think using a option 2 would be a better solution.
-----Original Message-----
From: Dimitar Gospodinov [mailto:[email protected]]
Sent: Wednesday, July 28, 1999 2:44 PM
To: Peter Sham
Cc: Duncan Kinnear; [email protected]
Subject: Re[2]: Service Object events and LockMgr
Hello Peter,
Wednesday, July 28, 1999, 9:19:10 PM, you wrote:
PS> Hi,
PS> Just wonder exactly how this Lock Manager can be
implemented. Do you mean that you are
PS> going to cache every object that is instantiated from the
database? Or you just cache
PS> the object id, primary key, etc?
PS> Frankly speaking, I won't attempt to due with this kind
of currency coding myself as
PS> the database vendor has spent years in coding just to do this.
PS> Regards.
The second one - you just need some unique value that will identify
the object being locked. You should register with the Lock
Manager only
the objects that you want to lock.
For me, one of the goal of such pattern is to give you some freedom
from the specifics of the database lock mechanism.
Another benefit that I can see is that using such approach you can
always answer to the question: "Can I modify/delete this object?".
Best regards,
Dimitar mailto:[email protected]
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive
<URL:http://pinehurst.sageit.com/listarchive/forte>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>I think there are a lot to implement a lock manager. If several objects
should be updated in one transaction, the lock manager should be able to
handle rollbacks. Other things like release lock when exception happens,
avoiding dead locks, etc. Most of the features are provided by DBMS, so
I think using a option 2 would be a better solution.
-----Original Message-----
From: Dimitar Gospodinov [mailto:[email protected]]
Sent: Wednesday, July 28, 1999 2:44 PM
To: Peter Sham
Cc: Duncan Kinnear; [email protected]
Subject: Re[2]: Service Object events and LockMgr
Hello Peter,
Wednesday, July 28, 1999, 9:19:10 PM, you wrote:
PS> Hi,
PS> Just wonder exactly how this Lock Manager can be
implemented. Do you mean that you are
PS> going to cache every object that is instantiated from the
database? Or you just cache
PS> the object id, primary key, etc?
PS> Frankly speaking, I won't attempt to due with this kind
of currency coding myself as
PS> the database vendor has spent years in coding just to do this.
PS> Regards.
The second one - you just need some unique value that will identify
the object being locked. You should register with the Lock
Manager only
the objects that you want to lock.
For me, one of the goal of such pattern is to give you some freedom
from the specifics of the database lock mechanism.
Another benefit that I can see is that using such approach you can
always answer to the question: "Can I modify/delete this object?".
Best regards,
Dimitar mailto:[email protected]
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive
<URL:http://pinehurst.sageit.com/listarchive/forte>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte> -
Re: Service Object events and LockMgr
On the option that you have considered, I have implemented the same model
in my previous project (using Java/RMI), but I felt that it is more than
what is normally needed for concurrency protection.
I can suggest another option that is worth considering which is in place in
our app for concurrency.
Almost every table in our db has created By, created On, modifed By,
modified On columns. The parent class of all business objects has
attributes that correspond to these four columns. In addition to these
four, there is a fifth attribute (introduced when concurrency was built)
called originalModifiedOn. Upon retrieval from the db, it is set to
modifiedOn value (from the db), during UPDATE, the value in this column is
added part of the WHERE clause. So when the second user tried to do save
the same object, the underlying db update will get a 'zero rows updated'
which is translated into an application error 'possible concurrency
error'. The user re-retreives the now 'stale' object before applying their
edits.
A lot of these things are and can be built into the framework imposing very
little work that each Object needs to do to have concurrency protection.
I am not sure if there is a mention in the Patterns paper of this model,
but it is very easy to implement and supports what is needed.
Kishore Puvvada's Mail
[email protected] on 07/28/99 01:47:00 AM
To: [email protected]@INTERNET
cc: (bcc: Kishore Puvvada/HQ-IS/TAL)
Subject: Service Object events and LockMgr
Hi folks,
We're currently looking at strategies for dealing with the simultaneous
updates to the database from multiple clients (concurrency
management). That is when two (or more) clients load the same object to
edit it, then make different changes and save them to the database.
We have a copy of a Forté document (from the "Patterns" course, I
think) which describes three methods of dealing with this:
1) Lock the database table row as soon as a client select it for editing
and hold the lock until it is saved.
2) Immediately before 'saving' check that the database hasn't changed
(either by reading what's there before updating, or by using a huge
'where' clause that contains all unchanged fields)
3) The Forté "LockMgr" pattern, which uses a service object with notifier
proxies to allow locking and updating notification between the clients.
Option 3 is obviously the most robust method, but it requires a fair
amount of coding and could also be a bottleneck for database reads and
writes.
But I have another option for which I was looking for opinions. What if
we had a "Change Event manager" which broadcast an event every time
a change is made to the database. Each business class would have its
own event. If the event had the object's primary key as a parameter, then
clients editing that particular object type could check to see if the object
currently on screen is the one that changed. That way you could disable
the 'save' until they had refreshed their on-screen data.
It's not particularily elegant, but it's reasonably simple to implement. It
also deals with changes sent across our WAN from other database
servers.
But this option is only worthwhile if you can replicate the "Change Event
manager" SO and still register for an event on the client. Can clients
register for SO events and receive an event generated by any of the SO's
replicates? Or when you register for an SO's event do you register for
only one instance of the SO?
Thanks in advance for any answers.
Cheers,
Duncan Kinnear,
McCarthy and Associates, Email:
[email protected]
PO Box 764, McLean Towers, Phone: +64 6 834 3360
Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
Providing Integrated Software to the Meat Processing Industry for over 10
years
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:
http://pinehurst.sageit.com/listarchive/forte>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>On the option that you have considered, I have implemented the same model
in my previous project (using Java/RMI), but I felt that it is more than
what is normally needed for concurrency protection.
I can suggest another option that is worth considering which is in place in
our app for concurrency.
Almost every table in our db has created By, created On, modifed By,
modified On columns. The parent class of all business objects has
attributes that correspond to these four columns. In addition to these
four, there is a fifth attribute (introduced when concurrency was built)
called originalModifiedOn. Upon retrieval from the db, it is set to
modifiedOn value (from the db), during UPDATE, the value in this column is
added part of the WHERE clause. So when the second user tried to do save
the same object, the underlying db update will get a 'zero rows updated'
which is translated into an application error 'possible concurrency
error'. The user re-retreives the now 'stale' object before applying their
edits.
A lot of these things are and can be built into the framework imposing very
little work that each Object needs to do to have concurrency protection.
I am not sure if there is a mention in the Patterns paper of this model,
but it is very easy to implement and supports what is needed.
Kishore Puvvada's Mail
[email protected] on 07/28/99 01:47:00 AM
To: [email protected]@INTERNET
cc: (bcc: Kishore Puvvada/HQ-IS/TAL)
Subject: Service Object events and LockMgr
Hi folks,
We're currently looking at strategies for dealing with the simultaneous
updates to the database from multiple clients (concurrency
management). That is when two (or more) clients load the same object to
edit it, then make different changes and save them to the database.
We have a copy of a Forté document (from the "Patterns" course, I
think) which describes three methods of dealing with this:
1) Lock the database table row as soon as a client select it for editing
and hold the lock until it is saved.
2) Immediately before 'saving' check that the database hasn't changed
(either by reading what's there before updating, or by using a huge
'where' clause that contains all unchanged fields)
3) The Forté "LockMgr" pattern, which uses a service object with notifier
proxies to allow locking and updating notification between the clients.
Option 3 is obviously the most robust method, but it requires a fair
amount of coding and could also be a bottleneck for database reads and
writes.
But I have another option for which I was looking for opinions. What if
we had a "Change Event manager" which broadcast an event every time
a change is made to the database. Each business class would have its
own event. If the event had the object's primary key as a parameter, then
clients editing that particular object type could check to see if the object
currently on screen is the one that changed. That way you could disable
the 'save' until they had refreshed their on-screen data.
It's not particularily elegant, but it's reasonably simple to implement. It
also deals with changes sent across our WAN from other database
servers.
But this option is only worthwhile if you can replicate the "Change Event
manager" SO and still register for an event on the client. Can clients
register for SO events and receive an event generated by any of the SO's
replicates? Or when you register for an SO's event do you register for
only one instance of the SO?
Thanks in advance for any answers.
Cheers,
Duncan Kinnear,
McCarthy and Associates, Email:
[email protected]
PO Box 764, McLean Towers, Phone: +64 6 834 3360
Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
Providing Integrated Software to the Meat Processing Industry for over 10
years
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:
http://pinehurst.sageit.com/listarchive/forte>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte> -
Service Object events and LockMgr
Hi folks,
We're currently looking at strategies for dealing with the simultaneous
updates to the database from multiple clients (concurrency
management). That is when two (or more) clients load the same object to
edit it, then make different changes and save them to the database.
We have a copy of a Forté document (from the "Patterns" course, I
think) which describes three methods of dealing with this:
1) Lock the database table row as soon as a client select it for editing
and hold the lock until it is saved.
2) Immediately before 'saving' check that the database hasn't changed
(either by reading what's there before updating, or by using a huge
'where' clause that contains all unchanged fields)
3) The Forté "LockMgr" pattern, which uses a service object with notifier
proxies to allow locking and updating notification between the clients.
Option 3 is obviously the most robust method, but it requires a fair
amount of coding and could also be a bottleneck for database reads and
writes.
But I have another option for which I was looking for opinions. What if
we had a "Change Event manager" which broadcast an event every time
a change is made to the database. Each business class would have its
own event. If the event had the object's primary key as a parameter, then
clients editing that particular object type could check to see if the object
currently on screen is the one that changed. That way you could disable
the 'save' until they had refreshed their on-screen data.
It's not particularily elegant, but it's reasonably simple to implement. It
also deals with changes sent across our WAN from other database
servers.
But this option is only worthwhile if you can replicate the "Change Event
manager" SO and still register for an event on the client. Can clients
register for SO events and receive an event generated by any of the SO's
replicates? Or when you register for an SO's event do you register for
only one instance of the SO?
Thanks in advance for any answers.
Cheers,
Duncan Kinnear,
McCarthy and Associates, Email: [email protected]
PO Box 764, McLean Towers, Phone: +64 6 834 3360
Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
Providing Integrated Software to the Meat Processing Industry for over 10 years
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>Hi,
Just wonder exactly how this Lock Manager can be implemented. Do you mean that you are
going to cache every object that is instantiated from the database? Or you just cache
the object id, primary key, etc?
Frankly speaking, I won't attempt to due with this kind of currency coding myself as
the database vendor has spent years in coding just to do this.
Regards.
Dimitar Gospodinov wrote:
Hello Duncan,
Wednesday, July 28, 1999, 10:31:46 AM, you wrote:
DK> Hi folks,
DK> We're currently looking at strategies for dealing with the simultaneous
DK> updates to the database from multiple clients (concurrency
DK> management). That is when two (or more) clients load the same object to
DK> edit it, then make different changes and save them to the database.
DK> We have a copy of a Forté document (from the "Patterns" course, I
DK> think) which describes three methods of dealing with this:
DK> 1) Lock the database table row as soon as a client select it for editing
DK> and hold the lock until it is saved.
DK> 2) Immediately before 'saving' check that the database hasn't changed
DK> (either by reading what's there before updating, or by using a huge
DK> 'where' clause that contains all unchanged fields)
DK> 3) The Forté "LockMgr" pattern, which uses a service object with notifier
DK> proxies to allow locking and updating notification between the clients.
DK> Option 3 is obviously the most robust method, but it requires a fair
DK> amount of coding and could also be a bottleneck for database reads and
DK> writes.
DK> But I have another option for which I was looking for opinions. What if
DK> we had a "Change Event manager" which broadcast an event every time
DK> a change is made to the database. Each business class would have its
DK> own event. If the event had the object's primary key as a parameter, then
DK> clients editing that particular object type could check to see if the object
DK> currently on screen is the one that changed. That way you could disable
DK> the 'save' until they had refreshed their on-screen data.
DK> It's not particularily elegant, but it's reasonably simple to implement. It
DK> also deals with changes sent across our WAN from other database
DK> servers.
DK> But this option is only worthwhile if you can replicate the "Change Event
DK> manager" SO and still register for an event on the client. Can clients
DK> register for SO events and receive an event generated by any of the SO's
DK> replicates? Or when you register for an SO's event do you register for
DK> only one instance of the SO?
DK> Thanks in advance for any answers.
DK> Cheers,
DK> Duncan Kinnear,
DK> McCarthy and Associates, Email: [email protected]
DK> PO Box 764, McLean Towers, Phone: +64 6 834 3360
DK> Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
DK> -------------------------------------------------------------------------------
DK> Providing Integrated Software to the Meat Processing Industry for over 10 years
DK> -
DK> To unsubscribe, email '[email protected]' with
DK> 'unsubscribe forte-users' as the body of the message.
DK> Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>
I would recommend you to use the following approach (of course if you
do not have some special requirements :) ):
1. You should have a LockManager that will synchronize all clients in
their attempt to modify/delete objects in your application.
2. Each client, when attempts to modify/delete some object, it must
LOCK it using the services provided with the LockManager.
3. The requested operation can be performed only after successful
locking.
4. If a lock can not be obtained (for example if the object is already
locked by some other client) then the operation is aborted.
The details of this pattern depends on your needs. :)
Hope this helps.
Best regards,
Dimitar mailto:[email protected]
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>-
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte> -
This problem used to be solved after moving a computer object into the appropriate OU and restarting, and if that didn't work, it used to be solved when uninstalling and reinstalling Microsoft FEP (restarts in-between). Now, the only way to access
event logs is by logging in as a domain admin, or by accessing event logs through remote manage.
If a machine object is added to the domain, dropped into the computers container, and restarted, we get this error when going into Computer Management:
"Cannot open eventlog service on computer '.'."
The original problem was noticed on our VMs, but I also tried it with a Lenovo Windows 7 build out of the box, added it to our domain, and the problem occurred. When our desktops are built, SCCM's task manager drops it into the appropriate OU immediately,
so desktops don't have issues. With VMs, they are dropped into the computers container and restarted, so once this problem occurs, it almost never leaves. SOMETIMES, removing it from the domain solves the problem, but not always.
I've tried all of the suggestions I've seen online and none of them have worked, such as cleaning up the policies (through registry, and the appropriate system folders), adding the proper NTFS permissions on the RtBackup folder and %SystemRoot%\System32\winevt\logs, netsh
winsock reset, cleanboot, etc.
I did notice that I'm unable to find the NT Service\EventLog user group. I wanted to add it to %systemroot%\system32\winevt\logs, but the group cannot be found on the local computer. Even if that's the problem, why is it missing?
It doesn't seem like anyone else on the internet gets this exact error.Hi Kate!
Yes, the Windows Event Log service is missing. I had already tried your method (#3), and I did try it again. This is the error I get:
"The specified service already exists."
If you check services.msc, it's still not there. If you try to start the Event Viewer, the same error comes up:
Cannot open eventlog service on computer '.'.
Hi,
Please check for the existence of this key. If not found, create a *.reg file from another machine and import.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog
Then, check the issue again.
If this doesn't work, let's run System file checker tool to repair system:
Run SFC command in elevated command prompt
SFC /scannow
Any error message, please post here to let me know.
Keep post.
Kate Li
TechNet Community Support -
Web Service Object Collections
So I was hoping someone could help me out with this. I have a
web service running server side which returns a collection of
product objects as a search result. I can databind the event.result
from the web service to a datagrid and review the contents of the
collection of the objects. What I would like to do is populate
product objects inside of flex off the collection return.
A trace of event.result reveals
[object Object],[object Object]
[object Object],[object Object],[object Object],[object
Object],[object Object]
1. Is there an equivlent to a .net
Collections.ObjectModel.Collection class in flex?
2. How can i loop through the results of the event.result to
populate a collection of these objects either as a collection or
arraycollection in flex?
Thanks for checking this out, help me if you can!!!
-RyanFigured this out,
trace(event.result[0].ProductName);
Breakdown: event.result [ArrayPossition] .
ObjectProperty -
Integration Event Web Service Upload Trigger
Hello,
have a question about the Integration Event Web Service.
Is it possible to get Data in the Integration queue, if i make an upload? We made the experience that workflows don't trigger with uploads.
Regards,I'm sorry, I'm not clear on what method you are using for "upload" is this a WS insert request or are you using import to add new records to CRMOD? Also, what object(s) are you working with (i.e. Account)
-
Service Objects with Dialog duration
m
Hi Forte`ans,
I am trying to listen to an event from a service object which has a
dialog duation of Message.The service object is configured for
failover.
I get an exception ( not an error message ) saying :
SYSTEM ERROR: Invalid attempt to register for an event on an object of
class (CKBaseServiceMgrProxy) which has a dialog duration of
message. The
semantics of message duration do not guarantee that the same object
instance will service each message, which is in conflict with the
semantics of event registration (which requires that the same object
instance to which the event is registered for generates the event;
these are two separate actions). To disable this restriction,
restart this process with cfg:do:4 specified.
If I make the dialog duration of the SO Session, it works without
screaming.
Does this mean I cannot listen to events from such SO( Failover
enabled with Message duration?) Is it because the event loop may still
point to the failed SO and Forte wants to avoid such situations???
Can somebody throw some light on this..?
Thanks
Ajith Kallambella M
International Business Corporation.We ran into this same problem when converting an application from R1 to
R2. In R1, you were allowed to do this. However, Forte won't
guarantee, even in a non-replicated, non-failover partition, that it
won't swap objects under certain situations unless the dialog duration
is session. If this happened, you would lose your registration and not
even know it. The recommended solution is for the client partition to
pass a reference to an object anchored in its partition to the service
object in the remote partition. The service object can then post events
on the anchored object, which is guaranteed to be there during the life
of that client partition. The logger flag was designed for backwards
compatibility. It's not really recommended, but it's not supposed to
have much overhead if you do use it. We already had a client
notification architecture in place, so we re-worked our application to
use it in the cases where we had been using direct registrations. Hope
this helps -- Chris
Chris Kelly, IS Architect
Andersen Windows
From:
[email protected][SMTP:[email protected].
net.in]
Sent: Thursday, September 18, 1997 1:44 PM
To: [email protected]
Subject: Service Objects with Dialog duration
m
Hi Forte`ans,
I am trying to listen to an event from a service object which
has a
dialog duation of Message.The service object is configured for
failover.
I get an exception ( not an error message ) saying :
SYSTEM ERROR: Invalid attempt to register for an event on an
object of
class (CKBaseServiceMgrProxy) which has a dialog duration of
message. The
semantics of message duration do not guarantee that the same
object
instance will service each message, which is in conflict with
the
semantics of event registration (which requires that the same
object
instance to which the event is registered for generates the
event;
these are two separate actions). To disable this restriction,
restart this process with cfg:do:4 specified.
If I make the dialog duration of the SO Session, it works without
screaming.
Does this mean I cannot listen to events from such SO( Failover
enabled with Message duration?) Is it because the event loop may
still
point to the failed SO and Forte wants to avoid such
situations???
Can somebody throw some light on this..?
Thanks
Ajith Kallambella M
International Business Corporation. -
Service Object Init References
Has anyone come up with a good work around to allow Service Objects to
reference other service objects in their init methods or during application
startup. Since we can't specify the order in which Service Objects start,
is there a way we can execute some code once all Service Objects have come
online?
Will this idea work?
Start a task in the init method that loops for the referenced service object
to not be nil, then references the needed SO. For example:
while true do
if LogMgrSO = Nil then
task.delay(100);
else
exit;
end if;
end while;
Eric Rasmussen
Project Manager
Online Resources & Communications Corporation
(703)394-5128
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>Hi,
Sorry to answer so late ! I left (one year ago may be) some Tool code on
the Mailing list on that subject.
May be you have to consider some different cases :
1°) Is a Service started because it is only instanciated (<> NIL)?
2°) Forte insures that the first services to be started on a partition
are DBsession and DBResource Managers.
3°) A local Service or a distributed service are not exactly treated the
same way.
4°) The init() method has a specific way to run : the allocations are
made at the end.
1°) When a Service is not NIL it is only that it is instanciated. So
your initialization sequence is not endded may be or
the service is not insured to be started properly. It should be
important if you need to load a cache for instance. I
would recommand to test that a service is ON (for DBsessions for
instance) and to add (if possible) a state to determine
that a service is properly started.
2°) This is only available if you are inside the same partition on the
same machine. So if you have to synchronize with
external ressources from the partition you will need to treat them like
other services.
3°) A local Service will be NIL and then instanciated. The classname
will be the same as in the workshop.
A distrubuted service (exactly a service which is not on the same
partition) will have a different classname (Classname+Proxy).
So the external service proxy may be instanciated but the So May not,
and you will get a DistributedAccessException.
4°) The init() method may not be the best location for a synchronization
if you need to use an array for instance to
store you dependencies. So I would use a start task on an InitService()
method to avoid that problem.
Options :
- A dependency could be optionnal : after a certain amount of tries you
can abort synchronization on the service.
- You can use synchronization on "cold" and "hot" startup of services.
- You can develop a service agent which cold have instruments to see
dependencies and states, and commands to stop/start services.
- The Delay you may play should be different for each service you are
waiting for.
- The order of dependencies should have an importance (first put
mandatory dependancies, and then optional ones).
- A Service is not only a Service Object, but could also be just a
reference to an instance through a container for example.
- Some kind of autoStart : should I start all my services at the
beginning of my application or could I start some services
at the first call ? This should be available if you use your own
application protocole and if your services are inside some
service managers for instance.
Remarks :
Thoses concepts have been tested on a Framework from R2 to R3 of Forte
with success. With those, you can imagine
starting the application without knowing if the database is running, the
application will wait for the database
to be mounted. An other advantage of the synchronization is that you
will resolve the naming of the services at
the begining of the application. Then, you can stop the environment
manager and the application will still work
(for the clients which were already started of course). You can also
imagine transfering your partitions from one
node to an other at run-time.
Hope this helps,
Daniel Nguyen
Freelance Forte Consultant
Stephen McHenry wrote:
>
At 11:04 AM 10/1/98 -0700, John Jamison wrote:
begin
while true do
begin
..attempt "remote" SO reference..
exit; // while true do loop
exception
when e:UsageException do // if in same partition and not yet
initialized,
// you get a NIL object exception
task.errormgr.clear;
when e:DistributedAccessException do (or RemoteAccessException)
// if in a different partition, get this
error
task.errormgr.clear;
end;
event loop
aTimer : Timer = new (tickInterval=5*1000); // 5 seconds -
adjust to taste
aTimer.isActive=true;
when aTimer.Tick do
aTimer.IsActive=false;
exit;
end event;
end while;
end;One of the problems I see with all of these "catch the exception and try
again" schemes is that they fail to take into account that the SO you are
calling may, in fact, never appear (due to some sort of problem, of course)
and then you never exit this loop. It's a "liveness" problem with this
approach. So, be sure to add some alternate way out after 1 minute (or
whatever your particular threshold is) and raise an exception yourself.
Always gotta think about what happens if something goes wrong... ;-)
Stephen
|===========================================================================
===|
|Stephen McHenry | Design Consulting |Training courses
offered: |
|Advanced Software Tech | | -Distributed
Obj-Oriented |
|305 Vineyard Town Ctr #251| [email protected] | Analysis &
Design |
|Morgan Hill, CA 95037 | (408) 776-2720 x210 | -Intro to Object
Technology|
|USA | http://www.softi.com | -Advanced OO Design
|
|===========================================================================
===|
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/> -
Hello. We'd like to be able to determine when a TOOL service object
starts up from within another TOOL service object. I understand the
problems with service object start up ordering, but I'll summarize
them here:
1. You can't reference a service object until it's up
2. You can't guarantee a service object to be up unless
a) it's a non-TOOL SO (DB Resource Manager or DB Session)
b) it's a TOOL SO in another partition which is numerically lower
than yours
According to Forte support, we should put our dependant service objects in
different partitions and use the numerical startup to get them going. For
example, if SO A depends on SO B, we need SO B in partition 1 and SO A in
partition 2. Also, if we have A depends on B and nobody else uses B, we
should probably use A as an umbrella for B.
But what if we don't want to do this? What if we don't want to take the
performance hit from the partitioning? What if we've got multiple
client-visible SOs that interact? We tried this scheme:
in A.Init():
super.Init()
start task Startup()
in A.Startup():
while B_SO = NIL do
task.part.operatingsystem.sleep(SPIN_TIME);
end while;
// now do stuff with B_SO
self.Ready = TRUE; // users can test this to see if A_SO is ready
The above works sporadically. According to support, that's because
testing the NIL reference isn't like testing for NIL on a normal object,
the name service is involved and that can screw things up.
Anybody have something that works? This seems to be a really stupid
feature of the system.
========================================================================
Neil Gendzwill, Senior Software Engineer, SED Systems, Saskatoon, Canada
E-MAIL: [email protected] PHONE: (306) 933-1571 FAX: (306) 933-1486
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>Neil-
The reason your scheme fails occasionally (I'm pretty sure) is the
"start task" in the init method.. The only thing you are guaranteed by
partition order, etc, is that the "init" methods are executed (i.e. the
objects are instantiated) in the order you want. If you start
asynchronous tasks from within the init method, all bets are off as to
whether the spun-off asynchronous task will get done before the next
service object init() is called or even before the first client is
allowed to come on line.. All depends on the thread switching, which of
course cannot be predicted or counted on (hence the term "thread-safe
code").
I use something similar to the subsequent writer on the thread (Mark
Sundsten) except that service objects which need other objects (like
services requiring DB session brokers) go through a multi-step process
waiting for the broker to be up and truly ready for business:
Keep testing for a legal reference to the broker until it is non-NIL
and no exception
Post an "areyoualive" event on the broker with suitable
retry/error-handling until positive response
The broker, of course, does the start task startup() sort of thing in
its init method, the final step of which is to begin responding to
"areyoualive" events with the proper response.
The final trick is that no services on the service object work (they
block/wait) until the object has successfully started (including the
wait for the broker). This is to avoid client requests from being
processed before the service is ready.
With this technique, you can put service objects and their brokers
wherever you want to. I wish it was simpler, but when you enter the
world of multiple threads you need to carefully plan your startup
behavior and bullet-proof all code to be thread safe.
I've also seen techniques where the first actual service request
performs a startup if it hasn't been done already. Sort of the "lazy
instantiation" of service-object startups.. Problem is, of course, that
for the reason outlined above the first client can come alive and begin
asking for things from the services before asynchronous tasks started in
the init methods are done. If you go this direction, make sure you
understand this nuance and have no ansych startups occurring in init
methods.
Hope this helps.
-Greg
-----Original Message-----
From: Neil Gendzwill [SMTP:[email protected]]
Sent: Friday, June 19, 1998 12:48 PM
To: Users, Forte
Subject: Service object start-up
Hello. We'd like to be able to determine when a TOOL service
object
starts up from within another TOOL service object. I understand
the
problems with service object start up ordering, but I'll
summarize
them here:
1. You can't reference a service object until it's up
2. You can't guarantee a service object to be up unless
a) it's a non-TOOL SO (DB Resource Manager or DB Session)
b) it's a TOOL SO in another partition which is numerically
lower
than yours
According to Forte support, we should put our dependant service
objects in
different partitions and use the numerical startup to get them
going. For
example, if SO A depends on SO B, we need SO B in partition 1
and SO A in
partition 2. Also, if we have A depends on B and nobody else
uses B, we
should probably use A as an umbrella for B.
But what if we don't want to do this? What if we don't want to
take the
performance hit from the partitioning? What if we've got
multiple
client-visible SOs that interact? We tried this scheme:
in A.Init():
super.Init()
start task Startup()
in A.Startup():
while B_SO = NIL do
task.part.operatingsystem.sleep(SPIN_TIME);
end while;
// now do stuff with B_SO
self.Ready = TRUE; // users can test this to see if A_SO is
ready
The above works sporadically. According to support, that's
because
testing the NIL reference isn't like testing for NIL on a normal
object,
the name service is involved and that can screw things up.
Anybody have something that works? This seems to be a really
stupid
feature of the system.
========================================================================
Neil Gendzwill, Senior Software Engineer, SED Systems,
Saskatoon, Canada
E-MAIL: [email protected] PHONE: (306) 933-1571 FAX: (306)
933-1486
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive
<URL:http://pinehurst.sageit.com/listarchive/>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/> -
Late Tick Event on Timer Object
We are experiencing a problem with a Tick() event being processed by an
event loop approximately 15 minutes after the event is posted. We have a
method on one of our service objects that looks something like this:
iTimer : Timer = new(IsActive = FALSE);
event loop
postregister
iTimer.WaitUntil(self.GetNextTime());
iTimer.IsActive = TRUE;
when iTimer.Tick do
iTimer.IsActive = FALSE;
self.Cleanup();
iTimer.WaitUntil(self.GetNextTime());
iTimer.IsActive = TRUE;
when task.Shutdown do
exit;
end event;
iTimer.IsActive = FALSE;
The GetNextTime() method returns a DateTimeData object that is always set to
the earliest midnight of the future. Has anyone seen this type of behaviour
before? Any suggestions as to the cause of the problem?
Thanks in advance for your help.
Neil Willems
SED Systems Inc.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>Hello Tom,
> Maybe the operations are being run on a background thread and then keep having to jump into the main thread to access the email items...?
You shouldn't use another threads when dealing with the Outlook object model. Office applications use the single threaded apartment (STA) model and don't support multithreading. All calls made from another threads are marshalled by Outlook to the main
thread. However, you can use a low-level code (Extended MAPI) to access the data from secondary threads. For example, you can use Redemption which is based on Extended MAPI.
> it loops through everything quite quickly (~12,000 emails in 30 secs)
Instead of looping over all items in the folder I'd recommend using the
Find/FindNext
or
Restrict methods of the Items class. You can read more about them in the following articles:
How To: Use Find and FindNext methods to retrieve Outlook mail items from a folder (C#, VB.NET)
How To: Use Restrict method to retrieve Outlook mail items from a folder
You can use the System.Windows.Forms.Timer class which uses the main thread for invoking the Tick event. The .NET
Framework Class Library provides three different timer classes: System.Windows.Forms.Timer, System.Timers.Timer, and System.Threading.Timer. Each of these classes has been designed and optimized for use in different situations. The Comparing
the Timer Classes in the .NET Framework Class Library article examines the three timer classes and helps you gain an understanding of how and when each class should be used.
Also you may find the
AdvancedSearch method of the Application class helpful. Pay special attention to the fact that the search is performed in another thread. You don’t need to run another thread manually since the
AdvancedSearch method runs it automatically in the background. See
Advanced search in Outlook programmatically: C#, VB.NET for more information. -
Keeping Service Object Method Running
Does anyone have any suggestions how I can handle the followingsituation:
>
We want a service object to begin each morning and beavailable all day.
>
This service object contains a timer event that at specified timeswill
send events to certain users. Our approach this far has been for thefirst
user to sign on in the morning would start a task that would createthe
timer. Each subsequent user would first check if the timer is runningand
if it is, they would bypass this step. This works great until thefirst
user closes the application which in turn kills the task whichcontains the
timer.
How can we start a task that will not be killed when theparent is kille
d?
Any suggestions are greatly appreciated.
TIA
Tony
I'd suggest starting up the service independent of the clients by using
escript. The start task would be put into the INIT method of the
service object. You can put the escript commands in a batch job started
by a job scheduler. You can also shut down the service in the same
manner.
BillWhile I think I understand your thought process that led you to your design you have made an erroneous assumption when it comes to interfaces that has put you off the rails.
Casting to an interface does not magically mean that you can deserialize an object created with a non-existant class.
Which is what you are doing.
Let us say you have two classes...
public class ServisArayuzuServerImplementation implements ServisArayuzuand
public class ServisArayuzuClientImplementation implements ServisArayuzuThe problem is that when the server object is serialized in it's header it says it is a ServisArayuzuServerImplementation. Thus this class MUST exist on the client side if it is to be deserialized. And this MUST happen before any casting etc.
There are two possible solutions for the problem.
1) Use the same class on both sides.
2) Don't use ObjectInput and ObjectOutput streams but serialize the data yourself using DataInput and DataOutput streams. Then you can construct and deconstruct the objects as you need too. And they could be differen types if you wanted. This solution though is more complex so you'll have to decide for yourself. -
What are events. how to create and handle this events.
HI,
By triggering an event, an object or a class announces a change of state, or that a certain state has been achieved.Events link objects or classes more loosely than direct method calls do. Method calls establish precisely when and in which statement sequence the method is called. However, with events, the reaction of the object to the event is determined by the triggering of the event itself.
Events are most often used in GUI implementations.Other external object models, such as COM, ActiveX Controls etc, also provide events.
At the moment of implementation, a class defines its instance events (using the statement EVENTS) and static events (using the statement CLASS-EVENTS)
Classes or their instances that receive a message when an event is triggered at runtime and want to react to this event define event handler methods.
Statement : (CLASS-)METHODS | FOR ALL INSTANCES.
Every object that has defined events has an internal table: the handler table. All objects that have registered for events are entered in this table together with their event handler methods.Objects that have registered themselves for an event that is still live also remain live. The methods of these objects are called when the event is triggered, even if they can no longer be reached using main memory references.
If several objects have registered themselves for an event, then the sequence in which the event handler methods are called is not defined, that is, there is no guaranteed algorithm for the sequence in which the event handler methods are called.
If a new event handler is registered in an event handler method for an event that has just been triggered, then this event handler is added to the end of the sequence and is then also executed when its turn comes.
If an existing event handler is deregistered in an event handler method, then this handler is deleted from the event handler method sequence.
Events are also subject to the visibility concept and can therefore be either public, protected or private. Visibility establishes authorization for event handling :
all users
only users within that class or its subclasses
only users in that class.
Event handler methods also have visibility characteristics. Event handler methods, however, can only have the same visibility or more restricted visibility than the events they refer to.
The visibility of event handler methods establishes authorization for SET-HANDLER statements: SET HANDLER statements can be made
anywhere
in that class and its subclasses
only in that class
Regards,
Balaji Reddy G
**Rewards if answers are useful -
Windows 8.1 - Windows Couldn't connect to the System Event Notification Service service
I have an issue that has been bothering me for a while on new 8.1 computers. Standard users are not able to log into the computer on the first try consistently. They receive the error message: Group Policy client service failed the sign-in access is
denied. They are stuck at the logon screen.
If an administrator logs in (local or domain), they can log in but get a black desktop with two error messages. The first is Location is Not available - C:\Windows\system32\config\systemprofile\Desktop is unavailable. The second error message is a popup
balloon. It states "Failed to Connect to a Windows service. Windows couldn't connect to the System Event Notification Service service."
When a standard user attempts to log in, event viewer records three warnings. They are listed in order from oldest to newest
The winlogon notification subscriber <Profiles> was unavailable to handle a critical notification event. -Logged 9:14:44
The winlogon notification subscriber <GPClient> failed a critical notification event. - Logged 9:14:44
The winlogon notification subscriber <Profiles> was unavailable to handle a notification event. - Logged 9:14:49
After a reboot, users still have the issue. I noticed that the user profile services and system event notification service are not running though their startup type is automatic. They start after a minute or two.Hi Joseph__Moody,
Based on your description ,I assume it is a domain environment .First of all ,I would suggest you to try to update all the machine .
"I have an issue that has been bothering me for a while on new 8.1 computers"
Do you mean all the Windows 8.1 machine share the same symptom or just a specific one ?Did the machine work correctly before ?When did the issue start to occur ?Have you installed any third party software before ?Can we operate the machine when we login with
an administrator account ?
If the issue occurred with the specific machine :
"The first is Location is Not available - C:\Windows\system32\config\systemprofile\Desktop is unavailable."
Please try the following suggestions if we can operate the machine when we login with the administrator account :
Open Windows Explorer and navigate to: C:\Windows\system32\config\systemprofile and verify if it has the Desktop folder there.If the folder doesn`t exit, we can copy from C:\users\Default\Desktop location(This folder is hidden by default).
We also can try the following suggestions to have a troubleshoot :
1.Run "sfc /scannow"or "dism /online /cleanup-image /restorehealth" to check the health of the system files.
2.Perform a full scan with an antivirus software.
3."They start after a minute or two."
I suspect there is a third party service confilct here. Please perform a clean boot to verify whether there is a third party conflict here .
How to perform a clean boot in Windows
https://support.microsoft.com/en-us/kb/929135
If the issue occurred with multiple machines in the domian ,I would suggest you to check whether you have configured any logon scripts and logon group policy .We can remove the machine from the domain to have a troubleshoot .
If the issue occurred recently ,we can perform a system restore to recover the machine to a previous normal point.
Best regards
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected].
Maybe you are looking for
-
Change material could not be effected - Error in BAPI_PO_CHANGE
Dear all, When I tried to change the material in a PO using BAPI_PO_CHANGE, I am getting error "Change material could not be effected", even though the GR not happened for that. But manually I am able to change it in ME22N Tcode. I have passed t
-
IPhone 5 and 5C screen protections
Are the screen sizes of iPhone 5 and iPhone 5C same? I know that the dimensions slightly differ but the physical size is the same, so would an iPhone 5C screen protection fit perfectly on iPhone 5? Please help...
-
Mac pro quad core overheats since installing snow leopard OS
I seem to have a lot of overheating since installing on my pro tower. the fan runs constantly. additionally, the monitors go to sleep on their own and I can't wake them back up. does LION OS fix this or am I doomed?
-
PS CS6 CC 3D mode - can only move object once - problem/question
I am trying to work with an .obj file object in the 3D mode of Photoshop CS6 CC. I can move the object once with any of the 3D mode tools but then the Camera Window Viewer changes and I can't manipulate the object anymore. When I try to move the obje
-
Oracle 10gR2 RAC - VMware Server - PRIF-10
I have been working desparately to get a 10g RAC configuration setup under VMWare Server. All of the requirements seem to be met using "runcluvfy". but I can get down to running "orainstRoot" and "root" shells but after replying "Ok" to the completio