Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A Stateless bean which handles persistence of Stock Ticker info
package blog.abhirockzz.wordpress.com;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@Stateless
public class StockInfoPersistenceService {
@PersistenceContext
EntityManager em;
public void save(String name, String price){
em.persist(new StockTick(name, price));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment