Impossible tech stack? Jboss/Seam/Resteasy/Hibernate/Maven
Asked Answered
O

1

6

Hello good people of StackOverflow!

I've tried many tutorials on using JBoss Seam and looked at the "Restbay" example in the Seam distro. But I cannot get a working REST web service with the following tech stack:

  • JBoss 4.2.3
  • Seam 2.2.*
  • Resteasy 2.2.*
  • Hibernate 3
  • Maven 3 (critical)

The project layout I've been attempting looks like:

ProjX

  • pom.xml
  • ProjX-ear
  • ProjX-ejb
  • ProjX-web

The EAR layout looks like:

ProjX.ear

  • lib
  • META-INF
  • ProjX-web.war
  • ProjX-ejb.jar

Is this impossible? Ultimately I want to treat my REST resources as Seam action components and reap the benefits of "seamless" injection. Is this an impossible achievement on the mighty JBoss 4.2 Application Server?

(Note: I'm using the maven-ear-plugin to layout my EAR)

[UPDATE: this is not impossible I almost had it! I just ran out of time...]

Oraleeoralia answered 18/7, 2011 at 14:49 Comment(8)
Project is constrained to use JBoss 4.2.3, no time to see if there is a clear migration path to 5.Oraleeoralia
What is actually your problem? The right Maven project structure or JBoss configuration?Airlift
I agree with Michael-O. Maven 3 is probably not related to whatever issues you are having, although you may need some workarounds if one of the libraries you are using has a bad pom.xml file or something. What exactly is the problem?Witter
I'm looking for a "recipe", or even a maven archetype. However the seam archetypes I've tried are out of date. I would say the greatest issue is making the above stack work on JBoss AS 4.2 which doesn't have proper EJB 3 support.Oraleeoralia
I still don't think I answered you @michael-o fully. The problem is how can the above configuration be made to work. Maven is significant because the an ear and war must be laid out (I am aware of the Seam examples using Ant to build their applications). Maven builds are trickier where you have to be aware of transitive dependencies being pulled in and potentially overshadowing a lib in your ear with a conflicting version (i.e. JAR-Hell).Oraleeoralia
Reuben, I assume now that you are looking for a same Maven project setup right? Well, Maven cannot help your to maintain the correct dependencies but it can help you to maintain them in general. You have to figure your which versions you need. The JAR hell won't happen if you use the mvn dependency:tree mojo and m2eclipse with graphical dep analysis. Consider an archetype as an template to speed up development, it is nothing more nor nothing less. Your ProjX layout can be made in a snap with Maven.Airlift
Did you try this one?Airlift
Hibernate 3 won't work on JBoss 4.2.3; there are incompatibilities between some of the EJB3 components on 4.2.3 and some of the Hibernate dependencies.Blowgun
C
1

Long time ago that you asked, but maybe you are still interested to hear (if you haven't already found out for yourself) that Seam 2.3 is available in alpha version, which is based on a maven build.

Besides that you should definitely abandon JBoss 4.x and at least take 5.1.

And if you use REST webservices, you may as well take a bigger step and switch to Java EE 6.

Carnotite answered 23/12, 2011 at 20:20 Comment(1)
+1 on upgrading to JBoss AS 5.1. It's usually not hard upgrade from 4.x.Witter

© 2022 - 2024 — McMap. All rights reserved.