EzDevInfo.com

ejb interview questions

Top ejb frequently asked interview questions

How do CDI and EJB compare? interact?

I'm having a tough time understanding how the two interact and where the boundary between them lies. Do they overlap? Are there redundancies between them?

I know there are annotations associated with both, but I haven't been able to find a complete list for both with brief descriptions. Not sure if this would help clear up how they differ or where they overlap.

Really just confused. I (think I) understand EJB reasonably well, I guess I'm having a hard time understanding exactly what CDI brings to the table and how it supplants or enhances what EJB already offers.


Source: (StackOverflow)

Learn EJB 3.0 really fast [closed]

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 as a programmer and worked with different technologies: RMI, JNDI, EJB 1, EJB 2, Hibernate etc so I'm not a stranger to all of this. But that was sooooooome time ago.

I need a tutorial (not your friendly 800 pages book) that will introduce me into all the features of EJB 3 as fast as possible maybe provide like a features reference or something.

Does something like this exist?

Thank you!


Source: (StackOverflow)

Advertisements

Java EE Containers vs Web Containers

I'm relatively new to Java EE/EJB, and I've been reading alot regarding Java EE containers. I've had experience working with a web container (WAR file in jboss). I am also aware that Jboss can also be used as a Java EE container.

My question is, what is the difference between a Java EE container against a web container?

I know Java EE is also able to contain a .war file. Are they different and what are their differences? Are there any preferences vendor specific-wise which is better?


Source: (StackOverflow)

.NET - vs EJB

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


Source: (StackOverflow)

Why are Data Transfer Objects an anti-pattern?

I've recently overheard people saying that Data Transfer Objects (DTO) are an anti-pattern.

Can someone please explain why? What are the alternatives?


Source: (StackOverflow)

EJB 3.1 @LocalBean vs no annotation

I understand the difference between local view, remote view and no-interface view. I just don't understand what is the difference between "no view" (no annotation) and no-interface view. And also why should I annotate my interface with @Local? What if I don't annotate the interface in at all, is there a difference?


Source: (StackOverflow)

What is local/remote and no-interface view in EJB?

I am trying to understand what the purpose and why we need the different client views in EJB. Could someone try to explain?


Source: (StackOverflow)

Web Services vs EJB vs RMI, advantages and disadvantages?

My web server would be overloaded quickly if all the work were done there. I'm going to stand up a second server behind it, to process data.

What's the advantage of EJB over RMI, or vice versa?

What about web services (SOAP, REST)?


Source: (StackOverflow)

Should I use @EJB or @Inject

I have found this question: What is the difference between @Inject and @EJB but I did not get any wiser. I have not done Java EE before nor do I have experience with dependency injection so I do not understand what I should use?

Is @EJB and old way of injecting? Is the injection done by the EJB container when using this annotation while using @Inject use the new CDI framework? Is that the difference and should I be using @Inject instead of @EJB if this is the case?


Source: (StackOverflow)

Difference between Javabean and EJB [duplicate]

This question already has an answer here:

Just a simple question from a relative Java newbie:

what is the difference between a JavaBean and an EJB?


Source: (StackOverflow)

How to deploy EJB based application on Tomcat

I developed a small Java application using EJB3 and JSF. But I want deploy it on Tomcat server (not GlassFish and not in Netbeans IDE it has to be independent of Netbeans).

How can I deploy it on Tomcat?


Source: (StackOverflow)

Why pool Stateless session beans?

Stateless beans in Java do not keep their state between two calls from the client. So in a nutshell we might consider them as objects with business methods. Each method takes parameters and return results. When the method is invoked some local variables are being created in execution stack. When the method returns the locals are removed from the stack and if some temporary objects were allocated they are garbage collected anyway.

From my perspective that doesn’t differ from calling method of the same single instance by separate threads. So why cannot a container use one instance of a bean instead of pooling a number of them?


Source: (StackOverflow)

Where to find an EJB3 tutorial? [closed]

I want to learn EJB3. Anyone could suggest some good tutorial website for it?


Source: (StackOverflow)

When does @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) commit?

An EJB method named Aby calls another EJB method named Bob

Bob is marked with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)

When does bob transaction commits?:

a) when bob invocation ends

b) when aby invocation ends

c) other. when?


Source: (StackOverflow)

EJB's - when to use Remote and/or local interfaces?

I'm very new to Java EE and I'm trying to understand the concept of Local interfaces and Remote interfaces. I've been told that one of the big advantages of Java EE is that it is easy to scale (which I believe means you can deploy different components on different servers). Is that where Remote and Local interfaces come in? Are you supposed to use Remote interfaces if you expect your application to have different components on different servers? And use Local interfaces if your application is only going to reside on one server?

If my assumptions above are correct, how would you go about choosing whether to use Local or Remote interfaces for a new application, where your unsure of what the volume of traffic would be? Start off by using Local interfaces, and gradually upgrade to Remote interfaces where applicable?

Thanks for any clarification and suggestions.


Source: (StackOverflow)