Skip to main content

Posts

Showing posts from January, 2012

JMS with jboss 4

<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBoss//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd"> <jboss> <enterprise-beans> <session> <ejb-name>ejbs/sessionBeans/MyTestSession</ejb-name> <jndi-name>ejb/MyTestSession</jndi-name> </session> <message-driven> <ejb-name>ejbs/mdbs/QueueMdb</ejb-name> <destination-jndi-name>queue/B</destination-jndi-name>             <resource-ref>                 <res-ref-name>QCF</res-ref-name>                 <jndi-name>ConnectionFactory</jndi-name>             </resource-ref>         </message-driven> <message-driven> <ejb-name>ejbs/mdbs/AnotherQueueMDB</ejb-name> <de...

EJB with jboss 4

Running EJB (EJB 2) with jboss (jboss 4) requires some setup. I am trying to explain the steps one needs to for EJB to work with jboss . File 1 :- MyTestSession.java package ejbs.sessionBeans; import java.rmi.RemoteException; import javax.ejb.EJBObject; public interface MyTestSession extends EJBObject{ public String sayHello() throws RemoteException; } File 2 :- MyTestSessionHome.java package ejbs.sessionBeans; import java.rmi.RemoteException; import java.sql.SQLException; import javax.ejb.EJBException; import javax.naming.NamingException; public interface MyTestSessionHome extends javax.ejb.EJBHome{ public MyTestSession create() throws javax.ejb.CreateException,EJBException, RemoteException, NamingException; } File 3 :- MyTestSessionBean.java package ejbs.sessionBeans; import java.rmi.RemoteException; import javax.ejb.EJBException; import javax.ejb.EJBHome; import javax.ejb.EJBObject; import javax.ejb.Handle; import javax.ejb.RemoveException; import ...