• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using @WebServiceRef and configurable wsdlLocation

 
Frans van Niekerk
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am busy implementing an EJB bean with a web service reference as a field. The field is annotated with @WebServiceRef(wsdlLocation = "some url"). The problem is that I need to wsdlLocation to be user configurable. the urls differ for production and test environments. And the client require the same ear to deployed to both, with no changes to xml or code.

Obviously "some url" must be a constant. Is there any other way then programmatically creating the reference that will allow me to use a configurable url?

Thus far I have considered 3 possible solutions, none of which seems right.

1. Unless I have the reference as a static on the EJB it is going to be very expensive to recreate it every time a bean is created, right?
2. If it is static then will I not run into thread safety issues, which means I will have to synchronise the web service calls?
3. Or I could create a pool of references and manage those which could get messy?

Thanks in advance
 
Sudhindra Bhargav
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any update on this, even I am looking for a solution for this.
Appreciate any example or information posted.

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!