glassfish
  1. glassfish
  2. GLASSFISH-21080

GlassFish tries to instantiate every class which contains a @PersistenceContext annotation

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows, Oracle Java 6, latest Release (_45)

      Description

      We are trying to deploy an application (war) which uses spring-data-jpa.
      At deploy time GlassFish tries to instantiate two spring-data-jpa framework classes as beans (org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean and org.springframework.data.jpa.repository.support.QueryDslRepositorySupport).

      This classes have a @PersistenceContext-annotation at their setEntityManager-methods, but no annotation at class level which declares this classes as beans.

      I think it's wrong behavior for an application server to try to instantiate classes which have no "bean annotation" like @Statefull ...

      I think it's no duplicate of GLASSFISH-4204 because it's no annotation at class level.

      This makes spring-data-jpa unusable on GlassFish (you do not need to like spring, but spring-data is realy cool). We have no problems with spring-data on jetty or tomcat (which are of course no JEE container), but we have to extend an application which unfortunately relies on some other JEE features. spring-data-jpa will save us 3/4 of the work to do for this task.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Mahesh Kannan
            Reporter:
            vseibt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: