facebook

need help using existing EJBs with myeclipse

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #199933 Reply

    Mike Suiter
    Member

    i have myeclipse installed and actually have it configured to start weblogic 8 – very cool!

    now, i have an existing eclipse project, that includes our EJBs, code for all our clients, and even some JSPs and servlets. i currently have the task of converting our 40+ stateless session EJBs to use XDoclet. i think this would be a good project to test myeclipse.

    so, what is the best way to use myeclipse with my existing eclipse project and existing EJBs?

    on another subject, does myeclipse allow for EJB debugging in app servers?

    thanks,

    mike

    #199935

    Scott Anderson
    Participant

    Mike,

    Sounds like you’re making great progress.

    i think this would be a good project to test myeclipse.
    so, what is the best way to use myeclipse with my existing eclipse project and existing EJBs?

    It will most likely will be a good test, but unless your EJB project is laid out as an exploded EJB jar you’ve got a little work to do. The first thing you’re going to find is that in order to really use MyEclipse effectively you’ll need to convert your application from using a single project into a standard enterprise layout which uses 3 (EAR, WAR, and EJBs). The best way to start is to use our EAR project wizard to create your top-level project and also have it create stubbed out EJB and Web projects for you too. You then need to move your artifacts into the appropriate project. While we’ll be making our project structures a bit more flexible in the future, it really is impossible to provide really good tool support if we don’t know the project layout.

    on another subject, does myeclipse allow for EJB debugging in app servers?

    Yes it does provide full debuggin, and also allows for “hot” modification of both Java and JSP’s with out server restarts. 🙂

    –Scott
    MyEclipse Support

    #199944

    Mike Suiter
    Member

    scott,

    within our source structure we have multiple EARs, WARs, and client applications. should i create separate myeclipse projects for each EAR & WAR we have? if so, where should they be located? my current eclipse source layout is similar to as follows:

    wp33 project
      src
        com
          wp
            client1
            client2
            server.ejb (my main ejb code)
            demo.ejb (our demo ejb code)
            demo.jsp (our demo jsp code)
            ...

    just wondering what your suggestions are for creating projects for our existing code? also, how do we handle the other jars that the ear needs?

    thanks.

    mike

    #199947

    Scott Anderson
    Participant

    Mike,

    You really have two choices. To use our deployers, you need to restructure your codebase. However, if you’ve already got deployment, via Ant or whatever, that you’re happy with you can continue to use it and simply take advantage of our other features, including debugging, as long as you launch your server using our connectors.

    If you’d like to use our deployers, you’ll need to split this project into multiple projects along the lines you’d like them packaged in. Our project correspond 1 to 1 with the major enterprise concepts: Enterprise projects -> EAR; EJB Projects -> EJB Jar; Web Project -> WAR. You need one enterprise project for each EAR you’ll be building and it should be associated with as many web and ejb projects as you need, based on the packaging you’d like. Any number of EJB’s can go into an ejb project, so it really comes down to what you’d prefer. One project is certainly simpler. Likewise, for each WAR you’d like to generate within the ear, you’ll need a web project associated with the enterprise project.

    also, how do we handle the other jars that the ear needs?

    Any additional jars you’d like packaged in the EAR can simply be placed in the Enterprise project and they’ll be packaged automatically by the deployers. However, to reference them from your EJB jars, for example, you’ll still need to manually modify the MANIFEST.MF’s classpath entry as you most likely do now.

    –Scott
    MyEclipse Support

    #199964

    What works good over here, is seperating the source folders to meet our required logical structure. Currently we are using the 3 Project layout (EAR, WAR and EJB) but we use more then one sourcefolder. ‘src’ contains the normal sources, ‘src-test’ is containing Cactus and JUnit tests and src-generated contains all generated EJB related classes and interfaces (generated by the ‘run XDoclet’-command).

    The default application server connector launches the test server (using a test database) for running the Cactus and JUnit tests. The production code (for functional tests etc.) is deployed using an ant script. I am sure you are able to adapt the ‘more then one src folder’ strategy to meet your requirements. For us it works very good.

    #199968

    Mike Suiter
    Member

    i’m wondering what is the best way to structure using multiple projects and layouts on the filesystem? if my folder layout is Java/src/com/wp/… i don’t think i can up Java and the root for multiple projects. i wonder if a file structure like this would work?

    
    Java
      main-project
        src
          com/wp/...
      ejb-project1
        src
          com/wp/...
      ejb-project2
        src
          com/wp/...
    

    i want to break my project up, but haven’t had any luck finding a solution yet.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: need help using existing EJBs with myeclipse

You must be logged in to post in the forum log in