An excellent tutorial on the topic, to help getting familiar with EJB 3.0 development on Workshop
http://blogs.oracle.com/jamesbayer/ejb3/
James Bayer is an outstanding teacher, he tracks everything in his tutorial.
Sure enough, no wonder why so many companies choose .NET, the Java world has been unable after so many years to provide a straightforward and easy way to develop and deploy distributed objects.
Forte and Visibroker 15 years ago were much simpler.
Thursday, January 21, 2010
Microfrost
I hate Microfrost, it makes computers freeze. hahaha that's a good one.
Long live Linux, Long live Java, boooh to the Microsoft Tyrant.
Long live Linux, Long live Java, boooh to the Microsoft Tyrant.
Saturday, January 16, 2010
Template for a EJB
package com.pierre.ejb;
import javax.ejb.SessionBean;
import weblogic.ejb.GenericSessionBean;
import weblogic.ejbgen.RemoteMethod;
import weblogic.ejbgen.Session;
import weblogic.ejbgen.JndiName;
import weblogic.ejbgen.FileGeneration;
import weblogic.ejbgen.Constants;
@Session(ejbName = "MyEJB")
@JndiName(remote = "ejb.MyEJBRemoteHome")
@FileGeneration(remoteClass = Constants.Bool.TRUE, remoteHome = Constants.Bool.TRUE, localClass = Constants.Bool.FALSE, localHome = Constants.Bool.FALSE)
public class MyEJB extends GenericSessionBean implements SessionBean {
private static final long serialVersionUID = 1L;
/* (non-Javadoc)
* @see weblogic.ejb.GenericSessionBean#ejbCreate()
*/
public void ejbCreate() {
System.out.println("ejbCreate was invoked for MyEJB");
}
@RemoteMethod(transactionAttribute=Constants.TransactionAttribute.SUPPORTS)
public String sayHello(String name) {
return name + " , hello";
}
}
import javax.ejb.SessionBean;
import weblogic.ejb.GenericSessionBean;
import weblogic.ejbgen.RemoteMethod;
import weblogic.ejbgen.Session;
import weblogic.ejbgen.JndiName;
import weblogic.ejbgen.FileGeneration;
import weblogic.ejbgen.Constants;
@Session(ejbName = "MyEJB")
@JndiName(remote = "ejb.MyEJBRemoteHome")
@FileGeneration(remoteClass = Constants.Bool.TRUE, remoteHome = Constants.Bool.TRUE, localClass = Constants.Bool.FALSE, localHome = Constants.Bool.FALSE)
public class MyEJB extends GenericSessionBean implements SessionBean {
private static final long serialVersionUID = 1L;
/* (non-Javadoc)
* @see weblogic.ejb.GenericSessionBean#ejbCreate()
*/
public void ejbCreate() {
System.out.println("ejbCreate was invoked for MyEJB");
}
@RemoteMethod(transactionAttribute=Constants.TransactionAttribute.SUPPORTS)
public String sayHello(String name) {
return name + " , hello";
}
}
Subscribe to:
Posts (Atom)