Pergunta

I'm migrating my application(s) from jboss 4.2.2 to Jboss AS7(7.1.1).

In the previous implementation myapp.war, myejbImpl_1.jar and myejbImpl_2.jar all are deployed under jboss_home/server/default/deploy. And all the dependency jars went to jboss_home/server/default/lib

As jboss AS7 supports moduler class loading - I'm creating a module for all the lib my apps are dependent on - and put them under jboss_as7_home/module/commons/mymodule/main

myweb.war in dependent on myejbImpl_1.jar and myejbImpl_2.jar

I've complied myweb.war using jboss-ejb-api_3.1_spec-1.0.1.Final.jar.

Now I have some questions in this senario -

1- Should I create .ear application for all three applicaions like:-

myear.era

-myweb.war
-myejbImpl_1.jar
-myejbImpl_2.jar

is it necessary ?

2- If I dont create a .ear should I deploy myejbImpl_1.jar and myejbImpl_2.jar in deploy directory like jboss_4.2.2 ?

3- Local( { SomeService.class }) @Remote( { SomeService.class }) @Stateless public class SomeImpl extends SomethingImpl implements SomeService

is it possible you use @Remote and @Local in the same class or I have go though an extensive code change phase ?

Any help will be highly appreciated.

Thanks.

Foi útil?

Solução

So I found out the answer by myself -

  1. EAR file is the standard way to go . So its better to put ejb jars and war files in EAR file
  2. Yes EJB jars can deploy separately
  3. for @Remote and @Local you have use 2 separate interfaces extending same interface. Based on your need you can use same implementation implementing remote and local on same Class - or create 2 separate implementation for remote and local
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top