Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Multi-threaded Java Service Comp w/intercomponent call problem

8 posts in General Discussion (old) Last posting was on 2000-03-22 17:03:24.0Z
Glenn Santa Cruz Posted on 2000-03-21 22:27:48.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 21 Mar 2000 16:27:48 -0600
From: Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com>
Organization: Daily Access Concepts
X-Mailer: Mozilla 4.7 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Multi-threaded Java Service Comp w/intercomponent call problem
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 64
NNTP-Posting-Host: 12.6.74.30
Message-ID: <347_38D7F764.CBD09FDC@dailyaccess.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25970
Article PK: 155992

Any idea why increasing the number of threads beyond 2 for a service
component would cause major problems?

The scenario for the type of structure I'm describing is based somewhat
on "Service Component Lifecycle", posted on 12/01/1999 in this
newsgroup. (single SVC handling a queue, passing off work to other
components)

I'm having trouble creating more than 2 threads in a java service
component; the component is marked as both shared and concurrent. The
run() method is supposed to get a handle to a PowerBuilder component so
that it can make intercomponent calls as requests fill a queue. A brief
snippet of run() is listed below. The PB component is flagged as
"concurrent, poolable, bind thread, and non-shared". All works well
when I set the number of threads (via com.sybase.jaguar.server.services)
to 1 or 2, but as soon as I go above that, I get the following dump in
my srv.log:

...
Mar 21 16:26:55 2000: CTS_Component::load: failed for component
'ExaktReports/ReportWorker'
Mar 21 16:26:55 2000: CTS_Component::load: failed for component
'ExaktReports/ReportWorker'
Mar 21 16:26:55 2000: Exception 'CORBA::OBJECT_NOT_EXIST' in
Session::create for component 'ExaktReports/ReportWorker'
Mar 21 16:26:55 2000: Thread id 2.0; Exception caught when attempting
run() method:
Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
...

Any clues?

TIA (as always)

Glenn

public void run() {
ReportWorker _worker = null;
try {
java.util.Properties props = new java.util.Properties();
props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
ORB orb = ORB.init((java.lang.String[])null, props);
_worker =
ReportWorkerHelper.narrow(orb.string_to_object("ExaktReports/ReportWorker"));
}
catch( Throwable t ) {
_stop = true;
System.err.println("Thread id " + id + "; Exception caught when
attempting run() method:\n" + t);
t.printStackTrace(System.err);
}
while (! _stop) {
try {
/** get a report from the instance queue **/
//...
/** process the report **/
ReportStatus stat = _worker.processReport( rpt, key );
/** flag report as being complete **/
pushReportStatus( stat ) ;
}
catch(InterruptedException ie) {
System.err.println("Thread id " + id + " interrupted");
_stop = true;
}
catch(CTS.PBUserException pbue) {
System.err.println("Thread id " + id + " caught PBUserException:");
pbue.printStackTrace(System.err);
_stop = true;
}
}
}


Glenn Santa Cruz Posted on 2000-03-21 22:38:52.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 21 Mar 2000 16:38:52 -0600
From: Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com>
Organization: Daily Access Concepts
X-Mailer: Mozilla 4.7 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Multi-threaded Java Service Comp w/intercomponent call problem
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 83
NNTP-Posting-Host: 12.6.74.30
Message-ID: <347_38D7F9FC.C1BEF4A0@dailyaccess.com>
References: <347_38D7F764.CBD09FDC@dailyaccess.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25969
Article PK: 155990

Incidentally, here are the particulars:

Jaguar 3.01 build 30033
PB 7.0 build 7021
JDK 1.1.8

Glenn Santa Cruz wrote:
>
> Any idea why increasing the number of threads beyond 2 for a service
> component would cause major problems?
>
> The scenario for the type of structure I'm describing is based somewhat
> on "Service Component Lifecycle", posted on 12/01/1999 in this
> newsgroup. (single SVC handling a queue, passing off work to other
> components)
>
> I'm having trouble creating more than 2 threads in a java service
> component; the component is marked as both shared and concurrent. The
> run() method is supposed to get a handle to a PowerBuilder component so
> that it can make intercomponent calls as requests fill a queue. A brief
> snippet of run() is listed below. The PB component is flagged as
> "concurrent, poolable, bind thread, and non-shared". All works well
> when I set the number of threads (via com.sybase.jaguar.server.services)
> to 1 or 2, but as soon as I go above that, I get the following dump in
> my srv.log:
>
> ...
> Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> 'ExaktReports/ReportWorker'
> Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> 'ExaktReports/ReportWorker'
> Mar 21 16:26:55 2000: Exception 'CORBA::OBJECT_NOT_EXIST' in
> Session::create for component 'ExaktReports/ReportWorker'
> Mar 21 16:26:55 2000: Thread id 2.0; Exception caught when attempting
> run() method:
> Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> ...
>
> Any clues?
>
> TIA (as always)
>
> Glenn
>
> public void run() {
> ReportWorker _worker = null;
> try {
> java.util.Properties props = new java.util.Properties();
> props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
> ORB orb = ORB.init((java.lang.String[])null, props);
> _worker =
> ReportWorkerHelper.narrow(orb.string_to_object("ExaktReports/ReportWorker"));
> }
> catch( Throwable t ) {
> _stop = true;
> System.err.println("Thread id " + id + "; Exception caught when
> attempting run() method:\n" + t);
> t.printStackTrace(System.err);
> }
> while (! _stop) {
> try {
> /** get a report from the instance queue **/
> //...
> /** process the report **/
> ReportStatus stat = _worker.processReport( rpt, key );
> /** flag report as being complete **/
> pushReportStatus( stat ) ;
> }
> catch(InterruptedException ie) {
> System.err.println("Thread id " + id + " interrupted");
> _stop = true;
> }
> catch(CTS.PBUserException pbue) {
> System.err.println("Thread id " + id + " caught PBUserException:");
> pbue.printStackTrace(System.err);
> _stop = true;
> }
> }
> }


Glenn Santa Cruz Posted on 2000-03-21 23:17:20.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 21 Mar 2000 17:17:20 -0600
From: Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com>
Organization: Daily Access Concepts
X-Mailer: Mozilla 4.7 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Multi-threaded Java Service Comp w/intercomponent call problem
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 93
NNTP-Posting-Host: 12.6.74.30
Message-ID: <347_38D80300.1DA57059@dailyaccess.com>
References: <347_38D7F764.CBD09FDC@dailyaccess.com> <347_38D7F9FC.C1BEF4A0@dailyaccess.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25968
Article PK: 155989

Further investigation reveals that I can start as many threads as I
want, provided that the component for which I want to make an
intercomponent call is a Java class; I think I'm more confused now than
before.

Glenn Santa Cruz wrote:
>
> Incidentally, here are the particulars:
>
> Jaguar 3.01 build 30033
> PB 7.0 build 7021
> JDK 1.1.8
>
> Glenn Santa Cruz wrote:
> >
> > Any idea why increasing the number of threads beyond 2 for a service
> > component would cause major problems?
> >
> > The scenario for the type of structure I'm describing is based somewhat
> > on "Service Component Lifecycle", posted on 12/01/1999 in this
> > newsgroup. (single SVC handling a queue, passing off work to other
> > components)
> >
> > I'm having trouble creating more than 2 threads in a java service
> > component; the component is marked as both shared and concurrent. The
> > run() method is supposed to get a handle to a PowerBuilder component so
> > that it can make intercomponent calls as requests fill a queue. A brief
> > snippet of run() is listed below. The PB component is flagged as
> > "concurrent, poolable, bind thread, and non-shared". All works well
> > when I set the number of threads (via com.sybase.jaguar.server.services)
> > to 1 or 2, but as soon as I go above that, I get the following dump in
> > my srv.log:
> >
> > ...
> > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > 'ExaktReports/ReportWorker'
> > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > 'ExaktReports/ReportWorker'
> > Mar 21 16:26:55 2000: Exception 'CORBA::OBJECT_NOT_EXIST' in
> > Session::create for component 'ExaktReports/ReportWorker'
> > Mar 21 16:26:55 2000: Thread id 2.0; Exception caught when attempting
> > run() method:
> > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > ...
> >
> > Any clues?
> >
> > TIA (as always)
> >
> > Glenn
> >
> > public void run() {
> > ReportWorker _worker = null;
> > try {
> > java.util.Properties props = new java.util.Properties();
> > props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
> > ORB orb = ORB.init((java.lang.String[])null, props);
> > _worker =
> > ReportWorkerHelper.narrow(orb.string_to_object("ExaktReports/ReportWorker"));
> > }
> > catch( Throwable t ) {
> > _stop = true;
> > System.err.println("Thread id " + id + "; Exception caught when
> > attempting run() method:\n" + t);
> > t.printStackTrace(System.err);
> > }
> > while (! _stop) {
> > try {
> > /** get a report from the instance queue **/
> > //...
> > /** process the report **/
> > ReportStatus stat = _worker.processReport( rpt, key );
> > /** flag report as being complete **/
> > pushReportStatus( stat ) ;
> > }
> > catch(InterruptedException ie) {
> > System.err.println("Thread id " + id + " interrupted");
> > _stop = true;
> > }
> > catch(CTS.PBUserException pbue) {
> > System.err.println("Thread id " + id + " caught PBUserException:");
> > pbue.printStackTrace(System.err);
> > _stop = true;
> > }
> > }
> > }


Scott McReynolds [Sybase] Posted on 2000-03-22 01:31:57.0Z
Newsgroups: sybase.public.easerver
From: "Scott McReynolds [Sybase]" <scottmc@sybase.com>
Subject: Re: Multi-threaded Java Service Comp w/intercomponent call problem
Date: Tue, 21 Mar 2000 18:31:57 -0700
Lines: 109
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: 158.159.8.18
Message-ID: <347_yXp9i85k$GA.201@forums.sybase.com>
References: <347_38D7F764.CBD09FDC@dailyaccess.com> <347_38D7F9FC.C1BEF4A0@dailyaccess.com> <347_38D80300.1DA57059@dailyaccess.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25965
Article PK: 155986

Glenn,

Please open a case on this problem.

Scott

"Glenn Santa Cruz" <spam?no.glenn_santacruz@dailyaccess.com> wrote in
message news:38D80300.1DA57059@dailyaccess.com...
> Further investigation reveals that I can start as many threads as I
> want, provided that the component for which I want to make an
> intercomponent call is a Java class; I think I'm more confused now than
> before.
>
> Glenn Santa Cruz wrote:
> >
> > Incidentally, here are the particulars:
> >
> > Jaguar 3.01 build 30033
> > PB 7.0 build 7021
> > JDK 1.1.8
> >
> > Glenn Santa Cruz wrote:
> > >
> > > Any idea why increasing the number of threads beyond 2 for a service
> > > component would cause major problems?
> > >
> > > The scenario for the type of structure I'm describing is based
somewhat
> > > on "Service Component Lifecycle", posted on 12/01/1999 in this
> > > newsgroup. (single SVC handling a queue, passing off work to other
> > > components)
> > >
> > > I'm having trouble creating more than 2 threads in a java service
> > > component; the component is marked as both shared and concurrent. The
> > > run() method is supposed to get a handle to a PowerBuilder component
so
> > > that it can make intercomponent calls as requests fill a queue. A
brief
> > > snippet of run() is listed below. The PB component is flagged as
> > > "concurrent, poolable, bind thread, and non-shared". All works well
> > > when I set the number of threads (via
com.sybase.jaguar.server.services)
> > > to 1 or 2, but as soon as I go above that, I get the following dump in
> > > my srv.log:
> > >
> > > ...
> > > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > > 'ExaktReports/ReportWorker'
> > > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > > 'ExaktReports/ReportWorker'
> > > Mar 21 16:26:55 2000: Exception 'CORBA::OBJECT_NOT_EXIST' in
> > > Session::create for component 'ExaktReports/ReportWorker'
> > > Mar 21 16:26:55 2000: Thread id 2.0; Exception caught when attempting
> > > run() method:
> > > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > > ...
> > >
> > > Any clues?
> > >
> > > TIA (as always)
> > >
> > > Glenn
> > >
> > > public void run() {
> > > ReportWorker _worker = null;
> > > try {
> > > java.util.Properties props = new
java.util.Properties();
> > >
props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
> > > ORB orb = ORB.init((java.lang.String[])null, props);
> > > _worker =
> > >

ReportWorkerHelper.narrow(orb.string_to_object("ExaktReports/ReportWorker"))
;
> > > }
> > > catch( Throwable t ) {
> > > _stop = true;
> > > System.err.println("Thread id " + id + "; Exception
caught when
> > > attempting run() method:\n" + t);
> > > t.printStackTrace(System.err);
> > > }
> > > while (! _stop) {
> > > try {
> > > /** get a report from the instance queue **/
> > > //...
> > > /** process the report **/
> > > ReportStatus stat =
worker.processReport( rpt, key );
> > > /** flag report as being complete **/
> > > pushReportStatus( stat ) ;
> > > }
> > > catch(InterruptedException ie) {
> > > System.err.println("Thread id " + id + "
interrupted");
> > > _stop = true;
> > > }
> > > catch(CTS.PBUserException pbue) {
> > > System.err.println("Thread id " + id + "
caught PBUserException:");
> > > pbue.printStackTrace(System.err);
> > > _stop = true;
> > > }
> > > }
> > > }


Glenn Santa Cruz Posted on 2000-03-22 05:10:53.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 21 Mar 2000 23:10:53 -0600
From: Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com>
Organization: Daily Access Concepts
X-Mailer: Mozilla 4.7 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Multi-threaded Java Service Comp w/intercomponent call problem
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 133
NNTP-Posting-Host: 12.6.74.30
Message-ID: <347_38D855DD.9DA43E40@dailyaccess.com>
References: <347_38D7F764.CBD09FDC@dailyaccess.com> <347_38D7F9FC.C1BEF4A0@dailyaccess.com> <347_38D80300.1DA57059@dailyaccess.com> <347_yXp9i85k$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25957
Article PK: 155978

I managed to accomplish what I wanted; please help me to decide whether
the problem was poor design or a worth opening a bug case ;-)

Instead of the run() method caching a handle to a component and then
invoking that component directly, I created a private method to which
each thread delegates work. Basically, when a thread gets notified that
a report is ready to be run, it calls the private method, which in turn
creates the necessary proxy and invokes the intercomponent call. So far
so good, but I've only been able to specify up to 43 simultaneous
threads in the server properties; no more. Anything beyond 43 results
in failure:

Mar 21 23:10:29 2000: SRVLIB Message: 16115/10/0: Could not start thread
Mar 21 23:10:29 2000: Server::startServices: srv_spawn(runService)
failed

However, my best guess for the total number of threads that the
application will need is 5, so I'm not as disappointed that I'm limited
to 43 (at least on a Development license...)

Input appreciated.

Glenn

"Scott McReynolds [Sybase]" wrote:
>
> Glenn,
>
> Please open a case on this problem.
>
> Scott
>
> "Glenn Santa Cruz" <spam?no.glenn_santacruz@dailyaccess.com> wrote in
> message news:38D80300.1DA57059@dailyaccess.com...
> > Further investigation reveals that I can start as many threads as I
> > want, provided that the component for which I want to make an
> > intercomponent call is a Java class; I think I'm more confused now than
> > before.
> >
> > Glenn Santa Cruz wrote:
> > >
> > > Incidentally, here are the particulars:
> > >
> > > Jaguar 3.01 build 30033
> > > PB 7.0 build 7021
> > > JDK 1.1.8
> > >
> > > Glenn Santa Cruz wrote:
> > > >
> > > > Any idea why increasing the number of threads beyond 2 for a service
> > > > component would cause major problems?
> > > >
> > > > The scenario for the type of structure I'm describing is based
> somewhat
> > > > on "Service Component Lifecycle", posted on 12/01/1999 in this
> > > > newsgroup. (single SVC handling a queue, passing off work to other
> > > > components)
> > > >
> > > > I'm having trouble creating more than 2 threads in a java service
> > > > component; the component is marked as both shared and concurrent. The
> > > > run() method is supposed to get a handle to a PowerBuilder component
> so
> > > > that it can make intercomponent calls as requests fill a queue. A
> brief
> > > > snippet of run() is listed below. The PB component is flagged as
> > > > "concurrent, poolable, bind thread, and non-shared". All works well
> > > > when I set the number of threads (via
> com.sybase.jaguar.server.services)
> > > > to 1 or 2, but as soon as I go above that, I get the following dump in
> > > > my srv.log:
> > > >
> > > > ...
> > > > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > > > 'ExaktReports/ReportWorker'
> > > > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > > > 'ExaktReports/ReportWorker'
> > > > Mar 21 16:26:55 2000: Exception 'CORBA::OBJECT_NOT_EXIST' in
> > > > Session::create for component 'ExaktReports/ReportWorker'
> > > > Mar 21 16:26:55 2000: Thread id 2.0; Exception caught when attempting
> > > > run() method:
> > > > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > > > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > > > ...
> > > >
> > > > Any clues?
> > > >
> > > > TIA (as always)
> > > >
> > > > Glenn
> > > >
> > > > public void run() {
> > > > ReportWorker _worker = null;
> > > > try {
> > > > java.util.Properties props = new
> java.util.Properties();
> > > >
> props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
> > > > ORB orb = ORB.init((java.lang.String[])null, props);
> > > > _worker =
> > > >
> ReportWorkerHelper.narrow(orb.string_to_object("ExaktReports/ReportWorker"))
> ;
> > > > }
> > > > catch( Throwable t ) {
> > > > _stop = true;
> > > > System.err.println("Thread id " + id + "; Exception
> caught when
> > > > attempting run() method:\n" + t);
> > > > t.printStackTrace(System.err);
> > > > }
> > > > while (! _stop) {
> > > > try {
> > > > /** get a report from the instance queue **/
> > > > //...
> > > > /** process the report **/
> > > > ReportStatus stat =
> worker.processReport( rpt, key );
> > > > /** flag report as being complete **/
> > > > pushReportStatus( stat ) ;
> > > > }
> > > > catch(InterruptedException ie) {
> > > > System.err.println("Thread id " + id + "
> interrupted");
> > > > _stop = true;
> > > > }
> > > > catch(CTS.PBUserException pbue) {
> > > > System.err.println("Thread id " + id + "
> caught PBUserException:");
> > > > pbue.printStackTrace(System.err);
> > > > _stop = true;
> > > > }
> > > > }
> > > > }


Dave Wolf [Sybase] Posted on 2000-03-22 08:56:08.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: Multi-threaded Java Service Comp w/intercomponent call problem
Date: Wed, 22 Mar 2000 03:56:08 -0500
Lines: 158
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: nomad6-42.sybase.com 157.133.176.42
Message-ID: <347_xg3sV09k$GA.34@forums.sybase.com>
References: <347_38D7F764.CBD09FDC@dailyaccess.com> <347_38D7F9FC.C1BEF4A0@dailyaccess.com> <347_38D80300.1DA57059@dailyaccess.com> <347_yXp9i85k$GA.201@forums.sybase.com> <347_38D855DD.9DA43E40@dailyaccess.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25950
Article PK: 154361

Glenn,

I';ve heard of the 43 thread issue before. PLEASE open a case on this so we
can fix it.

Dave Wolf
Internet Applications Division

"Glenn Santa Cruz" <spam?no.glenn_santacruz@dailyaccess.com> wrote in
message news:38D855DD.9DA43E40@dailyaccess.com...
> I managed to accomplish what I wanted; please help me to decide whether
> the problem was poor design or a worth opening a bug case ;-)
>
> Instead of the run() method caching a handle to a component and then
> invoking that component directly, I created a private method to which
> each thread delegates work. Basically, when a thread gets notified that
> a report is ready to be run, it calls the private method, which in turn
> creates the necessary proxy and invokes the intercomponent call. So far
> so good, but I've only been able to specify up to 43 simultaneous
> threads in the server properties; no more. Anything beyond 43 results
> in failure:
>
> Mar 21 23:10:29 2000: SRVLIB Message: 16115/10/0: Could not start thread
> Mar 21 23:10:29 2000: Server::startServices: srv_spawn(runService)
> failed
>
> However, my best guess for the total number of threads that the
> application will need is 5, so I'm not as disappointed that I'm limited
> to 43 (at least on a Development license...)
>
> Input appreciated.
>
> Glenn
>
>
>
> "Scott McReynolds [Sybase]" wrote:
> >
> > Glenn,
> >
> > Please open a case on this problem.
> >
> > Scott
> >
> > "Glenn Santa Cruz" <spam?no.glenn_santacruz@dailyaccess.com> wrote in
> > message news:38D80300.1DA57059@dailyaccess.com...
> > > Further investigation reveals that I can start as many threads as I
> > > want, provided that the component for which I want to make an
> > > intercomponent call is a Java class; I think I'm more confused now
than
> > > before.
> > >
> > > Glenn Santa Cruz wrote:
> > > >
> > > > Incidentally, here are the particulars:
> > > >
> > > > Jaguar 3.01 build 30033
> > > > PB 7.0 build 7021
> > > > JDK 1.1.8
> > > >
> > > > Glenn Santa Cruz wrote:
> > > > >
> > > > > Any idea why increasing the number of threads beyond 2 for a
service
> > > > > component would cause major problems?
> > > > >
> > > > > The scenario for the type of structure I'm describing is based
> > somewhat
> > > > > on "Service Component Lifecycle", posted on 12/01/1999 in this
> > > > > newsgroup. (single SVC handling a queue, passing off work to other
> > > > > components)
> > > > >
> > > > > I'm having trouble creating more than 2 threads in a java service
> > > > > component; the component is marked as both shared and concurrent.
The
> > > > > run() method is supposed to get a handle to a PowerBuilder
component
> > so
> > > > > that it can make intercomponent calls as requests fill a queue. A
> > brief
> > > > > snippet of run() is listed below. The PB component is flagged as
> > > > > "concurrent, poolable, bind thread, and non-shared". All works
well
> > > > > when I set the number of threads (via
> > com.sybase.jaguar.server.services)
> > > > > to 1 or 2, but as soon as I go above that, I get the following
dump in
> > > > > my srv.log:
> > > > >
> > > > > ...
> > > > > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > > > > 'ExaktReports/ReportWorker'
> > > > > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > > > > 'ExaktReports/ReportWorker'
> > > > > Mar 21 16:26:55 2000: Exception 'CORBA::OBJECT_NOT_EXIST' in
> > > > > Session::create for component 'ExaktReports/ReportWorker'
> > > > > Mar 21 16:26:55 2000: Thread id 2.0; Exception caught when
attempting
> > > > > run() method:
> > > > > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > > > > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > > > > ...
> > > > >
> > > > > Any clues?
> > > > >
> > > > > TIA (as always)
> > > > >
> > > > > Glenn
> > > > >
> > > > > public void run() {
> > > > > ReportWorker _worker = null;
> > > > > try {
> > > > > java.util.Properties props = new
> > java.util.Properties();
> > > > >
> > props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
> > > > > ORB orb = ORB.init((java.lang.String[])null,
props);
> > > > > _worker =
> > > > >
> >
ReportWorkerHelper.narrow(orb.string_to_object("ExaktReports/ReportWorker"))
> > ;
> > > > > }
> > > > > catch( Throwable t ) {
> > > > > _stop = true;
> > > > > System.err.println("Thread id " + id + ";
Exception
> > caught when
> > > > > attempting run() method:\n" + t);
> > > > > t.printStackTrace(System.err);
> > > > > }
> > > > > while (! _stop) {
> > > > > try {
> > > > > /** get a report from the instance queue
**/
> > > > > //...
> > > > > /** process the report **/
> > > > > ReportStatus stat =
> > worker.processReport( rpt, key );
> > > > > /** flag report as being complete **/
> > > > > pushReportStatus( stat ) ;
> > > > > }
> > > > > catch(InterruptedException ie) {
> > > > > System.err.println("Thread id " + id + "
> > interrupted");
> > > > > _stop = true;
> > > > > }
> > > > > catch(CTS.PBUserException pbue) {
> > > > > System.err.println("Thread id " + id + "
> > caught PBUserException:");
> > > > > pbue.printStackTrace(System.err);
> > > > > _stop = true;
> > > > > }
> > > > > }
> > > > > }


Himagiri Mukkamala Posted on 2000-03-22 17:03:24.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 22 Mar 2000 09:03:24 -0800
From: Himagiri Mukkamala <himagiri@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Multi-threaded Java Service Comp w/intercomponent call problem
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 163
NNTP-Posting-Host: cyclones.sybase.com 130.214.20.34
Message-ID: <347_38D8FCDC.CA3E3616@sybase.com>
References: <347_38D7F764.CBD09FDC@dailyaccess.com> <347_38D7F9FC.C1BEF4A0@dailyaccess.com> <347_38D80300.1DA57059@dailyaccess.com> <347_yXp9i85k$GA.201@forums.sybase.com> <347_38D855DD.9DA43E40@dailyaccess.com> <347_xg3sV09k$GA.34@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25917
Article PK: 155944

Issue is fixed in jaguar35 where there is a gui option for
server properties to increase the max number of threads that
can be created.

Should be in the latest ebf which willb e out soon --
himagiri

"Dave Wolf [Sybase]" wrote:
>
> Glenn,
>
> I';ve heard of the 43 thread issue before. PLEASE open a case on this so we
> can fix it.
>
> Dave Wolf
> Internet Applications Division
>
> "Glenn Santa Cruz" <spam?no.glenn_santacruz@dailyaccess.com> wrote in
> message news:38D855DD.9DA43E40@dailyaccess.com...
> > I managed to accomplish what I wanted; please help me to decide whether
> > the problem was poor design or a worth opening a bug case ;-)
> >
> > Instead of the run() method caching a handle to a component and then
> > invoking that component directly, I created a private method to which
> > each thread delegates work. Basically, when a thread gets notified that
> > a report is ready to be run, it calls the private method, which in turn
> > creates the necessary proxy and invokes the intercomponent call. So far
> > so good, but I've only been able to specify up to 43 simultaneous
> > threads in the server properties; no more. Anything beyond 43 results
> > in failure:
> >
> > Mar 21 23:10:29 2000: SRVLIB Message: 16115/10/0: Could not start thread
> > Mar 21 23:10:29 2000: Server::startServices: srv_spawn(runService)
> > failed
> >
> > However, my best guess for the total number of threads that the
> > application will need is 5, so I'm not as disappointed that I'm limited
> > to 43 (at least on a Development license...)
> >
> > Input appreciated.
> >
> > Glenn
> >
> >
> >
> > "Scott McReynolds [Sybase]" wrote:
> > >
> > > Glenn,
> > >
> > > Please open a case on this problem.
> > >
> > > Scott
> > >
> > > "Glenn Santa Cruz" <spam?no.glenn_santacruz@dailyaccess.com> wrote in
> > > message news:38D80300.1DA57059@dailyaccess.com...
> > > > Further investigation reveals that I can start as many threads as I
> > > > want, provided that the component for which I want to make an
> > > > intercomponent call is a Java class; I think I'm more confused now
> than
> > > > before.
> > > >
> > > > Glenn Santa Cruz wrote:
> > > > >
> > > > > Incidentally, here are the particulars:
> > > > >
> > > > > Jaguar 3.01 build 30033
> > > > > PB 7.0 build 7021
> > > > > JDK 1.1.8
> > > > >
> > > > > Glenn Santa Cruz wrote:
> > > > > >
> > > > > > Any idea why increasing the number of threads beyond 2 for a
> service
> > > > > > component would cause major problems?
> > > > > >
> > > > > > The scenario for the type of structure I'm describing is based
> > > somewhat
> > > > > > on "Service Component Lifecycle", posted on 12/01/1999 in this
> > > > > > newsgroup. (single SVC handling a queue, passing off work to other
> > > > > > components)
> > > > > >
> > > > > > I'm having trouble creating more than 2 threads in a java service
> > > > > > component; the component is marked as both shared and concurrent.
> The
> > > > > > run() method is supposed to get a handle to a PowerBuilder
> component
> > > so
> > > > > > that it can make intercomponent calls as requests fill a queue. A
> > > brief
> > > > > > snippet of run() is listed below. The PB component is flagged as
> > > > > > "concurrent, poolable, bind thread, and non-shared". All works
> well
> > > > > > when I set the number of threads (via
> > > com.sybase.jaguar.server.services)
> > > > > > to 1 or 2, but as soon as I go above that, I get the following
> dump in
> > > > > > my srv.log:
> > > > > >
> > > > > > ...
> > > > > > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > > > > > 'ExaktReports/ReportWorker'
> > > > > > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > > > > > 'ExaktReports/ReportWorker'
> > > > > > Mar 21 16:26:55 2000: Exception 'CORBA::OBJECT_NOT_EXIST' in
> > > > > > Session::create for component 'ExaktReports/ReportWorker'
> > > > > > Mar 21 16:26:55 2000: Thread id 2.0; Exception caught when
> attempting
> > > > > > run() method:
> > > > > > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > > > > > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > > > > > ...
> > > > > >
> > > > > > Any clues?
> > > > > >
> > > > > > TIA (as always)
> > > > > >
> > > > > > Glenn
> > > > > >
> > > > > > public void run() {
> > > > > > ReportWorker _worker = null;
> > > > > > try {
> > > > > > java.util.Properties props = new
> > > java.util.Properties();
> > > > > >
> > > props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
> > > > > > ORB orb = ORB.init((java.lang.String[])null,
> props);
> > > > > > _worker =
> > > > > >
> > >
> ReportWorkerHelper.narrow(orb.string_to_object("ExaktReports/ReportWorker"))
> > > ;
> > > > > > }
> > > > > > catch( Throwable t ) {
> > > > > > _stop = true;
> > > > > > System.err.println("Thread id " + id + ";
> Exception
> > > caught when
> > > > > > attempting run() method:\n" + t);
> > > > > > t.printStackTrace(System.err);
> > > > > > }
> > > > > > while (! _stop) {
> > > > > > try {
> > > > > > /** get a report from the instance queue
> **/
> > > > > > //...
> > > > > > /** process the report **/
> > > > > > ReportStatus stat =
> > > worker.processReport( rpt, key );
> > > > > > /** flag report as being complete **/
> > > > > > pushReportStatus( stat ) ;
> > > > > > }
> > > > > > catch(InterruptedException ie) {
> > > > > > System.err.println("Thread id " + id + "
> > > interrupted");
> > > > > > _stop = true;
> > > > > > }
> > > > > > catch(CTS.PBUserException pbue) {
> > > > > > System.err.println("Thread id " + id + "
> > > caught PBUserException:");
> > > > > > pbue.printStackTrace(System.err);
> > > > > > _stop = true;
> > > > > > }
> > > > > > }
> > > > > > }

--
Himagiri Mukkamala - EA Server Engineering,
Sybase Inc., 510.922.5477


Glenn Santa Cruz Posted on 2000-03-22 16:32:04.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 22 Mar 2000 10:32:04 -0600
From: Glenn Santa Cruz <spam?no.glenn_santacruz@dailyaccess.com>
Organization: Daily Access Concepts
X-Mailer: Mozilla 4.7 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Multi-threaded Java Service Comp w/intercomponent call problem
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 159
NNTP-Posting-Host: 12.6.74.30
Message-ID: <347_38D8F584.55138BCE@dailyaccess.com>
References: <347_38D7F764.CBD09FDC@dailyaccess.com> <347_38D7F9FC.C1BEF4A0@dailyaccess.com> <347_38D80300.1DA57059@dailyaccess.com> <347_yXp9i85k$GA.201@forums.sybase.com> <347_38D855DD.9DA43E40@dailyaccess.com> <347_xg3sV09k$GA.34@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25921
Article PK: 155949

I will open the case on 43 threads (no handle caching), but do you have
any ideas on the 2 thread limit when caching handles?

Glenn

"Dave Wolf [Sybase]" wrote:
>
> Glenn,
>
> I';ve heard of the 43 thread issue before. PLEASE open a case on this so we
> can fix it.
>
> Dave Wolf
> Internet Applications Division
>
> "Glenn Santa Cruz" <spam?no.glenn_santacruz@dailyaccess.com> wrote in
> message news:38D855DD.9DA43E40@dailyaccess.com...
> > I managed to accomplish what I wanted; please help me to decide whether
> > the problem was poor design or a worth opening a bug case ;-)
> >
> > Instead of the run() method caching a handle to a component and then
> > invoking that component directly, I created a private method to which
> > each thread delegates work. Basically, when a thread gets notified that
> > a report is ready to be run, it calls the private method, which in turn
> > creates the necessary proxy and invokes the intercomponent call. So far
> > so good, but I've only been able to specify up to 43 simultaneous
> > threads in the server properties; no more. Anything beyond 43 results
> > in failure:
> >
> > Mar 21 23:10:29 2000: SRVLIB Message: 16115/10/0: Could not start thread
> > Mar 21 23:10:29 2000: Server::startServices: srv_spawn(runService)
> > failed
> >
> > However, my best guess for the total number of threads that the
> > application will need is 5, so I'm not as disappointed that I'm limited
> > to 43 (at least on a Development license...)
> >
> > Input appreciated.
> >
> > Glenn
> >
> >
> >
> > "Scott McReynolds [Sybase]" wrote:
> > >
> > > Glenn,
> > >
> > > Please open a case on this problem.
> > >
> > > Scott
> > >
> > > "Glenn Santa Cruz" <spam?no.glenn_santacruz@dailyaccess.com> wrote in
> > > message news:38D80300.1DA57059@dailyaccess.com...
> > > > Further investigation reveals that I can start as many threads as I
> > > > want, provided that the component for which I want to make an
> > > > intercomponent call is a Java class; I think I'm more confused now
> than
> > > > before.
> > > >
> > > > Glenn Santa Cruz wrote:
> > > > >
> > > > > Incidentally, here are the particulars:
> > > > >
> > > > > Jaguar 3.01 build 30033
> > > > > PB 7.0 build 7021
> > > > > JDK 1.1.8
> > > > >
> > > > > Glenn Santa Cruz wrote:
> > > > > >
> > > > > > Any idea why increasing the number of threads beyond 2 for a
> service
> > > > > > component would cause major problems?
> > > > > >
> > > > > > The scenario for the type of structure I'm describing is based
> > > somewhat
> > > > > > on "Service Component Lifecycle", posted on 12/01/1999 in this
> > > > > > newsgroup. (single SVC handling a queue, passing off work to other
> > > > > > components)
> > > > > >
> > > > > > I'm having trouble creating more than 2 threads in a java service
> > > > > > component; the component is marked as both shared and concurrent.
> The
> > > > > > run() method is supposed to get a handle to a PowerBuilder
> component
> > > so
> > > > > > that it can make intercomponent calls as requests fill a queue. A
> > > brief
> > > > > > snippet of run() is listed below. The PB component is flagged as
> > > > > > "concurrent, poolable, bind thread, and non-shared". All works
> well
> > > > > > when I set the number of threads (via
> > > com.sybase.jaguar.server.services)
> > > > > > to 1 or 2, but as soon as I go above that, I get the following
> dump in
> > > > > > my srv.log:
> > > > > >
> > > > > > ...
> > > > > > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > > > > > 'ExaktReports/ReportWorker'
> > > > > > Mar 21 16:26:55 2000: CTS_Component::load: failed for component
> > > > > > 'ExaktReports/ReportWorker'
> > > > > > Mar 21 16:26:55 2000: Exception 'CORBA::OBJECT_NOT_EXIST' in
> > > > > > Session::create for component 'ExaktReports/ReportWorker'
> > > > > > Mar 21 16:26:55 2000: Thread id 2.0; Exception caught when
> attempting
> > > > > > run() method:
> > > > > > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > > > > > Mar 21 16:26:55 2000: org.omg.CORBA.OBJECT_NOT_EXIST:
> > > > > > ...
> > > > > >
> > > > > > Any clues?
> > > > > >
> > > > > > TIA (as always)
> > > > > >
> > > > > > Glenn
> > > > > >
> > > > > > public void run() {
> > > > > > ReportWorker _worker = null;
> > > > > > try {
> > > > > > java.util.Properties props = new
> > > java.util.Properties();
> > > > > >
> > > props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
> > > > > > ORB orb = ORB.init((java.lang.String[])null,
> props);
> > > > > > _worker =
> > > > > >
> > >
> ReportWorkerHelper.narrow(orb.string_to_object("ExaktReports/ReportWorker"))
> > > ;
> > > > > > }
> > > > > > catch( Throwable t ) {
> > > > > > _stop = true;
> > > > > > System.err.println("Thread id " + id + ";
> Exception
> > > caught when
> > > > > > attempting run() method:\n" + t);
> > > > > > t.printStackTrace(System.err);
> > > > > > }
> > > > > > while (! _stop) {
> > > > > > try {
> > > > > > /** get a report from the instance queue
> **/
> > > > > > //...
> > > > > > /** process the report **/
> > > > > > ReportStatus stat =
> > > worker.processReport( rpt, key );
> > > > > > /** flag report as being complete **/
> > > > > > pushReportStatus( stat ) ;
> > > > > > }
> > > > > > catch(InterruptedException ie) {
> > > > > > System.err.println("Thread id " + id + "
> > > interrupted");
> > > > > > _stop = true;
> > > > > > }
> > > > > > catch(CTS.PBUserException pbue) {
> > > > > > System.err.println("Thread id " + id + "
> > > caught PBUserException:");
> > > > > > pbue.printStackTrace(System.err);
> > > > > > _stop = true;
> > > > > > }
> > > > > > }
> > > > > > }