Skip to content

Commit

Permalink
Change appclient vehicle code to just log error when @ejb of vehicle …
Browse files Browse the repository at this point in the history
…bean gets null bean

Signed-off-by: Scott Marlow <[email protected]>
  • Loading branch information
scottmarlow committed Nov 26, 2024
1 parent e73b28b commit fd48f22
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public class AppManagedVehicleRunner implements VehicleRunnable {
static AppManagedVehicleIF bean;
static {
if (bean == null) {
throw new IllegalStateException("AppManagedVehicleRunner could not inject the @EJB AppManagedVehicleBean");
TestUtil.logErr("AppManagedVehicleRunner could not access the @EJB AppManagedVehicleBean",
new IllegalAccessException("AppManagedVehicleRunner could not access the @EJB AppManagedVehicleBean"));
}
}
public Status run(String[] args, Properties props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class AppManagedNoTxVehicleRunner implements VehicleRunnable {
static AppManagedNoTxVehicleIF bean;
static {
if (bean == null) {
throw new IllegalStateException("AppManagedNoTxVehicleRunner could not inject the @EJB AppManagedNoTxVehicleBean");
TestUtil.logErr("AppManagedNoTxVehicleRunner could not access the @EJB AppManagedNoTxVehicleBean",
new IllegalStateException("AppManagedNoTxVehicleRunner could not access the @EJB AppManagedNoTxVehicleBean"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class Stateful3VehicleRunner implements VehicleRunnable {
static Stateful3VehicleIF bean = null;
static {
if (bean == null) {
throw new IllegalStateException("Stateful3VehicleRunner could not inject the @EJB Stateful3VehicleBean");
TestUtil.logErr("Stateful3VehicleRunner could not access the @EJB Stateful3VehicleBean",
new IllegalStateException("Stateful3VehicleRunner could not access the @EJB Stateful3VehicleBean"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class Stateless3VehicleRunner implements VehicleRunnable {
static Stateless3VehicleIF bean = null;
static {
if (bean == null) {
throw new IllegalStateException("Stateless3VehicleRunner could not inject the @EJB StatelessVehicleBean");
TestUtil.logErr("Stateless3VehicleRunner could not access the @EJB StatelessVehicleBean",
new IllegalStateException("Stateless3VehicleRunner could not access the @EJB StatelessVehicleBean"));
}
}

Expand Down

0 comments on commit fd48f22

Please sign in to comment.