ejb

EntityManager is null

巧了我就是萌 提交于 2021-02-19 08:08:12
问题 I am new to EJB, creating an application for fun/learning EJB following is the code. @Entity @Table(name = "PERSON", schema = "experiment") @NamedQuery(name = "Person.fetchAllPerson" , query = "select p from Person p") public class Person implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private Long id; @Column(name = "name", length = 500) private String name; @Column(name = "age") private

Turn EJB into JSON web service

杀马特。学长 韩版系。学妹 提交于 2021-02-07 08:26:05
问题 I have turn EJB 3.1 into web-service. And now I need to create the JSON webservice for communication with JavaScript component. JavaScri[t component will use JSON version of the interface to communicate with the system and fetch the data needed. I can not use XML instead of JSON by the performance reason. I tried research myself but any solution was not found. Please, have you any ideas, solutions or links how I can use EJB and JSON together. Thanks! Best regards Artem 回答1: Yes, JAX-RS is

Turn EJB into JSON web service

余生长醉 提交于 2021-02-07 08:25:12
问题 I have turn EJB 3.1 into web-service. And now I need to create the JSON webservice for communication with JavaScript component. JavaScri[t component will use JSON version of the interface to communicate with the system and fetch the data needed. I can not use XML instead of JSON by the performance reason. I tried research myself but any solution was not found. Please, have you any ideas, solutions or links how I can use EJB and JSON together. Thanks! Best regards Artem 回答1: Yes, JAX-RS is

How do I create a non-persistent EJB 3.1 Timer?

强颜欢笑 提交于 2021-02-04 17:48:14
问题 Using NetBeans 7.1 / GlassFish 3.1, I created a new TimerSessionBean. @Stateless public class NewTimerSessionBean implements NewTimerSessionBeanLocal { @Schedule(minute = "*", second = "0", dayOfMonth = "*", month = "*", year = "*", hour = "9-17", dayOfWeek = "Mon-Fri") @Override public void myTimer() { System.out.println("Timer event: " + new Date()); } } How can I declare that the timer is non-persistent? http://www.theserverside.com/news/1363578/EJB-31-A-Significant-Step-Towards-Maturity

Question about xa and transaction on ejbs

白昼怎懂夜的黑 提交于 2021-01-29 10:29:54
问题 I have two question/doubt: If two ejbs are deployed in different ear or different applicationserver, and one call the other, they still required XA indipendent that each one use one or more db as ? if two ejbs are deployed in different server, both are annotated with trans type = required,and when teh first ejb call the second, a new transaction start or use the propagation of first ejb? **My ejbs are deployed on Webpshere, Jboss, WebLogic and can be written with JEE 5/6/7 technology(EJB 2/3)

Are activation specs required for message-driven beans?

流过昼夜 提交于 2021-01-27 18:56:24
问题 I have a non-JMS MDB that I'm installing into a Websphere Liberty server. package mdb.test; import javax.ejb.MessageDriven; @MessageDriven() public class TheMDB implements MyOwnListener { public TheMDB() {} @Override public void onMyOwnMessage(MyOwnMessage message) {} } Without further configuration, the server gives the following message: [WARNING ] CNTR4015W : The message endpoint for the TheMDB message-driven bean cannot be activated because the mdb.test/TheMDB activation specification is

EJB Container initialization error, Error while binding JNDI name *** for EJB ***

廉价感情. 提交于 2020-12-30 03:28:44
问题 I am new to Java and I developed a sample Java EE application that works with normal Java client, but it does not work with Servlets. I developed EE project in Netbeans IDE with an Application Client, EJB module and Web module. Customer.java @Entity @Table(name = "customer") public class Customer implements Serializable { private static final long serialVersionUID = 1L; @Id @Column (name="id") private String id; @Column (name="name") private String name; public void setName(String name) {