Announcement Announcement Module
Collapse
No announcement yet.
EJB and Spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Malhar
    started a topic EJB and Spring

    EJB and Spring

    Hi,

    I have few questions:
    I dont have any experience of EJB but for my new project the people is looking for struts, ejb, hibernate combination. The apllication will co-ordinate with diffrent applications.
    But I have these below questions before I start working on the things:
    1. Why we use ejb?
    2. If we used ejb for distributed application, then can we use spring for the same?
    3. Can we achieve the same things using spring whic we achieve throuth ejb?

  • techieman
    replied
    As a lightweight container, Spring is often considered an EJB replacement. We do believe that for many if not most applications and use cases, Spring as a container, combined with its rich supporting functionality in the area of transactions, ORM and JDBC access, is a better choice than implementing equivalent functionality via an EJB container and EJBs.

    However, it is important to note that using Spring does not prevent you from using EJBs. In fact, Spring makes it much easier to access EJBs and implement EJBs and functionality within them. Additionally, using Spring to access services provided by EJBs allows the implementation of those services to later transparently be switched between local EJB, remote EJB, or POJO (plain old Java object) variants, without the client code having to be changed.

    In this chapter, we look at how Spring can help you access and implement EJBs. Spring provides particular value when accessing stateless session beans (SLSBs), so we'll begin by discussing this.

    Leave a comment:


  • Turkish Transalation
    replied
    nice topic i like it

    Turkish Translation

    Leave a comment:


  • emankady
    replied
    it`s very important info



    TurkishTranslation
    Last edited by emankady; Jan 15th, 2012, 06:50 AM. Reason: signature

    Leave a comment:


  • emankady
    replied
    thumps up

    Leave a comment:


  • francisfleming
    replied
    fgfchfgjhgjghjkkjhk

    Leave a comment:


  • jokrasa
    replied
    I am looking for a way to setup a test suite for a site that is using EJB-JSF-Hibernate and was hoping to hook into the EJBs using SpringSecurity... would I be able to add spring integration easily ? I see Part III 9. testing and Part VI Integration 20. EJBs that it looks doable but was wondering how hard that would be ?

    Can you mix Spring and JSF configurations? Usually you put your test src code in a test pkg alongside the main... would I have to run another 'spring module' configured alongside the code I want to test?

    Hoping for some insight, any responses welcome (Thx) !

    P.S. Are there any examples out there of doing this ?

    Leave a comment:


  • Ronaldo Veras
    replied
    EJB with Spring

    I'm implementing the migration task from an ear JBoss application to Spring stand-alone jar batch (Dependency Injection). The problem is: the value of name attribute in @Stateless(name="Bean") is not localized in the Bean Factory when the annotation @EJB(name="Bean") verifies this reference in another EJB.

    This problem is resolved when the annotations (@EJB) contains no name attribute. What is happen? The pitchfork project (http://www.springsource.com/pitchfork) also uses the annotations without the name attributes. Some idea?

    This example shown the problem:

    @Stateless(name = "BeanB")
    public class BeanB implements IBeanB {

    @EJB(name="GenericDAO")
    private GenericDAO<Type> genericDAO;

    ...
    }

    @Stateless(name = "BeanA")
    public class BeanA implements IBeanA {

    @EJB(name="BeanB")
    private BeanB dao;

    ...
    }

    Caused by: org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'BeanB' is defined
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.getBeanDefinition(DefaultListab leBeanFactory.java:527)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getMergedLocalBeanDefinition(AbstractB eanFactory.java:1087)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:278 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:198)
    at org.springframework.context.annotation.CommonAnnot ationBeanPostProcessor.autowireResource(CommonAnno tationBeanPostProcessor.java:440)
    at org.springframework.context.annotation.CommonAnnot ationBeanPostProcessor.getResource(CommonAnnotatio nBeanPostProcessor.java:414)
    at org.springframework.context.annotation.CommonAnnot ationBeanPostProcessor$EjbRefElement.getResourceTo Inject(CommonAnnotationBeanPostProcessor.java:696)
    at org.springframework.beans.factory.annotation.Injec tionMetadata$InjectedElement.inject(InjectionMetad ata.java:147)
    at org.springframework.beans.factory.annotation.Injec tionMetadata.inject(InjectionMetadata.java:84)
    at org.springframework.context.annotation.CommonAnnot ationBeanPostProcessor.postProcessPropertyValues(C ommonAnnotationBeanPostProcessor.java:302)
    ... 29 more

    Leave a comment:


  • jeanpaul11919
    replied
    Best Dentist In Pune

    I want to know that what is Java Beans and how it works and how can i use it to improve the programming using Java beans

    To have services of Best Dentist In Pune

    Leave a comment:


  • gar56
    replied
    great article, i like it.

    gar

    Leave a comment:


  • Malhar
    replied
    Nice article.
    Really it is mostly depend on requirement and need analysis to fix the technology. Whatever EJB covers almost all things are covered by spring.
    Till date I am happy to use Spring in my most of the applications and I am using his each and every aspect.

    Leave a comment:


  • Paulel
    replied
    Originally posted by Malhar View Post
    Hi,

    I have few questions:
    I dont have any experience of EJB but for my new project the people is looking for struts, ejb, hibernate combination. The apllication will co-ordinate with diffrent applications.
    But I have these below questions before I start working on the things:
    1. Why we use ejb?
    2. If we used ejb for distributed application, then can we use spring for the same?
    3. Can we achieve the same things using spring whic we achieve throuth ejb?
    This short article may help you
    http://stackoverflow.com/questions/1...d-web-services

    Paul

    Music & Directory
    Last edited by Paulel; Mar 11th, 2012, 01:21 PM.

    Leave a comment:


  • mesken
    replied
    And also I forgot, what about loadbalancing ? Does Spring manage that in very large distributed environment ?

    Leave a comment:


  • mesken
    replied
    My question was the same with that of Malhar but wile reading through the answers, I am really satisfied. But I still have some concerns:

    1) We just came accross Spring and we had already decided to work with GWT-EXT for our Web Tier. So what do you thingk concerning GXT + Spring + Hibernate ?

    2) What are the licencing obligations ?? The software we are building is commercial. What are the differencies between the Spring open source version and the enterprise version ? Both in terms of licencing and functionalities.

    3) It is so easy to deploy a distributed large and scalable spring application on a 7-tiers environment with 10 thousand users ???

    Leave a comment:


  • cherylfoster
    replied
    EJB and Spring

    EJB stands for the Enterprise Java Beans. It provides a writing transactional objects. and also we can use as a back end database connection. As I think, If you are you use a Spring then there is not need to use a EJB. Spring is also providing a best facility.

    Leave a comment:

Working...
X