ejb

Calendar object won't update in database but does update within session

邮差的信 提交于 2020-01-17 06:11:06
问题 I'm representing Appointments in an entity bean which have a startTime and endTime of type Calendar . This is stored using JPA as TIMESTAMP . If I edit the Appointment object's start / end time it updates on the object itself during the session but it's not updated within the database itself. Other elements such as the Appointment's description successfully update in the database.. It's only he start and end time which are not. Entity class (this is indirectly updated in the database with

JAVA程序员面试宝典

一笑奈何 提交于 2020-01-17 01:15:20
程序员面试之葵花宝典 面向对象的特征有哪些方面 1. 抽象:抽象就是忽略一个主题中与当前目标2. 无关的那些方面,3. 以便更充分地注意与当前目标4. 有关的方面。抽象并不5. 打算了解全部问题,而6. 只是选择其中的一部分,7. 暂时不8. 用部分细节。抽象包括两个方面,9. 一是过程抽象,10. 二是数据抽象。 11. 继承:继承是一种联结类的层次模型,12. 并且允许和鼓励类的重用,13. 它提供了一种明确表述共性的方法。对象的一个新类可以从现有的类中派生,14. 这个过程称为类继承。新类继承了原始类的特性,15. 新类称为原始类的派生类(子类),而16. 原始类称为新类的基类(父类)。派生类可以从它的基类那里继承方法和实例变量,17. 并且类可以修改或增加新的方法使之更适合特殊的需要。 18. 封装:封装是把过程和数据包围起来,19. 对数据的访问只能通过已定义的界面。面向对象计算始于这个基本概念,20. 即现实世界可以被描绘成一系列完全自治、封装的对象,21. 这些对象通过一个受保护的接口访问其他对象。 22. 多态性:多态性是指23. 允许不同24. 类的对象对同25. 一消息作出响应。多态性包括参数化多态性和包含多态性。多态性语言具有灵活、抽象、行为共享、代码共享的优势,26. 很好的解决了应用程序函数同27. 名28. 问题。 2、String是最基本的数据类型吗?

Java程序员面试之葵花宝典

蹲街弑〆低调 提交于 2020-01-17 01:04:25
程序员面试之葵花宝典 1.面向对象的特征有哪些方面 抽象:抽象就是忽略一个主题中与当前目标 无关的那些方面, 以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而 只是选择其中的一部分, 暂时不 用部分细节。抽象包括两个方面, 一是过程抽象,二是数据抽象。 1) 继承:继承是一种联结类的层次模型,并且允许和鼓励类的重用,它提供了一种明确表述共性的方法。对象的一个新类可以从现有的类中派生,这个过程称为类继承。新类继承了原始类的特性, 新类称为原始类的派生类(子类),而原始类称为新类的基类(父类)。派生类可以从它的基类那里继承方法和实例变量, 并且类可以修改或增加新的方法使之更适合特殊的需要。 2) 封装:封装是把过程和数据包围起来,对数据的访问只能通过已定义的界面。面向对象计算始于这个基本概念,即现实世界可以被描绘成一系列完全自治、封装的对象,这些对象通过一个受保护的接口访问其他对象。 3) 多态性:多态性是指允许不同类的对象对同一消息作出响应。多态性包括参数化多态性和包含多态性。多态性语言具有灵活、抽象、行为共享、代码共享的优势,很好的解决了应用程序函数同名问题。 2、String是最基本的数据类型吗? 基本数据类型包括byte、int、char、long、float、double、boolean和short。 java.lang.String类是final类型的

程序员面试之葵花宝典

梦想的初衷 提交于 2020-01-17 01:02:38
面向对象的特征有哪些方面 1. 抽象:抽象就是忽略一个主题中与当前目标2. 无关的那些方面,3. 以便更充分地注意与当前目标4. 有关的方面。抽象并不5. 打算了解全部问题,而6. 只是选择其中的一部分,7. 暂时不8. 用部分细节。抽象包括两个方面,9. 一是过程抽象,10. 二是数据抽象。 11. 继承:继承是一种联结类的层次模型,12. 并且允许和鼓励类的重用,13. 它提供了一种明确表述共性的方法。对象的一个新类可以从现有的类中派生,14. 这个过程称为类继承。新类继承了原始类的特性,15. 新类称为原始类的派生类(子类),而16. 原始类称为新类的基类(父类)。派生类可以从它的基类那里继承方法和实例变量,17. 并且类可以修改或增加新的方法使之更适合特殊的需要。 18. 封装:封装是把过程和数据包围起来,19. 对数据的访问只能通过已定义的界面。面向对象计算始于这个基本概念,20. 即现实世界可以被描绘成一系列完全自治、封装的对象,21. 这些对象通过一个受保护的接口访问其他对象。 22. 多态性:多态性是指23. 允许不同24. 类的对象对同25. 一消息作出响应。多态性包括参数化多态性和包含多态性。多态性语言具有灵活、抽象、行为共享、代码共享的优势,26. 很好的解决了应用程序函数同27. 名28. 问题。 2、String是最基本的数据类型吗?

managed bean EJB injection

南笙酒味 提交于 2020-01-15 18:51:57
问题 i'm having many managed beans and was wondering if i could create a UtilClass where i put my services calls (@EJB). I've already tried it but i'm having a NullPointerException. this is how my UtilClass and my managed bean look like: public class UtilClass{ @EJB private static MyFirstEjbLocal myFirstService; @EJB private static MySecondEjbLocal mySecondService; //other services //getters } public class MyManagedBean{ public String myMethod(){ UtilClass.getMyFirstService.doSomethingInDB();

managed bean EJB injection

扶醉桌前 提交于 2020-01-15 18:47:55
问题 i'm having many managed beans and was wondering if i could create a UtilClass where i put my services calls (@EJB). I've already tried it but i'm having a NullPointerException. this is how my UtilClass and my managed bean look like: public class UtilClass{ @EJB private static MyFirstEjbLocal myFirstService; @EJB private static MySecondEjbLocal mySecondService; //other services //getters } public class MyManagedBean{ public String myMethod(){ UtilClass.getMyFirstService.doSomethingInDB();

EntityManager returns NullPointerException when persisting

喜夏-厌秋 提交于 2020-01-15 12:41:22
问题 When I persist a "Joueur" (cf my class below), I get a NullPointerException, but I don't know why em.persist(new Joueur("pseudo", "mdp", "mail")); This is my class "Joueur" : @Entity @NamedQueries({ @NamedQuery(name = "trouverParMail", query = "SELECT * FROM Joueur j WHERE j.mail = :mail")}) public class Joueur implements Serializable { private static final long serialVersionUID = 1L; private String pseudo; private String mdp; private String mail; private Integer nbParties; private Integer

IllegalArgumentException: Invalid ejb jar [HelloEJB]: it contains zero ejb.

早过忘川 提交于 2020-01-15 11:25:14
问题 While the previous sample client from the Creating and Running an Application Client on the GlassFish Server tutorial runs correctly, I'm going through the process again to clarify the procedures for better understanding. Specifically, to manually deploy the bean to Glassfish from the CLI rather than from the IDE. The session bean is @stateless and implements @remote . This version of Glassfish shipped with Netbeans. The bean is an "EJB module" with the library API HelloLibrary included as a

IllegalArgumentException: Invalid ejb jar [HelloEJB]: it contains zero ejb.

巧了我就是萌 提交于 2020-01-15 11:25:09
问题 While the previous sample client from the Creating and Running an Application Client on the GlassFish Server tutorial runs correctly, I'm going through the process again to clarify the procedures for better understanding. Specifically, to manually deploy the bean to Glassfish from the CLI rather than from the IDE. The session bean is @stateless and implements @remote . This version of Glassfish shipped with Netbeans. The bean is an "EJB module" with the library API HelloLibrary included as a

Should EJBs be instance variables and marked as transient in JSF Managed Beans?

你说的曾经没有我的故事 提交于 2020-01-15 05:22:20
问题 We have several JSF Managed beans with Request, View, and Session Scope and are running WebLogic 11g (10.3.2). Weblogic does not support the @EJB annotation in a JSF Managed Bean, so we have used these procedures http://technology.amis.nl/2008/12/06/ejb-dependency-injection-of-session-bean-facade-in-jsf-12-on-weblogic-103-jsf-with-jpa/ to create a ServletConextListener to load EJB references using the @EJB annotation. Effectively, from within the JSF Managed Bean, we are then able to look up