Created
July 20, 2015 10:13
-
-
Save abhirockzz/7695475758e712bb7240 to your computer and use it in GitHub Desktop.
A Stateless bean which handles persistence of Stock Ticker info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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