axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Annesley" <james.annes...@infoshare-is.com>
Subject RE: [Rampart]
Date Thu, 15 Mar 2012 09:34:58 GMT
Hi,

 

What kind of information do you require? I cannot provide you with a working
sample due to the complexities of security and the time required.

Below I have given a code snippet, however. You will have to modify it to
your setup. Perhaps put it in a loop and run it for a while. Also when you
run it as a servlet try un-deploying and redeploying after you run it for a
while. Perhaps have two running concurrently? I hope you get on ok - please
let me know. 

 

1)      We have a WCF web service

2)      The axis is axis2 1.5.6

3)      The rampart is 1.5.2

4)      Tomcat 7.0.25    

5)      The stub was built with the following parameters

a.       wsdl2java -uri https://localhost:8888/MyService?wsdl -p
com.text.soap -s -d xmlbeans -o src\xmlbeans

6)      My code works as shown in the following snippet. 

a.       In reality I am using a pool of stubs. Each stub in the pool are
each shutdown when servlet is destroyed. I don't think that affects this
problem as I got it when using a new stub for every call - as shown in the
code snippet.

b.      I am also trying to reuse the http connections - but don't know if I
am succeeding however - and I am only using synchronous blocking calls.

 

Best regards

 

James

 

 


// create context

 

ConfigurationContext context =
ConfigurationContextFactory.createConfigurationContextFromURIs(null, null);

 

// create stub

MySoapStub stub = new MySoapStub(context,
"https://localhost:8888/MyService");

 

// create http connection manager

MultiThreadedHttpConnectionManager httpConMgr = new
MultiThreadedHttpConnectionManager();

final HttpConnectionManagerParams params = new
HttpConnectionManagerParams();

final HostConfiguration hostConfiguration = new HostConfiguration();

hostConfiguration.setHost("localhost", "8888", "https");

params.setMaxTotalConnections(100);

params.setMaxConnectionsPerHost(hostConfiguration, 25);

httpConMgr.setParams(params);

HttpClient httpClient = new HttpClient(httpConMgr);

 

Options options = client.getOptions();

options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Constants.VALUE_TRUE);

options.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient);

options.setCallTransportCleanup(true);

 

// other options

options.setTimeOutInMilliSeconds(5000);

 

// add rampart

client.engageModule("rampart");

options.setProperty(RampartMessageData.KEY_RAMPART_POLICY, null);

 

// add the user name and password

options.setUserName("username")

options.setPassword("password");

 

// make a call

final DoOperationDocument doc =

        DoOperationDocument.Factory.newInstance();

final DoOperationDocument. DoOperation cmd =

        doc.addNewDoOperation();

 

cmd.setInfo(info);

 

stub.doOperation (doc);

 

// close connection after call

httpConMgr.closeIdleConnections(5000);

 

// shutdown stub

 

try {

      

    stub._getServiceClient().cleanupTransport();

    stub._getServiceClient().cleanup();

    stub.cleanup();

    context.flush();

} catch (final AxisFault e) {

}

    

context.cleanupContexts();

httpConMgr.closeIdleConnections(0);

httpConMgr.deleteClosedConnections();

MultiThreadedHttpConnectionManager.shutdownAll();

 

 

 

From: Sagara Gunathunga [mailto:sagara.gunathunga@gmail.com] 
Sent: 20 February 2012 16:25
To: java-user@axis.apache.org
Subject: Re: [Rampart]

 

Can you provide me clear steps to reproduce this issue ? Sometimes back I
tried to reproduce this but I couldn't. 

Thanks !   

On Mon, Feb 20, 2012 at 3:58 PM, James Annesley
<james.annesley@infoshare-is.com> wrote:

Hi,

 

The title of this thread should be: Axis2 module temporary files.

 

Looking at this issue:

https://issues.apache.org/jira/browse/AXIS2-3919

 

I think it describes my problem - one of the comments says it happens with a
web service client. Another comment by Matthias Gaiser suggests trying to
explode the .mar files as a workaround. I have tried this but don't know
where to put them. Any suggested solution should also cater for multiple mar
archives where the contents of the meta-inf folder names are the same across
each.

 

Cheers,

 

From: James Annesley [mailto:james.annesley@infoshare-is.com] 
Sent: 15 February 2012 18:46
To: java-user@axis.apache.org
Subject: RE: [Rampart]

 

Hi,

 

To answer my own question:

 

This happened because I accidently deleted the Temp folder in Tomcat. 

 

Incidentally, the reason why I am messing with this folder is because Axis
leaves behind temporary folders. These build up over time and eventually
slow down the server. This should definitely not be occurring and it is a
bug. I now point the finger at Rampart as it seems to be depending upon this
folder.

 

James

 

From: James Annesley [mailto:james.annesley@infoshare-is.com] 
Sent: 15 February 2012 17:01
To: java-user@axis.apache.org
Subject: [Rampart]

 

Hi,

 

On undeploying my web app in Tomcat I got the following message:

5-Feb-2012 16:50:51 org.apache.catalina.startup.ExpandWar deleteDir

SEVERE: [C:\Program Files\Apache Software
Foundation\apache-tomcat-7.0.25\webapps\xxx\WEB-INF\lib] could not be
completely deleted. The presence of the remaining files may cause problems

15-Feb-2012 16:50:51 org.apache.catalina.startup.ExpandWar deleteDir

SEVERE: [C:\Program Files\Apache Software
Foundation\apache-tomcat-7.0.25\webapps\xxx\WEB-INF] could not be completely
deleted. The presence of the remaining files may cause problems

15-Feb-2012 16:50:51 org.apache.catalina.startup.ExpandWar deleteDir

SEVERE: [C:\Program Files\Apache Software
Foundation\apache-tomcat-7.0.25\webapps\xxx] could not be completely
deleted. The presence of the remaining files may cause problems

15-Feb-2012 16:50:51 org.apache.catalina.startup.ExpandWar delete

SEVERE: [C:\Program Files\Apache Software
Foundation\apache-tomcat-7.0.25\webapps\xxx] could not be completely
deleted. The presence of the remaining files may cause problems

15-Feb-2012 16:50:51 org.apache.catalina.startup.HostConfig deployDirectory

 

On investigation I noticed that the following files remained:

rampart-1.5.2.mar

rahas-1.5.2.mar

 

Why is rampart still loaded? Do I have to explicitly "Disengage" the rampart
module when I destroy the axis stubs?

I am using Axis2 1.5.6 and Rampart 1.5.2. 

 

I also noticed a whole bunch of these: 

 

SEVERE: The web application [/xxx] created a ThreadLocal with key of type
[org.apache.xmlbeans.impl.store.Locale$1] (value
[org.apache.xmlbeans.impl.store.Locale$1@162b084]) and a value of type
[java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@f243e0])
but failed to remove it when the web application was stopped. Threads are
going to be renewed over time to try and avoid a probable memory leak.

 

but I ignored them because of issue[1] says it is fixed in 1.5.6 and
Tomcat's messages can be ignored.

 

Can anyone shed light on this?

 

 

Best,

 

James

 

[1] https://issues.apache.org/jira/browse/AXIOM-354 

Infoshare Ltd
Millennium House
21 Eden Street
Kingston upon Thames
Surrey
KT1 1BL
United Kingdom 


Phone: 

+44 (0) 20 8541 0111 <tel:%2B44%20%280%29%2020%208541%200111> 


Support: 

+44 (0) 20 8481 4760 <tel:%2B44%20%280%29%2020%208481%204760> 


Web: 

http://www.infoshare-is.com/


E-mail: 

info@infoshare-is.com

Infoshare Ltd is registered in England and Wales.
Registered Office as above.
Registered Number 2877612
VAT Number GB 678 1443 10 

The content of this e-mail (and any attachment to it) is confidential. Any
views or opinions do not represent the views or opinions of Infoshare Ltd.
If you have received this e-mail in error please notify the sender and
delete it. You may not use, copy or disclose the information in any way. 

Infoshare Ltd monitors incoming and outgoing e-mails. 

Please consider the environment. Do you really need to print this email?

Infoshare Ltd
Millennium House
21 Eden Street
Kingston upon Thames
Surrey
KT1 1BL
United Kingdom 


Phone: 

+44 (0) 20 8541 0111 <tel:%2B44%20%280%29%2020%208541%200111> 


Support: 

+44 (0) 20 8481 4760 <tel:%2B44%20%280%29%2020%208481%204760> 


Web: 

http://www.infoshare-is.com/


E-mail: 

info@infoshare-is.com

Infoshare Ltd is registered in England and Wales.
Registered Office as above.
Registered Number 2877612
VAT Number GB 678 1443 10 

The content of this e-mail (and any attachment to it) is confidential. Any
views or opinions do not represent the views or opinions of Infoshare Ltd.
If you have received this e-mail in error please notify the sender and
delete it. You may not use, copy or disclose the information in any way. 

Infoshare Ltd monitors incoming and outgoing e-mails. 

Please consider the environment. Do you really need to print this email?

Infoshare Ltd
Millennium House
21 Eden Street
Kingston upon Thames
Surrey
KT1 1BL
United Kingdom 


Phone: 

+44 (0) 20 8541 0111 <tel:%2B44%20%280%29%2020%208541%200111> 


Support: 

+44 (0) 20 8481 4760 <tel:%2B44%20%280%29%2020%208481%204760> 


Web: 

http://www.infoshare-is.com/


E-mail: 

info@infoshare-is.com

Infoshare Ltd is registered in England and Wales.
Registered Office as above.
Registered Number 2877612
VAT Number GB 678 1443 10 

The content of this e-mail (and any attachment to it) is confidential. Any
views or opinions do not represent the views or opinions of Infoshare Ltd.
If you have received this e-mail in error please notify the sender and
delete it. You may not use, copy or disclose the information in any way. 

Infoshare Ltd monitors incoming and outgoing e-mails. 

Please consider the environment. Do you really need to print this email?




-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
<http://people.apache.org/%7Esagara/> 
LinkedIn - http://www.linkedin.com/in/ssagara


Infoshare Ltd
Millennium House
21 Eden Street
Kingston upon Thames
Surrey
KT1 1BL
United Kingdom

Phone: 		+ 44 (0) 20 8541 0111
Support:	+ 44 (0) 20 8481 4760
Web:		www.infoshare-is.com
E-mail:		info@infoshare-is.com

Infoshare Ltd is registered in England and Wales.
Registered Office as above.
Registered Number 2877612
VAT Number GB 678 1443 10

The content of this e-mail (and any attachment to it) is confidential. 
Any views or opinions do not represent the views or opinions 
of Infoshare Ltd.
If you have received this e-mail in error please notify the sender 
and delete it. You may not use, copy or disclose the information 
in any way. 

Infoshare Ltd monitors incoming and outgoing e-mails.

Please consider the environment. Do you really need to print 
this email?

Mime
View raw message