Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Commit

Permalink
BZ119170: JCA Resource Adapter creation error is 'Unknown Error'
Browse files Browse the repository at this point in the history
  • Loading branch information
rpelisse committed Apr 1, 2015
1 parent 2f5a0a0 commit 67c19b9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,6 @@ public interface UIMessages extends Messages {
String patch_manager_restart_verify(String host);

String bs_interface_warning(String url);

String failedToAddResourceAdapter(String name);
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ environment_description=A map of names and values of all system properties.
extensions_description=The list of installed extensions. Each extension reflects a subsystem.
failed=Failed: {0}
failedToAdd=Failed to add {0} to {1}.
failedToAddResourceAdapter=Failed to add resource adapter {0}.
failedToDisable=Failed to disable {0}.
failedToEnable=Failed to enable {0}.
failedToRemoveFrom=Failed to remove {0} from {1}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
import com.gwtplatform.mvp.client.proxy.PlaceManager;
import com.gwtplatform.mvp.shared.proxy.PlaceRequest;
import com.gwtplatform.mvp.client.proxy.Proxy;
import com.allen_sauer.gwt.log.client.Log;

import org.jboss.as.console.client.Console;
import org.jboss.as.console.client.core.NameTokens;
import org.jboss.as.console.client.core.message.Message;
import org.jboss.as.console.client.domain.model.SimpleCallback;
import org.jboss.as.console.client.shared.BeanFactory;
import org.jboss.as.console.client.shared.model.ModelAdapter;
Expand Down Expand Up @@ -364,12 +367,15 @@ public void onCreateAdapter(final ResourceAdapter ra) {
System.out.println(operation);

dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {

@Override
public void onFailure(Throwable caught) {
super.onFailure(caught);
loadAdapter(false);
}

@Override
public void onFailure(Throwable caught) {
Log.error("Unknown error", caught);
Console.getMessageCenter().notify(
new Message(Console.MESSAGES.failedToAddResourceAdapter(ra
.getName()), caught.getMessage(), Message.Severity.Error));
loadAdapter(false);
}

@Override
public void onSuccess(DMRResponse dmrResponse) {
Expand Down

0 comments on commit 67c19b9

Please sign in to comment.