Hi Lakmali, Isn't there an in-VM service which can be used to publish this in the embedded AM scenario? I realize that this is the correct approach if you need to connect to a remote server, but for in-VM use, I don't think this is proper.
Thanks, Senaka. On Tue, Jul 30, 2013 at 1:05 PM, Lakmali Baminiwatta <[email protected]>wrote: > Hi Sameera, > > > On 30 July 2013 13:00, Sameera Jayasoma <[email protected]> wrote: > >> Hi Lakmali, >> >> >> >> On Thu, Jul 25, 2013 at 12:19 PM, Lakmali Baminiwatta >> <[email protected]>wrote: >> >>> Hi all, >>> >>> I have a requirement to publish some internal APIs at the server >>> startup. We are planing to use the Publisher API for this. So in order to >>> call Publisher API, the publisher web app should be available and in that >>> case, the server should have been started. >>> >>> We thought of writing a new OSGI component, which will activate after >>> the server has started. I noticed that there are some components already >>> there which always get activated after the server is started. >>> >>> ex: In API Manager, ThriftAuthenticationServiceComponent[1] activate >>> method get invoked after the server has started (ie : server is accessible >>> at that point). >>> >>> I added all the @src references available in the >>> ThriftAuthenticationServiceComponent to a new component which I wrote. But >>> the new component starts before the server start completion. So I am unable >>> to find the reason which makes the ThriftAuthenticationServiceComponent >>> startup to happen last. >>> >> >> Putting all the @src references of another component is a bad idea. We >> put @src references if you need those services for your component. >> >>> >>> Is there a way to make a component to start after the server startup is >>> completed? >>> >> >> Nope. We don't have a way to identify when the server completely starts. >> But we invoke the ServerStartupHandler.invoke() method when all the >> transports are initialized. i.e ports are up and the server is able to >> server requires. I guess you can leverage this requirement. >> > > But when the ServerStartupHandler.invoke() is invoked, I am unable to > access the management console/log in to the publisher web app. It is > throwing the below exception. > > > [2013-07-25 15:15:43,209] INFO > {org.apache.axis2.transport.http.HTTPSender} - Unable to sendViaPost to > url[https://10.200.0.202:9444/services/UserAdmin] > org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found > at > org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:308) > at > org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194) > at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) > > Thanks, > Lakmali > >> >>> >>> [1] >>> https://svn.wso2.org/repos/wso2/carbon/platform/trunk/components/identity/org.wso2.carbon.identity.thrift.authentication/src/main/java/org/wso2/carbon/identity/thrift/authentication/internal/ThriftAuthenticationServiceComponent.java >>> >>> Thanks, >>> Lakmali >>> >>> >>> >>> >>> >>> >>> -- >>> Lakmali Baminiwatta* >>> * >>> Software Engineer >>> WSO2, Inc.: http://wso2.com >>> lean.enterprise.middleware >>> mobile: +94 71 2335936 >>> blog : lakmali.com >>> * >>> * >>> >> >> >> >> -- >> Sameera Jayasoma, >> Architect, >> >> WSO2, Inc. (http://wso2.com) >> email: [email protected] >> blog: http://sameera.adahas.org >> twitter: https://twitter.com/sameerajayasoma >> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections >> >> Lean . Enterprise . Middleware >> > > > > -- > Lakmali Baminiwatta* > * > Software Engineer > WSO2, Inc.: http://wso2.com > lean.enterprise.middleware > mobile: +94 71 2335936 > blog : lakmali.com > * > * > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- * <http://us13.wso2con.com/> * * * *Senaka Fernando* Senior Technical Lead; WSO2 Inc.; http://wso2.com* Member; Apache Software Foundation; http://apache.org E-mail: senaka AT wso2.com **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818 Linked-In: http://linkedin.com/in/senakafernando *Lean . Enterprise . Middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
