property java.protocol.handler.pkgs - java

I have a soap client that calls a web service through ssl, when I add this line:
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
the client works with a rate of 15 calls per second, when removing it the speed goes down to 1.5 per second (10 times slower), I am using java 4 and tomcat 6 on a windows machine for my development environment
I'd be happy with this but when deploying the same code to oracle application server 10g on a unix machine the speed is always 1.5 per second weather I am setting the property or not!
Can any one figure out what is going on here?!

In Oracle App Server, try using oracle.mds.net.protocol instead of com.sun.net.ssl.internal.www.protocol. This is the value used by default in WebLogic, I have never used OAS so I can't advise.

Related

How do I go about Deploying a channel with a connector type of HTTP Sender as a destiantion in Mirth?

I have created a channel with a destiantion of HTTP Sender type in Mirth connect but I cant get the channel to deploy. If fails with a message:
ERROR (com.mirth.connect.server.channel.ErrorTaskHandler:25): java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: javax/activation/DataSource
I have installed Mirth 3.6.1 running on Java 10 in a Mac OS.
There is a solution that might help me and has been suggested but I am so new to Mirth that I do not understand how to implement it.
Suggested Solution
From page 22 of the 3.6 user guide:
Using Java 9 or greater
Currently as per the System Requirements, Mirth Connect version 3.6 supports Java 8 at minimum, and also supports Java 9 and 10. In order to use Java 9 or greater, you'll first need to perform an extra manual step.
In the Installation Directory, there should be a docs folder. Inside, there is a file called mcservice-java9+.vmoptions. This contains some extra JVM options that allow Mirth Connect to run with Java 9 or greater without errors or warnings.
Copy the contents into either the mcserver.vmoptions or mcservice.vmoptions file, depending on whether your
deployment uses mcserver or mcservice. Then restart Mirth Connect. If you're using Java 9 or greater for the
client-side Administrator GUI, make sure also to clear your Java cache and re-launch from the launch page:
Launching the Mirth Connect Administrator

Ubuntu tomcat 8 server CPU 100% prolem

I am working with a ubuntu web server, where I have tomcat 8 and running a web application on tomcat. Recently I have faced some problem with cpu uses 100%. When I restart the tomcat server it is running good, but after one day or a few hour again same problem arise ( 100% cpu use) and that problem make my site slow. When I see the process list with htop command then i see so many process like
/opt/java8/jre/bin/java -Djava.util.logging.config.file=/opt/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoader
The website is a live eCommerce website and average user in every moment is around 100.
The server is a aws ec2 server where a tomcat and a java application inside the tomcat is running. The database (MySql) is in an another aws RDS server.
What can i do in this situation? Please help.

503 Service Unavailable error Apache Tomcat

I try to deploy my Java project Apache Tomcat server but sometimes it gets down and returns me this page
Tomcat is installed on the Digitalocean's Ubuntu 14.04 and droplet's properties are 512Mb/1CPU, 20GB SSD Disk, 1000 GB transfer. I took the lowest option for test purposes. The site is visited by nobody except me and from the graphs I observe that the server is not overloaded at all. Most of the time everything works fine until suddenly the server returns 503. After I restart it keeps working fine again till the next 503 error in several days. I'd like to know what could cause this error: my mistake on configuring the server or maybe problems on server side?
That mean tomcat is not running. You can use the alias command to up the tomcat service or just go in the current directory and start the service.
Example: # tomcatup
/opt/tomcat8/bin/startup.sh

communicate with another applications on the same machine

Hi Stack Exchange Experts,
I am working on a task, that requires me to communicate with another applications on the same machine.
the machine is a Windows 7 laptop.
There are in total 3 applications on the laptop. Their specifications are given below:
First application is coded in java and runs on a local Tomcat at port 6060
Second application is coded in java and runs on Tomcat at port 8080
Third application is coded in java and does not have Tomcat. It is a static web application.
Since application 1 and 2 are running on Tomcat, I have used HTTP to commicate with each other. However, since they are on the same machine, is there any ohter way for them to commincate with each other?
Application 2 needs to communicate with application 3. What is the best way for this communication.
Please let me know if you require any further information to answer my queries.
Thanks.

"delay" in delivering WebService reply when using sun HttpServer

I'm writing a standalone application that implements a Web Service, for which the Endpoint is published using the embedded Sun HttpServer. I have an odd issue with this, where in a specific deployment situation, there is an apparent delay between the server processing /sending the reply and the client receiving the reply.
Let me give a few scenarios:
Case 1) Working: server is running inside Eclipse, which uses OpenJDK 1.6.0_23 as runtime. Client is implemented with axis (not axis2!) and is running on Solaris x86 inside JBoss (must admit I don't know the exact Java version used, but I suspect a Java 5 version).
Case 2) Working: server is running on Solaris x86 with java 1.6.0_26, client is running inside Eclipse with OpenJDK 1.6.0_23.
Case 3) Not working: server is running on Solaris x86 with java 1.6.0_26, client is on Solaris x86 with axis on Solaris x86 (again, suspect it's Java 5, not 6).
I'm wondering if I could be suffering from the following Java bug, which is fixed in 1.6.0_30 (assuming that OpenJDK 1.6.0_xx does not suffer the same bug)?
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7068416
But if that's the case, then why would case 2 work? Can the client somehow control the TCP_NODELAY on the server side?
On the exact delays that i have observed: I have 2 web services, published on different contexts. Eg 2 different WSDLs. The client has (obviously) separate (axis 1) bindings for each service. For one service, I see a consistent delay of exactly 150 seconds, for the other service the delay is consistently 300 seconds. Do these values ring a bell to anybody?
Maarten
Edit
I am now leaning towards the cause and solution in Eclipse Generated Web Service Client Extremely Slow. Can't test at the moment as I'm sitting in a hotel room without access to the system.
OK, managed to solve this, by telling Axis to use the CommonsHttpSender instead of the default HttpSender. Since the relevant application already had the prerequisite jars for that inside its WEB-INF/lib directory, that wasn't such a big deal.
To make Axis (1.4) use the CommonsHttpSender, create a "client-config.wsdd" file in the following location (note: this was the non-obvious part that caused me quite a few headaches):
MY.ear/MY.war/WEB-INF/classes/org/apache/axis/client/client-config.wsdd
with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<deployment
name="commonsHTTPConfig"
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!-- use CommonsHTTPSender instead of the default HTTPSender -->
<transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender" />
<transport name="local" pivot = "java:org.apache.axis.transport.local.LocalSender" />
<transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender" />
</deployment>
Restart your application. After this change, Axis will use HTTP/1.1 to make web service calls, which seems to be all that was needed to correct this annoying delay. Seems that there is something in the HTTP protocol specs (or perhaps Axis' implementation) that doesn't like a HTTP/1.1 response to a HTTP/1.0 request.
Maarten

Categories