[jboss-user] [JBossWS] - Re: Class Cast Exception under Endpoint.publish()
do-not-reply at jboss.com
Mon Jan 12 08:32:48 EST 2009
Thanks for the quick response, Richard.
anonymous wrote :
| Endpoint.publish(), Endpoint.unpublish() is faulty by design IMHO.
| It doesn't make sense to be able to publish POJOs to different web contexts.
| Here are top two reasons why I think it is broken and hence excluded from TCK5 tests:
| * security issue (how to configure java security for such ugly published endpoints where e.g. Security Manager is turned on)?
| * design problem (why web archive should be able to publish another web/ejb archive)?
I'm not sure exactly why you think this makes it either undesirable or impossible to implement the Endpoint API as defined in the JaxWS spec. Let's go through these in turn:
1) It definitely makes sense to publish a specific POJO to a specific web context. Firstly, this API is simpler to use than providing a war with web.xml config. Secondly, it is dynamic, which allows all sorts of options not available using fixed web.xml config. For example, the endpoint implementation class might be loaded (or even generated) dynamically by the application.
And, actually, if you want to use the same POJO to masquerade behind two (or more) different URLs what is wrong with that? I can imagine good reasons for presenting a single service via multiple URLs and iIt's quite straightforward to deal with any threading issues this might imply.
2) The JaxWS spec does talk about security (Subsection 5.2.3 of the 21. spec) and, indeed, the Security permission it defines is checked by the current implementation of class EndpointImpl. Why can this implementation not be retro-fitted to conform to the JBoss Security Manager requirements?
3) I don't want a web archive to publish another web/ejb archive. In my case I have a test runner program for the XTS (Web Services Transactions) implementation. I deploy the test runner as a POJO via a jboss-beans.xml file. The test runner dynamically loads and executes different tests on different runs. Depending upon the specifics of the test, it needs to be able to install 0 or more POJOs as web service endpoints during test bootstrap.
I could, of course, deploy my test runner inside a war which statically deploys N endpoints via a web.xml config file. At present, I only use a single POJO service implementation but I don't always need the same value of N. In fact, for some runs (more precisely, on some of the AS instances employed in some of the runs -- the tests employ more than one AS) I don't even need to deploy a web service to complete the test.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200991#4200991
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200991
More information about the jboss-user