Advertisements

Tuesday, February 5, 2019

Camel - How to call local ejb using Spring DSL

In the camel context specify these two things


 
 
 
     
 


 
 
 
     
      

 


Then by invoking the EJB, you need to have identified the JNDI name which can be browsed in the Wildfly/JBoss console mostly under "JNDI tree view"


 



Here is the EJB  and impl used:

@Stateless
public class ExampleServiceImpl implements ExampleService, ExampleServiceLocal {

 public String greet(String name) {
  // TODO Auto-generated method stub
  return "Hello " + name + "!";
 }

 public Map<Object> getSystemProperties() {
  // TODO Auto-generated method stub
  return new HashMap<>(System.getProperties());
 }

}

 
@Local
public interface ExampleServiceLocal {
 
 public String greet(String name);
 
 public Map<Object> getSystemProperties();
 
}

No comments:

Post a Comment