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