4 Replies Latest reply on Jun 10, 2013 7:29 PM by jsm3031

    implicit modules in development

    jsm3031

      Hi,

       

      I am used to eclipse doing a lot for me, so I'm trying to learn more about app servers, deployment, etc. I also switched to Intellij for a trial.

       

      So, I have read up as much as I can, don't have enough time these days and appreciate help. I read the stuff on implicit dependencies in jboss, so for example if I use the @PersistenceUnit the dependencies will be added, but this doesn't work in development in the IDE, and in Intellij I have to use Maven dependency in the pom file or get intellij to download the jars into the projects lib folder or else the IDE can't resolve anything and it won't compile. These are easy enough solutions, but what i don't get is, it seems like the inclusion of these implicit modules by jboss is a deploy time thing (I also read you specify them in the manifest file) but if you have to use maven or download and add them to your lib directory to be able to develop then what's the difference between using tomcat and doing that then deploying them together or using jboss or other java ee compliant server (which i read that the benifit of using them is they come with all that stuff included)? Either way you have to get the dependencies into your project manually to develop. The only thing using the full featured ee compliant server seems to get you is not having to actually include them in the lib folder of the deployment artifact.

       

      At least that's what I have observed. I like figuring out these details but I just don't have the time these days and I'm quite curious about this.

       

      Thanks

       

      jon

        • 1. Re: implicit modules in development
          wdfink

          Hi,

          welcome to the forum.

           

          There are several projects to help developers in JBoss, see the developer jboss way.

          In each project/ide you have to declare dependencies, sometimes you will have a special EE distribution where such things are included or you have wizards for this, you might try the JBoss IDE based on eclipse or JBoss tools.

           

          To create a maven project you can use forge it will simple create different types of projects.

          • 2. Re: implicit modules in development
            jsm3031

            Thanks for replying.

             

            I know it's not jboss specific and just something I don't understand about java EE in general I guess. I appreciate peoples' time for explaining it.

             

            What I am failing to understand is, for example, JBoss AS 7 provides something like hibernate. It's found in /jboss-home/modules/org/hibernate/main/ and includes hibernate-core and JPA specific entitymanager, etc. But while developing in the IDE I still have add the libraries to the lib folder, use an IDE feature which fetches them some other way, or something like maven which puts them ~/.m2. I don't understand why these jars have to be in two places.

             

            thanks again

            • 3. Re: implicit modules in development
              wdfink

              If you use a JEE application server you can code against the JEE API, which mean JPA, EJB, JSF... In this case you only need to include the JavaEE API's downloaded from Oracle site or by maven dependencies.

               

              The reason for have that in different places is that the IDE need the reference to compile, Eclipse i.e. can use the pom.xml files (with maven plugin) to collect the references.

              With an IDE you are able to use a GUI for programming, with Eclipse (EE bundle) you are able to produce the JAR/EAR directly.

              Most developers use maven to be able to build from a shell and use automatic testing, the IDE will be only used as comfortable editor.

               

              The EE spec delegate the runtime implementation to the server, if you use JBoss the JPA persistence is implemented by Hibernate. If you code against the EE spec you will not need to use Hibernate for developing - this is the idea off JavaEE as you have no direct dependency to a specific AS provider.

              • 4. Re: implicit modules in development
                jsm3031

                Thanks for your help. You words have helped guide me in the right direction.