Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jakartaee-platform-dev] When to use appclient vs javatest protocols


If you are porting over a test that uses a vehicle, you need to know whether it uses the appclient or javatest protocol. The following method gives the mapping from the vehicle type to either the appclient or javatest protocol. Most vehicles use javatest. Any vehicle that uses an application client (and thus creates an application client jar in its deployment method), needs to use the appclient protocol. All others use the javatest protocol.

/**
* Map from the vehicle type to the arquillian protocol. This is based on which ts.vehicles create a
* client jar with the com.sun.ts.tests.common.vehicle.VehicleClient as the mainClass.
*
* @param vehicleType - vehicle
* @return either appclient or javatest
*/
private String getProtocolForVehicle(VehicleType vehicleType) {
String protocol = switch (vehicleType) {
// This is all the types in ts.vehicles.xml that use an appclient
case appclient, ejb, wsappclient, wsejb, appmanaged, appmanagedNoTx, stateless3, stateful3 -> "appclient";
default -> "javatest";
};
return protocol;
}


Back to the top