ejb 1 « ejb « Java Enterprise Q&A





1. Most important problem solved by EJB 3?    stackoverflow.com

The scenario

  • You have developed a webapp using EJBs version 3.
  • The system is deployed, delivered and is used by the customer.
If you would have to rewrite the system from scratch, would you ...

2. Are EJB still alive?    stackoverflow.com

Do you still use session or entity EJB in your project ? Why ?

3. Top reason not to use EJB 3.0 again?    stackoverflow.com

The scenario

  • You have developed a webapp using EJBs version 3.
  • The system is deployed, delivered and is used by the customer.
If you would have to rewrite the system from scratch, would you ...

4. java ee | ejb3 | runtime dispatch    stackoverflow.com

I would like to call an ejb3 at runtime. The name of the ejb and the method name will only be available at runtime, so I cannot include any remote interfaces ...

5. Best way to configure a Java enterprise application    stackoverflow.com

I have a set of EJBs and other Java classes which need to be configured differently based on the system environment in which they are deployed: production, test, or lab. The ...

6. How to use WS-Security with EJB3?    stackoverflow.com

For one of our projects, I should be able to call a webservice that uses WS-Security, i.e. the SOAP request should be signed with an X.509 certificate. I've been doing some ...

7. What can I do with EJB?    stackoverflow.com

I'd like to test my knowledge in EJB, making an small application. Could you give me some ideas for doing with EJB?

8. EJB and Synchronization    stackoverflow.com

Are Session Beans (stateless session beans, stateful session beans) Synchronized?

9. How to get the EJB listening port?    stackoverflow.com

I'm currently developing a library for monitoring calls to several remote services (WebServices, EJBs...). One of the parameters that i would like to register is the port from which a EJB ...





10. How can you get the calling ip address on an ejb call?    stackoverflow.com

If a java client calls a remote EJB on a different server, how can you get the client IP address? Note that it is important to get it from the server, ...

11. .NET - vs EJB    stackoverflow.com

What is the comparable technology of EJB (Enterprise Java Beans) in .net?

12. How to start a background Process in j2ee    stackoverflow.com

I want to start a background process in a j2ee (OC4J 10) envronment. It seems wron to just start a Thread with "new Thread" But I can't find a good way ...

13. EJB calling another EJB method    stackoverflow.com

I am more curious about whether this is a best practice or should be avoided. Say I have two EJBS that each work with a different type of object, a widget ...

14. java ejb3 @PostConstruct    stackoverflow.com

I am experimenting with EJB3 on JBoss, developing a stateless bean. Basically once the module has been deployed I need to perform some actions related to load application settings. To do this ...

15. Java PropertySheets    stackoverflow.com

I have a java program that will work with a variety of Java Beans. I'm interested in displaying a "property sheet" that will show the fields and methods for the ...

16. Where to fit in Jasper Reports - front end or business?    stackoverflow.com

I am trying to use Jasper Reports (v3.5.2) to generate and print reports in PDF/HTML to the browser for a webapp. This webapp already uses JSF(Woodstock) for the front end and ...





17. Calling an Enterprise bean method    stackoverflow.com

Here's my Bean class source @Stateless(mappedName="StringVal") public class NewSessionBean implements NewSessionRemote {

String val = null;

public String stringChange(int parameter) {
     while(parameter < 5){
        ...

18. Difference between Javabean and EJB    stackoverflow.com

Just a simple question from a relative Java newbie: what is the difference between a JavaBean and an EJB?

19. Which development environment to use for developing JEE and EJB 3?    stackoverflow.com

I have to work with a project in which it is mandatory to use JEE and EJB 3. Can anyone suggest the best development environment for development of these technologies? And any ...

20. How to unittest ejb 2 classes    stackoverflow.com

What kind of tools and techniques exist for this purpose?

21. Isn't external ORM as overcomplicated as EJB?    stackoverflow.com

How external ORMs simplify anything when you have to cope with complex XML configuration like the Java EJBs ? Complexity just hide somewhere else. Moreover It introduces dependencies on External 3rd ...

22. Integration of an EJB into a Framework?    stackoverflow.com

Is there a way that you integrate an EJB into a Framework? I mean... this will be the framework's own EJB. This is a way of getting it started.

WeeklyTimerBean Tbean = ...

23. Is there an Open-Source Project that uses EJB?    stackoverflow.com

I started reading recently about J2EE technologies and mainly EJB. Although I located quite a lot of Open Source Application Servers, I haven't seen any actual application that uses some version ...

24. How to call an EJB from another EJB?    stackoverflow.com

I use jboss-IDE. so, I created a project with many EJB's in the same project. now, I need a functionality exposed by EJB A in EJB B. so, I need to ...

25. Generic logging of all calls to an EJB (2.1)?    stackoverflow.com

I'm working on modifying an existing application implemented as a 2.1 stateless EJB. I'd like to put in some kind of generic, detailed, logging of all calls made to the EJB. Stuff ...

26. Why throwing an EJBException is a "recommended" practice?    stackoverflow.com

I keep getting this "suggestion" from many fellow developers over and over again. In my experience I've found that EJBExceptions are well-suited for "end of the world" from the bean instance ...

27. Better EJB3 IOC    stackoverflow.com

does anyone knows how to "plug in" or enable IOC for injecting @EJB in classes which are not EJBs or Servlets (but rather POJOs)? So, if EJB and Servlet use helper ...

28. Help me out in learning EJB    stackoverflow.com

I am gonna start learning EJB. I just need your suggestion on picking the version for learning EJB 2.0 or EJB 3.0. Is it good idea to start with EJB 2.0 ...

29. what is counterpart for ejb in dot net?    stackoverflow.com

hey i have to migrate a project written in java 1.4 with ejb 2.0 to dot net 3.5 in c#.What i counter part for ejb model in dot net framework?

30. Can an EJB be called from a desktop application?    stackoverflow.com

I am new in Java EJB 3.0. It is possible to call a (session) bean—deployed on JBoss—from a desktop application client? Thanks in advance.

31. EJB3 is null and triggers a NullPointerExeption when using it in a j2se environment    stackoverflow.com

I've got a NullPointerException using EJB3 in a J2SE environment (without EJB3 container) Briefly, I've got a stateless bean implementing an interface. When I call it in another class like in a main, ...

32. What component marketplaces are available online?    stackoverflow.com

I am looking to install a COTS for a business im looking to start up. I was wondering if anyone had any experience with any available marketplace website. I have only ...

33. why we use .ejb file    stackoverflow.com

Hi I was asked to read the code of an existing project. There they have implemented stateless session bean with the file extension .ejb. We can have java file which extends sessionbean but wats ...

34. EJB. What is, why it exist and HOW it works?    stackoverflow.com

Guys, I HAVE tried reading tons of stuff about EJB. And I don't get it. It seems that most of the authors have a superficial knowledge on it. They basically say ...

35. how to run simple ejb program?    stackoverflow.com

I use myeclipse and jboss5.0.1 server.mysql is the database that i use. I want to run simple ejb program on myeclipse.

36. Difference between Java Bean and Enterprise Java Beans?    stackoverflow.com

Are they different or they are used interchangeably? If they are Different, then what made them different from each other?

37. Why should i use EJB?    stackoverflow.com

As we all know that EJB's in 3.1 or 3.0 are simple POJOs. You just need to give annotations here and there and it gets converted to EJB from simple class. ...

38. Short survey on Enterprise JavaBeans usage    stackoverflow.com

I would be very appreciative if anyone who has any experience with using Enterprise JavaBeans, or who considered, but rejected the use of EJBs would respond to a short survey. The ...

39. how EJB Life cycle methods are invoked    stackoverflow.com

Can some one explain on how typical sessin bean's life cycle is and who hadle those?

40. Communication between EJB and Flash possible?    stackoverflow.com

Is it possible to call my ejbs from Flash actionscript? If yes, can anybody give me any link or example to accomplish the same? Also if my ejbs are returning List how ...

41. java.lang.VerifyError during ejb method call    stackoverflow.com

When I try to call a method from a local ejb I have this error :

java.lang.VerifyError: com/pwc/lu/ejb/hcfollowup/staff/HCFStaffManagerLocal.getPersonById(Ljava/lang/Integer;)Lcom/pwc/lu/mapping/hcfollowup/hibernate/global/Person;
HCFStaffManagerLocal is my local interface and getPersonById an ejb method. Person, the result type. I ...

42. Classes from .war cannot find EJB beans    stackoverflow.com

I have .ear file, in it there is .war and ejb .jar. When I deploy the .ear to the server (glassfish v3), I'm getting

javax.naming.NameNotFoundException: com.deportio.ejb.TransportsFinder#com.deportio.ejb.TransportsFinder not found
This class is in ...

43. Best practices to develop a Shopping cart from scratch    stackoverflow.com

I'm looking to develop a good shopping cart to my new store site. I have few ideas in my mind to start developing it...

  1. It will be a stateful session bean (ejb3).
  2. Object ...

44. The simplest way to convert EJB 2.0 project to EJB 3.0    stackoverflow.com

What is the simplest way to convert EJB 2.0 (WebLogic 8.1) project to EJB 3.0 (OAS or WebLogic etc)?
I found just this article "Converting an EJB 2.0 Entity Bean ...

45. Does an EJB project typically contain only one Enterprise JavaBean or a collection of them?    stackoverflow.com

I'm working with IBM Rational Application Developer for WebSphere; it is based on Eclipse, though I'm not sure of its differences from Eclipse's Java EE features. I want to have ...

46. Hanging forever when executing a shell command (Java)    stackoverflow.com

The offending block of code is below. The code almost always works, but sometimes it hangs forever. The application is an EJB timer bean. Actually, it has only hung once and I ...

47. Learn EJB 3.0 really fast    stackoverflow.com

I am in an urgent need to put myself up to speed with EJB 3.0, like in a couple of days or so. Please don't ask... I have some years behind me ...

48. What is the default classpath for EJBs?    stackoverflow.com

Please forgive my pitiful knowledge of Java EJBs but, when an EJB is deployed to an application server as a .jar file, where do things like Hibernate and log4j first look ...

49. Classloader problem with EJB    stackoverflow.com

I'm working on a project which includes persistence library (JPA 1.2), EJB 3 and Web presentation layer (JSF). I develop application using Eclipse and application is published on Websphere Application Server ...

50. Ejb refrences another ejb    stackoverflow.com

i have two ejbs , ejb A references ejb B, both are deployed to the same server , i am using netbeans and jbosss 4.2.3 as well as ejb3.0 each time ...

51. javax.ejb.ScheduleExpression missing documentation    stackoverflow.com

From the rather sparse javadocs:

See EJB specification for the full timer expression syntax.
There's no link, and no further clue where to find this "full syntax". Does anybody know what ...

52. EJB3 Caching Instance Variables    stackoverflow.com

I've noticed some strange code on a project I am working on - its a SLSB EJB3, and it uses a private instance variable to maintain a cache of data (it ...

53. java.lang.IllegalArgumentException: Sniffers with type [ejb] and type [appclient] should not claim the archive at the same time    stackoverflow.com

Environment: GlassFish 3.0.1, NetBeans 6.9, JDK 6u21 Also tested with GlassFish 3.0.1, NetBeans 6.9.1, JDK 6u22, but results are the same. Problem: Unable to run app-client in an enterprise application (app-client, ejb, war). The ...

54. EJB 3.1 - Using @EJB inside an EJB - is it possible?    stackoverflow.com

Is it possible to use @EJB inside another EJB? I'm trying to do this now, and my EJB is ending up null. I'll outline my problem in an example.

@Stateless
@LocalBean
@Local(LoginServiceLocal.class)
public class LoginService ...

55. Inherent dangers of using ThreadLocal variables with EJB3?    stackoverflow.com

I'm experimenting with a solution to authorization and authentication by storing a subject class in a ThreadLocal map. The design is for an API, so I won't have access to the ...

56. how to connect different ejb(enterprise java bean ) components?    stackoverflow.com

how to connect different ejb(enterprise java bean ) components?

57. a large scale java project solution    stackoverflow.com

I would like to start up a project from scratch. I am a java developer for years. I did even write my own mvc framework some time ago for fun. Now ...

58. Why EJB is used in enterprise applications    stackoverflow.com

I am having hard time in understanding why and when to use EJB. I think it is enough to run the web application on a Web server like tomcat, with struts ...

59. How to assign users to certain roles EJB    stackoverflow.com

I need clarification here, please. I'm currently learning EJB, and i've read about limitting the access right of methods to the users in certain "roles." I know how the metadata to ...

60. Ideas for EJB-based project    stackoverflow.com

I'm starting learning EJBs and would like to explore it by creating a toy project, where I could understand concepts and get hand in base tools like stateless beans, integration with ...

61. How to reuse EJB in Java EE 5+    stackoverflow.com

I have a few common entity beans that I want to use in EJB module1, and EJB module2. EJB module1 may or may not be in the same EAR as ...

62. Reading from DatagramSocket in J2EE (EJB 3.0) environment    stackoverflow.com

In my application based on JBoss (version 5) I need to listen for UDP packets. The easiest way (and probably the only one ) is to open DatagramSocket on certain ...

63. EJB 2.0 - straighting it out for me    stackoverflow.com

I am working with EJB 2.0. I have some gaps. mind helpoing me fill them? A. when I creat an EJB project and write my code, I need to perform rmic. Then these ...

64. Use concurrent collection in EJB program    stackoverflow.com

Can I use concurrent collection (java.util.concurrent) in EJB program? Because there are many constrains in managed-environment. Perhaps EJB container manages all threads control, thus java.util.concurrent will violate the EJB environment. Do I ...

65. In what situations are EJBs used ? Are they required in websites/ web-application development?    stackoverflow.com

Are EJBS used in database backed websites(that are accessible to all)?

66. EJB 2.x to 3.x automatic migration tool    stackoverflow.com

Could someone recommend me an automatic migration tool for EJB? Preferably some Eclipse plugin... Thanx!

67. The core of Java EE    stackoverflow.com

i heard that the core product of Java EE is EJB 3.x ? Is that true ?

68. What is component oriented programming in Java?    stackoverflow.com

I need to learn about component oriented programming in Java, i believe that this is related to EJB's but i am not sure about that... Is this true ? Please could you ...

69. what is the core technology used in ejb's?    stackoverflow.com

what is the core technology used in ejb's ?

70. Is it possible to have @EJB as generic type?    stackoverflow.com

import javax.ejb.EJB;

public abstract class AbstractController<TEJB extends EntityEJB<TENTITY>, TENTITY extends EntityInterface> {
    @EJB
    protected TEJB ejb;
    ...

import javax.enterprise.context.SessionScoped;
import javax.faces.bean.ManagedBean;

@ManagedBean
@SessionScoped
public class UserController extends AbstractController<UserEJB, ...

71. Is EJB a ADO.NET equivalent in Java?    stackoverflow.com

I happened to be in a Java project though I am .net developer. Also heard lot about EJB. Is it equivalent to ADO.NET in Java?

72. How to mock services with Arquillian?    stackoverflow.com

Is it possible to use some kind of mocking framework with Arquillian, or precisely how to mock injected EJBs? I know that, with using the CDI (Contexts and Dependency Injection), it ...

73. Java EE, EJBs File handling    stackoverflow.com

I'm developing a web application in which users are allowed to upload pictures, the system will then generate thumbs for them. My problem relies on the fact that EJBs can be ...

74. EJB specifications and Java versions - backwards compatibility    stackoverflow.com

This is my understanding of relationship between the EJB spec and Java versions

  • EJB 2.0 was part of J2EE 1.3 platform, which was on top J2SE 1.3 or JDK 1.3.x
  • EJB 2.1 was ...

75. what are java middleware technologies    stackoverflow.com

What technologies can we name as 'Java Middleware' ? if I say JMS, WS is that correct ??

76. How to make oc4j don't print the stacktrace?    stackoverflow.com

Possible Duplicate:
How to make oc4j don't print the stacktrace?
Hello, I've the following scinaro. i've an EJB SLSB with a method that throws an exception:
public someMethod()throws ...

77. (EJB QL) How can I querry the link table with many to many relationship (EJB 2.0)?    stackoverflow.com

Suppose I have a link table: OrderLine, which links order and book together. However, many books can have many orders and vice versa. It means:

  • If the two books are not the ...

78. What use are EJBs    stackoverflow.com

I'm currently learning Jave-EE, having plenty of C++ experience and having learned Java SE. I don't understand the purpose of Enterprise Java Beans; can someone clarify this for me. I'm not ...

79. Java reflection not modifying my @Named bean variables    stackoverflow.com

I know shouldn't use reflection, but this is a temporary solution until ... I have 1:

@Named("PoiBean")
@SessionScoped
public class PoiBean implements ActionContext, Serializable {
   private String name = "www";

   @EJB
 ...

80. Design without EJBs?    stackoverflow.com

I'm doing a school related project that involves a Java EE application. I've got a backend server that handles all Database access and transaction, nothing on my side. The project I'm creating ...

81. EJB3 instantiation    stackoverflow.com

I got some propably trivial question. If I got defined EJB3+ interface, lets say it's remote like that:

@Remote
public class FooServiceRemote {
   void foo();
}
and one implementation
@Stateless
public class FooService implements FooServiceRemote {
 ...

82. RESTeasy w/ EJBs... AAaarrrrgh!    stackoverflow.com

What I am trying to do should be very straight forward BUT thus far has been impossible. Can someone PLEASE tell me how to access a @Local Session Bean from an ...

83. Edit a record from a DB table using EJB3?    stackoverflow.com

im quite new to EJB3 and was wondering if it is possible to edit a specific record from a table using EJB3? If so, are there any tutorials and examples on how ...

84. Why should we use EJB?    stackoverflow.com

What is EJB, and why we should use it? Please explain in simple language. Thank you.

85. EJB unit Test Case    stackoverflow.com

Team, We need to do EJB 3.1 Unit Test cases. For that we are analyzing tools to do efficient testing. We are taking arquillian, cactus in consideration. Can anyone tell ...

86. What's the point of using @Scoped with EJBs?    stackoverflow.com

Usually I'm using @RequestScoped or @SessionScoped (from javax.enterprise.context) to inject objects (for instance in faces beans) using @Inject. I am also using EJBs. As I understood, a set of stateless EJB copies ...

87. Is Akka a good fit for sharing single data view across separate EJBs    stackoverflow.com

I have a clustered JavaEE application. I would like to share a single view of a data structure between like EJBs. I don't want the EJBs to be contending with each ...

88. Can EJB2 and EJB3 coexists in one application?    stackoverflow.com

does anybody know if it is possible to iteratively replace EJB2.1 beans with EJB3 beans in JEE application? That is: at one time remove one 2.1 bean from the code and ...

89. Obvious flaws in my EJB3 design    stackoverflow.com

I have a domain object called VehicleRecord which is a hibernate entity. CRUD operations on these VehicleRecords are handled through an entity access object implemented as a stateless session bean ...

90. Storing large files conflicts with EE6 concept    stackoverflow.com


I have to store large files uploaded by user on the storage matrix. The system is created in EE6. The matrix running on OCFS (Oracle Cluster File System) In the concept of ...

91. Who runs the EJB Classes in WAR File    stackoverflow.com

From the Java EE6 documentation, I could see:

  1. To include enterprise bean class files in a WAR module, the class files should be in the WEB-INF/classes directory.
  2. To include a JAR ...

92. Pooling concept in java or EJB?    stackoverflow.com

we have pooling concept in stateless EJB. What is the advantage of using pooling? My understanding is that it will just save the time in object creation. Is this right?If yes is ...

93. if i want to create social ecommerce site using Java,is EJB the right solution for model?    stackoverflow.com

i want to develop social commerce application,i have experienced using ejb,but if we build some appplication where light is a must,is EJB can fill the M position in MVC? because some folks ...

94. Is it allowed to pass-through an ejb refernces to a used class of an ejb?    stackoverflow.com

i have an EJB3 stateless session bean that uses some other ejbs to do its work. As i do not want to have all the logic in the ejb class itself, ...

95. EJB Basic question    stackoverflow.com

I am new to EJB and I am going thro "Enterprise Java Beans 3.1" (O'Reilly) book. In that it has been mentioned different terminologies like EJB , Bean, Remote, ...

96. collection vs list vs arrays as return type for EJB method    stackoverflow.com

I was recently told that collection should be preferred to List as the return value of an EJB method. The argument is that in general collection is more generic i.e. gives ...

97. Consuming an EJB    stackoverflow.com

Can I consume EJB made with JEE6(JDK6) in an application made with JDK 1.4? I am sorry but I am very new to EJBs and just trying to evaluate the possibilities ...

98. What's the purpose of TransactionSynchronizationRegistry?    stackoverflow.com

According to the JTA spec:

This interface is intended for use by system level application server components such as persistence managers, resource adapters, as well as EJB and ...

99. EJB3 how to make sure things happen before a bean get deleted    stackoverflow.com

Suppose I let my customer reserve seats on a plane using Stateful Session Bean. If the client explicitly calls my Remove method, all of his reservations will be cancelled and the ...

100. EJB method processing hangs somewhere during execution    stackoverflow.com

I have a strange problem, here is a quick snapshot of the system: I have a web application which calls local EJB bean, lets call the local EJB 'LocalEJB', this EJB ...