What is the difference between EJB, hibernate, spring and JSF? [closed]

These are frameworks for different layers. JSF is for the view (web) layer, it’s a component oriented framework (every part of a page is a component, it has state) like Wicket or Tapestry, and unlike Action frameworks like Spring MVC, Struts or Stripes Books: Core JavaServer Faces (3rd Edition) Tutorials: CoreServlets.com EJB 3.x is a … Read more

Difference between Java Bean and Enterprise Java Beans? [closed]

A JavaBean is just a plain old Java object that conforms to certain conventions including the use of accessor functions (getFoo/setFoo) for member access, provision of a default constructor and a few other things like that. An Enterprise JavaBean is a component in a Java EE application server which comes in several flavours, the details … Read more

Java Component based vs Request based frameworks

They were most likely looking for examples of web frameworks – for example, JSF is a component-based framework, and Struts is a request-based framework. Request-based frameworks generally make it clear through their APIs that they’re working with parsing an HTML request / generating an HTML response, while Component-based frameworks attempt to abstract this away and … Read more

Inject an EJB into JAX-RS (RESTful service)

I am not sure this is supposed to work. So either: Option 1: Use the injection provider SPI Implement a provider that will do the lookup and inject the EJB. See: @EJB injection. Example for com.sun.jersey:jersey-server:1.17 : import com.sun.jersey.core.spi.component.ComponentContext; import com.sun.jersey.core.spi.component.ComponentScope; import com.sun.jersey.spi.inject.Injectable; import com.sun.jersey.spi.inject.InjectableProvider; import javax.ejb.EJB; import javax.naming.Context; import javax.naming.InitialContext; import javax.ws.rs.ext.Provider; import java.lang.reflect.Type; … Read more

EJB 3.1 @LocalBean vs no annotation

The rules are (from memory): Bean has a @LocalBean annotation -> bean has a no-interface view Bean has a @Local annotation -> bean has a local view Bean has a @Remote annotation -> bean has a remote view Bean has no view annotations, but directly implements an interface which has a @Local annotation -> bean … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)