AW: Question about Conversational OSGi Services and Service References
Hi Rajini, Yes, after adding classes to my .composite file the Scope is found. Now, if Alpha.doSomething() is executed twice (one after the other without using @OneWay) it works and each call uses different ConversationIDs. However, if I annotate Alpha.doSomething() with @OneWay and call Alpha.doSomething() twice (now executed in "parallel") it behaves strangely. Some more details: This is the sequence in that Gamma is accessed: 1x Gamma(), constructor does nothing but a println 1x initialize(), initializes members Nx doSomethingElse() , performs some actions on members 1x stop(), closes the conversation When debugging the two calls to Alpha.doSomething() one after another, I see that Gamma() is called twice and that in initialize() two different ConversationIDs are created and reused in doSomethingElse() and it works without any error If I only set a breakpoint in Gamma.initialize() my JVM crashes: # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc005) at pc=0x6d794743, pid=2708, tid=3612 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_10-b03 mixed mode) # Problematic frame: # V [jvm.dll+0x64743] # # An error report file with more information is saved as hs_err_pid2708.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # If I simply execute the test, most of the time I get a NullPointer in doSomethingElse(), because a member of Gamma is null. In some rare cases the test runs correctly. If I add "synchronize" to method initialze(), the test runs without any errors, using the correct ConversationIDs. This seems to be some kind of threading problem, but as there are two instances of Gamma I can't see any problem in my code. Besides, as I said in a previous mail, without using implementation.osgi the test runs well. Bye, Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about Conversational OSGi Services and Service References
Daniel, You are on the right track. Sorry, I should have mentioned this before. The classes from which @Scope annotations are processed in implementation.osgi should be listed under the attribute "classes" in in the composite file. http://tuscany.apache.org/xmlns/sca/1.0bundleSymbolicName="gamma"; classes="services.GammaImpl"/> There are some examples which use servicefactory in itest/osgi-implementation (eg. factory-ds-test.composite). Most annotations like @Property are processed from the implementation class of the service (GammaImpl) once the service instance is obtained, even if the class is not listed in . But since scope needs to be determined before the service instance is obtained from OSGi, the class(es) from which @Scope annotation is processed should be listed in the composite file. On 4/7/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi Radjini, > > > You cannot set servicefactory to true inside an immediate > > component. Since the service is not registered by OSGi DS in > > the OSGi registry in this case, implementation.osgi never > > finds it - hence the infinite loop. > > Yes, configuring it in this way makes no sense. A warning would be nice > :-) > > > > With immediate=false, I would have expected a new instance to > > be created for Gamma for each conversation. > > > > Could you check if the following are true? > > > > > >1. GammaImpl should contain the annotation > > @Scope("CONVERSATION") on > >the class. Not necessarily conversation - anything other > > than COMPOSITE. > > Yes, this is true. It is marked with @Scope("CONVERSATION") > > > >2. The bundle containing GammaImpl should import > > org.osoa.sca.annotations > >(ie. @Scope annotation should be visible from the bundle) > > Yes, this is also true > > > >3. If 1) and 2) are true, could you breakpoint in the > > constructor of > >GammaImpl (or anywhere in that class) and check that you > > have a bundle > >installed with name "dummy.sca.x"? implementation.osgi > > should be using a > >dummy bundle to get a reference to the Gamma service if it > > has identified > >that the scope is not composite. > > I could not see a bundle "dummy.sca.*" in the equinox console. > > While debugging, I noticed the following in class OSGiInstanceWrapper: > In line 119 >if (!annotationProcessor.getScope().equals(Scope.COMPOSITE)) > the getScope() returns "COMPOSITE", not "CONVERSATION" > So line 118 >refBundle = getDummyReferenceBundle(); > is not executed > > So it seems that the annotation was not found or not processed > correctly. > > After some further debugging: > > In OSGiImplementationProvider in line 162 implementation.getClassList() > returns an empty list. > Therefore method processAnnotations() of class OSGiAnnotations has no > classes to iterate over an leaves the default scope to "COMPOSITE". > Maybe there's something missing in the bundles manifest file ? What > should be included in this calls list and where/how is it configured. > Or am I on a wrong track ? > > > Bye, > Daniel > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thank you... Regards, Rajini
AW: Question about Conversational OSGi Services and Service References
Hi Radjini, > You cannot set servicefactory to true inside an immediate > component. Since the service is not registered by OSGi DS in > the OSGi registry in this case, implementation.osgi never > finds it - hence the infinite loop. Yes, configuring it in this way makes no sense. A warning would be nice :-) > With immediate=false, I would have expected a new instance to > be created for Gamma for each conversation. > > Could you check if the following are true? > > >1. GammaImpl should contain the annotation > @Scope("CONVERSATION") on >the class. Not necessarily conversation - anything other > than COMPOSITE. Yes, this is true. It is marked with @Scope("CONVERSATION") >2. The bundle containing GammaImpl should import > org.osoa.sca.annotations >(ie. @Scope annotation should be visible from the bundle) Yes, this is also true >3. If 1) and 2) are true, could you breakpoint in the > constructor of >GammaImpl (or anywhere in that class) and check that you > have a bundle >installed with name "dummy.sca.x"? implementation.osgi > should be using a >dummy bundle to get a reference to the Gamma service if it > has identified >that the scope is not composite. I could not see a bundle "dummy.sca.*" in the equinox console. While debugging, I noticed the following in class OSGiInstanceWrapper: In line 119 if (!annotationProcessor.getScope().equals(Scope.COMPOSITE)) the getScope() returns "COMPOSITE", not "CONVERSATION" So line 118 refBundle = getDummyReferenceBundle(); is not executed So it seems that the annotation was not found or not processed correctly. After some further debugging: In OSGiImplementationProvider in line 162 implementation.getClassList() returns an empty list. Therefore method processAnnotations() of class OSGiAnnotations has no classes to iterate over an leaves the default scope to "COMPOSITE". Maybe there's something missing in the bundles manifest file ? What should be included in this calls list and where/how is it configured. Or am I on a wrong track ? Bye, Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about Conversational OSGi Services and Service References
Daniel, You cannot set servicefactory to true inside an immediate component. Since the service is not registered by OSGi DS in the OSGi registry in this case, implementation.osgi never finds it - hence the infinite loop. With immediate=false, I would have expected a new instance to be created for Gamma for each conversation. Could you check if the following are true? 1. GammaImpl should contain the annotation @Scope("CONVERSATION") on the class. Not necessarily conversation - anything other than COMPOSITE. 2. The bundle containing GammaImpl should import org.osoa.sca.annotations (ie. @Scope annotation should be visible from the bundle) 3. If 1) and 2) are true, could you breakpoint in the constructor of GammaImpl (or anywhere in that class) and check that you have a bundle installed with name "dummy.sca.x"? implementation.osgi should be using a dummy bundle to get a reference to the Gamma service if it has identified that the scope is not composite. On 4/7/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi Rajini, > > Thanks for your answer. It improved my understanding of SCA scopes in OSGi > services. > The last part (using osgi bundles but not osgi services) works fine, I > just wanted to experiment with osgi Declarative Services. > > I added servicefactory="true" to my osgi service description. It still > also contained immediate="true", which seems to be opposed. > With these settings my test ran into an infinite loop in method > getOSGiServiceReference(Interface serviceInterface, String filter, String > scaServiceName) of class OSGiImplementationProvider. The while loop never > completes, as osgiServiceReference is always null. > > So I set immediate="true". Now I have the same behavior as described in my > previous mail. So servicefactory="true" seems to have no effect. > > As I understood your comments, there is no need to implement a Factory > class when using Declarative Services, right ? > This is my component description file: > > > > > > > > > > > Any ideas what's the issue here ? > Thanks in advance. > > Bye, > Daniel > > > > -Ursprüngliche Nachricht- > > Von: Rajini Sivaram [mailto:[EMAIL PROTECTED] > > Gesendet: Sonntag, 6. April 2008 22:02 > > An: tuscany-user@ws.apache.org > > Betreff: Re: Question about Conversational OSGi Services and > > Service References > > > > Daniel, > > > > The default scope for implementation.osgi components is > > COMPOSITE - this matches standard OSGi services where a > > single instance of the service is added to the OSGi service > > registry and the same instance is returned by any OSGi > > registry lookup. Other SCA scopes including CONVERSATION are > > supported by implementation.osgi, but they require the OSGi > > service to be implemented using service factories. If a > > service factory is registered for Gamma, Tuscany will force a > > new instance of Gamma to be created for every new > > conversation. There is an example of conversational services > > using OSGi procedural services under > > itest/osgi-implementation. It is much simpler with > > declarative services since you would just need to specify the > > servicefactory flag for the service. > > > > If you want to use a conversational service with Tuscany > > without registering the service in the OSGi registry, you can > > use implementation.java. Since your contribution is a bundle, > > OSGi will still be used to resolve your classes, but the > > conversational service instances can be created directly > > without going through OSGi service factories. > > > > Hope this helps. > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thank you... Regards, Rajini
Re: STP SCA Component -> STP SCA Tools sub project
Hi, I created an entry [0] in the Eclipse bugzilla with the proposal. Your comments are welcome. Best regards Stéphane Drapeau Obeo [0]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=225956 On Thu, Apr 3, 2008 at 11:10 AM, Stéphane Drapeau <[EMAIL PROTECTED]> wrote: > Haleh, Raymond, > > Thank you for your answers. > > Haleh, you're right. I make no distinction between tools for SCA > developers and tools for SCA users. The goal of the project is to develop > tools to help users of the SCA technology. I will modify my sentence. > > Stéphane Drapeau > Obeo > > > On Thu, Apr 3, 2008 at 6:21 AM, haleh mahbod <[EMAIL PROTECTED]> wrote: > > > Hi Stephan, > > > > This looks good since it looks like tools for SCA will get more focus :) > > I have a question. > > > > You mention "the goals of the new sub-project are to develop a set of > > tools for SCA developers and SCA users". > > > > What is the difference between SCA developer and SCA user in this > > context? > > > > Haleh > > > > On 4/2/08, Stéphane Drapeau <[EMAIL PROTECTED]> wrote: > > > > > > Hi Jean-Sebastien, Haleh, all, > > > > > > The proposal is a 3 pages document describing the scope/intent of the > > > proposed project. > > > > > > The outline is: > > > 1. Introduction: the proposition of the transformation of the STP/SCA > > > component into a sub-project named SCA Tools under the top level > > project > > > STP. > > > 2. Background: presentation of STP + presentation of the existing > > STP/SCA > > > component. > > > 3. Description: the goals of the new sub-project are to develop a set > > of > > > tools for SCA developers and SCA users. Another goal is also to link > > this > > > sub-project with other components of STP (Service Creation, Policy > > Editor) > > > 4. Proposed components: SCA Domain Model (SCA meta model), SCA > > Composite > > > Designer, SCA Composite Editors (tree, xml and form), SCA Integration > > > (integration with other STP components) > > > 5. Relationship with Other Eclipse Projects: STP, EMF, GMF, M2M, ... > > > 6. Organization: this sub-project will take place under the top level > > > project STP. > > > 7. A list of proposed initial committers. > > > 8. Code Contribution: the Eclipse STP/SCA component will be the > > initial > > > code. > > > 9. Interested parties: this section lists companies and communities > > that > > > support the creation of the project. They don't take other > > engagements. > > > 10. Tentative Plan for 2008 and 2009. > > > > > > Our goal is to identify formally the scope of the tools that we > > develop > > > around SCA. The new status will provide some advantages. > > > - I think that the SCA tools will be more visible in the Eclipse > > community > > > if we are identified as a sub-project. > > > - From the users point of view, it will not change anything. > > > - Concerning us, we should be more formal: clear roadmap, new features > > > described/discussed first in bugzilla, ... > > > - It will also present some advantages for Obeo by becoming a > > sub-project > > > leader. > > > > > > In the near future all STP components will become STP sub-projects. To > > > summarize, all of this is purely administrative. > > > I will send you the proposal document ASAP. > > > If you have any questions, don't hesitate. > > > > > > Haleh, yesterday I sent you more information about the SCA Composite > > > Designer on the thread named "[Website] - Tooling for Java SCA". You > > can > > > add > > > it on the web page. Tell me if you need more/different information. > > > My post describes what version of Tuscany can be used. I also > > introduce a > > > tutorial that I made. This tutorial is based on the SCA designer and > > > Tuscany > > > 1.1. > > > > > > Best regards, > > > > > > Stéphane Drapeau > > > Obeo > > > > > > On Wed, Apr 2, 2008 at 8:05 AM, haleh mahbod <[EMAIL PROTECTED]> > > wrote: > > > > > > > Hi Stephane, > > > > > > > > Welcome to Tuscany. How will changing the status of STP SCA from a > > > > component > > > > to a sub project change its future development and focus? > > > > > > > > Tuscany community had asked about tools for SCA and because of that > > I > > > > recently added a website page [1] to collect more information about > > > > available open source tools. I added a link to STP there. It would > > be > > > > great > > > > if you could provide more content about what is available and what > > > version > > > > of Tuscany it works with. > > > > > > > > [1]: http://incubator.apache.org/tuscany/java-sca-tools.html > > > > > > > > > > > > Haleh > > > > > > > > On 4/1/08, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Stéphane Drapeau wrote: > > > > > > Hi, > > > > > > > > > > > > I'm Stéphane Drapeau from Obeo. I work on tools for SCA and I > > lead > > > the > > > > > > Eclipse SCA component which is a component of the STP project > > [1]. > > > > > > Currently, I'm writing a proposal to change the status of the > > STP > > > SCA > > > > * > > > >
Re: Overhead of SCA Native Container
Hi Andy, I have run my above test in Apache 2.0 httpd server with axis2c 0.96 version and could get a decent timing for my web service SOAP test. At times for a 300 user test it gave me an average time of 6millisec for a load of approximately 393 bytes soap request and the throughput is 14.9 messages per second, with zero errors. If I increase the test to 600 users it gave me a throughput of 29.4 msg/sec and average time is 5 millisec. This is the best case scenario, but at other times even for a 50 user test it gives memory exception and on going to debug mode I get this unhandled exception which I have updated below (the output window messages). Some SOAP request takes a lot of time and is successful, but most of the SOAP request fails. The best_case/worst_case scenario is 50/50 and hence reliability is problem here. Is this a problem with the axis2c soap engine or a Tuscany problem, can you give your comment based on this output msg If anyone else has an opinion on how to resolve this exception please comment, it will be of great help for me. Regards Roshan 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\bin\Apache.exe', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\bin\libapr.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\secur32.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\mswsock.dll', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\bin\libaprutil.dll', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\bin\libapriconv.dll', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\bin\libhttpd.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\hnetcfg.dll', No symbols loaded. 'Apache.exe': Loaded 'C:\WINDOWS\system32\wshtcpip.dll', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_access.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_actions.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_alias.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_asis.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_auth.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_autoindex.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_cgi.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_dir.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_env.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_imap.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_include.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_isapi.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_log_config.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_mime.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_negotiation.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_setenvif.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_userdir.so', No symbols loaded. 'Apache.exe': Loaded 'D:\Apache2.0\Apache2\modules\mod_axis2.so', Symbols loaded. 'Apache.exe': Loaded 'D:\Axis2C-bin-0.96\axis2c-src-0.96\build\deploy\lib\axis2_util.dll', Symbols loaded. 'Apache.exe': Loaded 'D:\Prototype\hi_tools\zlib\1.2.3\bin\zlib1.dll', Binary was not built with debug information. 'Apache.exe': Loaded 'D:\Axis2C-bin-0.96\axis2c-src-0.96\build\deploy\lib\axis2_parser.dll', Symbols loaded. 'Apache.exe': Loaded 'D:\Prototype\hi_tools\libxml2\2.6.20\bin\libxml2.dll', Binary was not built with debug inf
AW: Question about Conversational OSGi Services and Service References
Hi Rajini, Thanks for your answer. It improved my understanding of SCA scopes in OSGi services. The last part (using osgi bundles but not osgi services) works fine, I just wanted to experiment with osgi Declarative Services. I added servicefactory="true" to my osgi service description. It still also contained immediate="true", which seems to be opposed. With these settings my test ran into an infinite loop in method getOSGiServiceReference(Interface serviceInterface, String filter, String scaServiceName) of class OSGiImplementationProvider. The while loop never completes, as osgiServiceReference is always null. So I set immediate="true". Now I have the same behavior as described in my previous mail. So servicefactory="true" seems to have no effect. As I understood your comments, there is no need to implement a Factory class when using Declarative Services, right ? This is my component description file: Any ideas what's the issue here ? Thanks in advance. Bye, Daniel > -Ursprüngliche Nachricht- > Von: Rajini Sivaram [mailto:[EMAIL PROTECTED] > Gesendet: Sonntag, 6. April 2008 22:02 > An: tuscany-user@ws.apache.org > Betreff: Re: Question about Conversational OSGi Services and > Service References > > Daniel, > > The default scope for implementation.osgi components is > COMPOSITE - this matches standard OSGi services where a > single instance of the service is added to the OSGi service > registry and the same instance is returned by any OSGi > registry lookup. Other SCA scopes including CONVERSATION are > supported by implementation.osgi, but they require the OSGi > service to be implemented using service factories. If a > service factory is registered for Gamma, Tuscany will force a > new instance of Gamma to be created for every new > conversation. There is an example of conversational services > using OSGi procedural services under > itest/osgi-implementation. It is much simpler with > declarative services since you would just need to specify the > servicefactory flag for the service. > > If you want to use a conversational service with Tuscany > without registering the service in the OSGi registry, you can > use implementation.java. Since your contribution is a bundle, > OSGi will still be used to resolve your classes, but the > conversational service instances can be created directly > without going through OSGi service factories. > > Hope this helps. > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]