Hows makes a suture injection in Eyb3

We use

  • Seam 2.2.0
  • Java 1.6.14
  • Weblogic 10.3.1.0 (named 11g Doh!)

I looked

However, I still do not understand how to insert an EJB3 bean into JSF bean support. It seems to me that I should (correct me if I am wrong)

  • Annotate with @Name my bean support
  • Annotate with @Name my EJB3 bean
  • Use the @In annotation in the bean database
  • Place the empty seam.properties file in the WAR that contains the bean backup
  • Put the empty seam.properties file in the JAR that contains the EJB
  • Set up a seam interceptor in ejb-jar.xml EJB

Is there any need to configure the JNDI URL somewhere? How exactly will Seam find EJB? Is an interceptor enough?

It also means that I need to add a seam dependency in my EJB archive (due to @Name annotation). In this way, the web layer (Seam) spills into my business logic (EJB). Is this a recommended approach?

Did I miss something?

Answer: Obviously, you can install the JNDI template in

  • EJB itself with annotation @JndiName or
  • Web.xml file or
  • Components.xml file or
  • The seam.properties file suggested by Nathan (this is what I did)
+4
source share
3 answers

Three things:

1) There is no additional bean support separate from the EJB bean session.

2) There is a JNDI url, the template is set in seam.properties (the JBoss example in Java Persistence with Hibernate looks like

org.jboss.seam.core.init.jndiPattern=caveatEmptor/#{ejbName}/local 

Sheim extends the expression of an expression language with a version that knows about its new areas and knows where to look for EJBs.

3) Seam is not a web framework, it is more like an application stack that makes JSF, EJB3 and Hibernate more efficient together, so it should not stop you from having Seam annotations in your EJBs.

+3
source

My answer is the compilation you want about

See Enabling WebLogic 10.3.2 (11g) (both answers) And Enabling @Stateless @ In- @ Out- jection

And see here , the Seam reference documentation says how to deploy a Seam application when using Weblogic

+1
source

Most of these answers can be found in the Seam hotel reservation example. Your configuration may be different because you are using WebLogic and not JBoss.

+1
source

Source: https://habr.com/ru/post/1306661/


All Articles