-
1. Re: How to deploy seam components as Jar and used them in different ear's
admin.admin.email.tld Aug 5, 2008 9:23 PM (in response to dheerajtak)you should be able to do that, assuming that you mean SFSB, SLSB, JavaBean, or JPA entity classes when you say
seam components
.most likely you need to modify an ant build script to accommodate your needs (i.e. copy the JAR files into the EAR for application foo).
or simply run seam-gen and add the classes to your project and make sure the build script will add the compiled classes in the JAR (and necessary .xml files, like deployment descriptors) to your EAR.
you could also expose conversational Seam web services (cool) and take a performance hit, most likely...
-
2. Re: How to deploy seam components as Jar and used them in different ear's
dheerajtak Aug 5, 2008 9:33 PM (in response to dheerajtak)Thanks for the reply
yes my jar file does has SFSB
even the application is deployed properly ,
but when I am trying the access the components i am not getting it
here is what I am trying to do
In app One
@Stateful
@Name("ThreeBean")
public class ThreeBean implements Three {
public void sayHello()
{
System.out.println("Hello");
}
}
@Local (not sure if this to be made as remote ,any way this jar wud be the part of ear )
public interface Three {
public void sayHello();
}
In app two
There is another session bean within which i tried the following options
1.@In
ThreeBean ThreeBean; //this is giving as warnign saying context variable nto found
also this ThreeBean is coming as null
2.ThreeBean cs =(ThreeBean ) Component.getInstance(ThreeBean.class);
this is theowing class cast exception ...Component.getInstance(ThreeBean.class) this is returning some javaassist object..
3.
@EJB(mappedBy = "app1/ThreeBean/local"
private ThreeBean ThreeBean
even this is not working
Not sure If i need to make some entries in components.xml or seam.properties -
3. Re: How to deploy seam components as Jar and used them in different ear's
pgmjsd Aug 5, 2008 9:43 PM (in response to dheerajtak)Have you tried deploying this in a single EJB-JAR?
Also, using upper camel case for the field names so that the name of the field and the name of the class/interface are the same might cause problems (e.g. you have ThreeBean ThreeBean;).
-
4. Re: How to deploy seam components as Jar and used them in different ear's
dheerajtak Aug 5, 2008 9:46 PM (in response to dheerajtak)that was just a type its actually threeBean
yes there is no error at deployment time , its properly deployed
-
5. Re: How to deploy seam components as Jar and used them in different ear's
pmuir Aug 6, 2008 2:59 PM (in response to dheerajtak)If you want to access a Seam component from another EAR, then you need to use a remote EJB for lookup, and deploy an API to a shared classpath. You'll need to use EJB mechanisms for DI.
-
6. Re: How to deploy seam components as Jar and used them in different ear's
dheerajtak Aug 6, 2008 8:14 PM (in response to dheerajtak)Thanks all,
finally I got the solutionI created a new EJB Project and add jboss-seam.jar in the build path and created a jar out of this ..
we have to place seam.properties(though blank) and seam interceptors in ejb-jar.xmland i am able to access the components from another ear