java - JAX-WS Thread safe -


i found questions regarding this, without concrete answer. have code bellow:

1: qname qname = new qname(uri, service_name);

2: service service = service.create(wsdl_document_location, qname);

3: testport1 port = service.getport(testport1.class);

times:

  • line 2 16 msec

  • line 3 27 msec

now, in situation time important, question is, possible have qname , service initialized once, , defined static field , port every time need make ws call or not?

any other proposal?

i use standard java jax-ws annotations.

update:

maybe solution use object pooling apache commons pool library , save created ports future use?

qname holds strings internally , doesn't offer method change them after constructor has been called, can treat immutable class if not.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -