Skip to content
Snippets Groups Projects
Commit a940bfcd authored by Florian Fittkau's avatar Florian Fittkau
Browse files

minor

parent aa387226
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="lib/junit-4.12.jar"/>
<classpathentry kind="lib" path="lib/aspectjweaver-1.8.5.jar"/>
<classpathentry kind="lib" path="lib/jcommander-1.47.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/common-monitoring"/>
<classpathentry combineaccessrules="false" kind="src" path="/monitored-application"/>
<classpathentry kind="output" path="bin"/>
......
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_missing_override_annotations_interface_methods=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_functional_interfaces=false
sp_cleanup.convert_to_enhanced_for_loop=true
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.insert_inferred_type_arguments=false
sp_cleanup.make_local_variable_final=true
sp_cleanup.make_parameters_final=true
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_redundant_type_arguments=true
sp_cleanup.remove_trailing_whitespaces=false
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=false
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_anonymous_class_creation=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_lambda=true
sp_cleanup.use_parentheses_in_expressions=true
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
sp_cleanup.use_type_arguments=false
......@@ -7,6 +7,7 @@
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="lightrpc.LightRPCMainStarter"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-serverPort 9999 -secondsToRunServer 10 -callsToServerCount 100 -serverPortsToConnect 9999"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="LightRPCApplication"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:lib/aspectjweaver-1.8.5.jar -Xmx4G"/>
</launchConfiguration>
......@@ -30,6 +30,7 @@
</manifest>
<fileset dir="${build.dir}" />
<zipfileset excludes="META-INF/*" src="lib/explorviz-monitoring.jar"/>
<zipfileset excludes="META-INF/*" src="lib/jcommander-1.47.jar"/>
</jar>
<copy file="${jar.dir}/light-RPC-application.jar" tofile="release/light-RPC-application.jar"/>
</target>
......
......@@ -2,7 +2,9 @@
<aspectj>
<weaver options="-Xset:weaveJavaPackages=true,weaveJavaxPackages=true"> <!-- options="-verbose -showWeaveInfo -Xjoinpoints:synchronization" -->
<include within="*"/>
<include within="lightrpc.jaxws..*"/>
<include within="javax.xml.ws..*"/>
<include within="explorviz.live_trace_processing.probe..*"/>
</weaver>
<aspects>
......@@ -17,6 +19,6 @@
<!-- <aspect name="explorviz.live_trace_processing.probe.distributed.concrete.HSQLDBProbe"/> -->
<aspect name="explorviz.live_trace_processing.probe.distributed.concrete.JAXWSProbeAdder"/>
<!-- <aspect name="explorviz.live_trace_processing.probe.distributed.concrete.ServletProbe"/> -->
<!-- <aspect name="explorviz.live_trace_processing.probe.distributed.concrete.HttpURLConnectionProbe"/> -->
<!-- <aspect name="explorviz.live_trace_processing.probe.distributed.concrete.HttpURLConnectionProbe"/> -->
</aspects>
</aspectj>
No preview for this file type
No preview for this file type
"C:\Program Files\Java\jdk1.7.0_75\jre\bin\java" -javaagent:aspectjweaver-1.8.5.jar -Xmx4G -Dexplorviz.live_trace_processing.system_name="testsystem" -Dexplorviz.live_trace_processing.ip_address=10.20.0.1 -Dexplorviz.live_trace_processing.host_name="testhost2" -Dexplorviz.live_trace_processing.application_name="testapp" -jar light-RPC-application.jar
\ No newline at end of file
"C:\Program Files\Java\jdk1.7.0_75\jre\bin\java" -javaagent:aspectjweaver-1.8.5.jar -Xmx4G -Dexplorviz.live_trace_processing.system_name="testsystem" -Dexplorviz.live_trace_processing.ip_address=10.20.0.1 -Dexplorviz.live_trace_processing.host_name="testhost" -Dexplorviz.live_trace_processing.application_name="testapp" -jar light-RPC-application.jar -serverPort 9999 -secondsToRunServer 10 -callsToServerCount 100
\ No newline at end of file
"C:\Program Files\Java\jdk1.7.0_75\jre\bin\java" -javaagent:aspectjweaver-1.8.5.jar -Xmx4G -Dexplorviz.live_trace_processing.system_name="testsystem" -Dexplorviz.live_trace_processing.ip_address=10.20.0.2 -Dexplorviz.live_trace_processing.host_name="testhost2" -Dexplorviz.live_trace_processing.application_name="client" -jar light-RPC-application.jar -serverPort 10000 -secondsToRunServer 60 -callsToServerCount 1000 -serverPortsToConnect 9999
\ No newline at end of file
"C:\Program Files\Java\jdk1.7.0_75\jre\bin\java" -javaagent:aspectjweaver-1.8.5.jar -Xmx4G -Dexplorviz.live_trace_processing.system_name="testsystem" -Dexplorviz.live_trace_processing.ip_address=10.20.0.1 -Dexplorviz.live_trace_processing.host_name="testhost" -Dexplorviz.live_trace_processing.application_name="server" -jar light-RPC-application.jar -serverPort 9999 -secondsToRunServer 60
\ No newline at end of file
package lightrpc;
import java.util.ArrayList;
import java.util.List;
import com.beust.jcommander.Parameter;
public class ArgOptions {
@Parameter(names = { "-serverPort" }, description = "Server listening port")
public Integer serverPort;
@Parameter(names = { "-secondsToRunServer" }, description = "How long the server shall run")
public Integer secondsToRunServer;
@Parameter(names = { "-callsToServerCount" }, description = "How many server requests")
public Integer callsToServerCount;
@Parameter(names = { "-serverPortsToConnect" }, description = "Servers the client should connect")
public List<Integer> serverPortsToConnect = new ArrayList<Integer>();
}
package lightrpc;
import java.util.ArrayList;
import lightrpc.jaxws.JAXWSClient;
import lightrpc.jaxws.JAXWSServer;
import com.beust.jcommander.JCommander;
import explorviz.live_trace_processing.main.MonitoringController;
public class LightRPCMainStarter {
public static void main(String[] args) {
MonitoringController.isMonitoringEnabled();
System.out.println(args.length);
for (String arg : args) {
System.out.println(arg);
public static void main(final String[] args) {
final ArgOptions arguments = new ArgOptions();
new JCommander(arguments, args);
JAXWSServer.startServer(arguments.serverPort);
final ArrayList<Thread> serverAccessThreads = new ArrayList<Thread>();
for (final int serverPortToConnect : arguments.serverPortsToConnect) {
serverAccessThreads.add(new Thread(new ServerAccessRunnable(
serverPortToConnect, arguments.callsToServerCount)));
}
JAXWSServer.startServer(9999);
for (final Thread serverAccessThread : serverAccessThreads) {
serverAccessThread.start();
}
JAXWSClient.accessServer(9999);
try {
Thread.sleep(arguments.secondsToRunServer * 1000);
} catch (final InterruptedException e) {
} finally {
JAXWSServer.endServer();
}
JAXWSServer.endServer();
MonitoringController.shutdown();
try {
for (final Thread serverAccessThread : serverAccessThreads) {
serverAccessThread.join();
}
} catch (final InterruptedException e) {
} finally {
MonitoringController.shutdown();
}
}
}
class ServerAccessRunnable implements Runnable {
private final int serverPortToConnect;
private final int callsToConduct;
public ServerAccessRunnable(final int serverPortToConnect,
final int callsToConduct) {
this.serverPortToConnect = serverPortToConnect;
this.callsToConduct = callsToConduct;
}
@Override
public void run() {
final JAXWSClient jaxwsClient = new JAXWSClient(serverPortToConnect);
for (int i = 0; i < callsToConduct; i++) {
jaxwsClient.accessServer();
}
}
}
......@@ -7,18 +7,23 @@ import javax.xml.namespace.QName;
import javax.xml.ws.Service;
public class JAXWSClient {
public static void accessServer(int port) {
private LightServiceEndpoint rpcService;
public JAXWSClient(final int port) {
try {
final URL url = new URL("http://localhost:" + port + "/ws/lightrpc?wsdl");
final URL url = new URL("http://localhost:" + port
+ "/ws/lightrpc?wsdl");
final QName qname = new QName("http://jaxws.lightrpc/",
"LightServiceEndpointImplService");
final Service service = Service.create(url, qname);
final LightServiceEndpoint rpcService = service.getPort(LightServiceEndpoint.class);
System.out.println(rpcService.rpcCall());;
rpcService = service.getPort(LightServiceEndpoint.class);
} catch (final MalformedURLException e) {
}
}
public void accessServer() {
rpcService.rpcCall();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment