i am trying to execute a command.
source code is
Object returnValue;
try {
GetProcessDefinitionsCommand cmd = new GetProcessDefinitionsCommand();
InitialContext initialContext = new InitialContext();
Object obj = initialContext
.lookup("ejb/CommandServiceBean");
System.out.println("Class:" + obj.getClass().getName());
LocalCommandServiceHome localCommandServiceHome = (LocalCommandServiceHome) initialContext
.lookup("ejb/CommandServiceBean");
LocalCommandService localCommandService = localCommandServiceHome.create();
returnValue = localCommandService.execute(cmd);
localCommandService.remove();
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("couldn't execute command", e);
}
Follow this link suggested by Jaikiran:
https://www.jboss.org/community/docs/DOC-9280
Just follow the indication.
I hope this Help you too.
good luck!!!