Seperate JSF into multiple WARs

Hi All,
Is it possible to seperate JSF files (JSP pages, managed beans) into different WARs, and then deploy them inside an EAR?
Would you be able to access managed beans in other WARs if you do it like this?
Thanks,
Ristretto

Guessing off the top of my head, I don't think ManagedBeans in one WAR would be available to other WARs. Typically, application servers use different ClassPath Loaders for different WAR files in the server. When deployed as part of an EAR, the WAR can access classes in the EJB's JAR files because of the ClassLoader architecture. But classes in a EJB's JAR file cannot access the classes in the WAR file.
I'm speculating from previous issues with specific application servers (WebLogic), and I don't have any concrete evidence that it won't work with your specific scenario. Different app servers can (and typically do) implement this differently, so it might work in specific situations. I'd try testing it. I'd be pleasantly surprised if it worked, but I wouldn't think it would.
Hope this helps,
Ed

Similar Messages

  • Seperate video into multiple clips

    So, I have a bunch of interviews that I imported in one large batch from my video camera. However, I want to seperate each interview into its own clip. How do I go about cutting the video into seperate clips?

    FCP does not automatically break long captures into individual clip files. With DV media, it will do a thing called 'sub clipping'. These are pointers to a section of the larger clip that allow you to treat each element like an individual clip. This works ok except when you want to: a) work with variable speed time remaps and b) delete unused clips to archive the project.
    If you want individual clip files you have two reasonable options.
    1. Log each clip then do a batch capture to bring in individual files
    2. Use a 3rd party application (eg CatDV) to break up the clips into individual editable files. This can happen at capture or at a later time.
    Have fun.
    x

  • Breaking WAR into multiple similar wars

    I have a web app which authenticates a user before serving any of the urls. I have a requirement to have multiple wars deployed instead of single war for the same application and these multiple wars represent the same application but with different set of features. Of many wars the war to which the user will be directed will be decided after the authentication. So one thig is clear that I have to bring out the authentication logic out into seperate WAR which will act as proxy before sending request to proper war. I also need to handle situation if user is already logged in and hits the URL of the appropriate war then he should not be presented with the login page and if user tries to access the other war then he is redirected to the login page.
    Please suggest design approaches.
    Thanks

    I have a web app which authenticates a user before serving any of the urls. I have a requirement to have multiple wars deployed instead of single war for the same application and these multiple wars represent the same application but with different set of features. Of many wars the war to which the user will be directed will be decided after the authentication. So one thig is clear that I have to bring out the authentication logic out into seperate WAR which will act as proxy before sending request to proper war. I also need to handle situation if user is already logged in and hits the URL of the appropriate war then he should not be presented with the login page and if user tries to access the other war then he is redirected to the login page.
    Please suggest design approaches.
    Thanks

  • Deploying multiple wars within an ear (including web services) - pls advise

    **Apologies - this post also appears in the standard Java forums, before I realised there was a separate Enterprise forum!**
    Hello all
    I am working on an application that receives XML messages from sending systems, processes them and forwards them to receiving systems. There is a set of rules concerning who can send what to who. The entry and exit points to the application are web services.
    I would be very grateful for some general advice on best practice for packaging this application. I have done a lot of browsing and read some articles, but I understand the whole picture has changed recently with the growing popularity of web services and that many of the articles I have read are probably out of date.
    The whole thing could be packaged into a single war, but it would be ideal to treat the different components separately as in the future they may be modified and deployed separately. I therefore envisaged having 3 wars in an ear as follows: -
    a. A set of incoming web services to receive messages from the sending system. This is like a hook into b (below). The sending systems will be clients to these web services.
    b. A web application that takes the messages from a and processes, authenticates and transforms them.
    c. A set of outgoing web services that sends the message on to the receiving system. These will be like facades to the receiving systems and b will be a client to them.
    The whole thing would then work in reverse to process the response.
    A few questions: -
    1. I know I haven't given much info here, but does this seem like a reasonable basic packaging strategy? Any other suggestions?
    2. Is it good practise to package multiple wars together into an ear? If anyone could send me an example ant script that does this, I would be so grateful.
    3. Wars a and c above will both need to have full visibility and access to b, which is the "brains" of the whole thing. How is this best achieved when packaging?
    4. If you could point me in the direction of a best practice guide, examples or tutorials, I would be very grateful.
    Many thanks for taking the time to read my post - and for any replies.
    Kind regards
    Jon

    That is a viable method to package your application, pending the architecture of your application supports this.
    Each WAR file will be packaged as a seperate web application and all web applications on that web server will be able to communicate with each other over sockets by having the URL of the web component that you wish to communicate with. This interface needs to be there mind you.
    EAR files are generally deployed to an application server so if you happen to have an application server like Weblogic or Websphere then this would be an ideal setting for hosting your application. Packaging in an EAR file and also hosting on an application server gives you the benefit of using J2EE constructs, like EJB's to provide an alternative means of communication between different web components.
    Packaging seperate wars into an ear file really wouldn't work out too well with just a standard servlet container like Tomcat.

  • Multiple wars in an ear

    Hello,
    I am having a questionabout mutilple wars in a single ear.
    Can someone explain me the advantages and disadavantages in it?
    And also is it possible to have a seperate ear in a war ??
    Thanks

    Can someone explain me the advantages and
    disadavantages in it?well, the advantage is that if you have 2 web applications, you can logically separate them into separate wars so that you can reuse and it's more organized. disadvantage is that you cannot (easily) share sessions across wars. there are more advantages and disadvantages than just that, but that's what comes to mind.
    And also is it possible to have a seperate ear in a
    war ??No.

  • Efficient Way of Inserting records into multiple tables

    Hello everyone,
    Im creating an employee application using struts framework. One of the functions of the application is to create new employees. This will involve using one web form. Upon submitting this form, a record will be inserted into two separate tables. Im using a JavaBean (Not given here) between the JSP page and the Java file (Which is partly given below). Now this Java file does work (i.e. it does insert a record into two seperate tables).
    My question is, is there a more efficient way of doing the insert into multiple tables (in terms of performance) rather than the way I've done it as shown below? Please note, I am using database pooling and MySQL db. I thought about Batch processing but was having problems writing the code for it below.
    Any help would be appreciated.
    Assad
    package com.erp.ems.db;
    import com.erp.ems.entity.Employee;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.Collection;
    import java.util.ArrayList;
    public class EmployeeDAO {
         private Connection con;
         public EmployeeDAO(Connection con) {
              this.con = con;
         // METHOD FOR CREATING (INSERTING) A NEW EMPLOYEE
         public void create(Employee employee) throws CreateException {
              PreparedStatement psemployee = null;
              PreparedStatement psscheduleresource = null;
              String sqlemployee = "INSERT INTO employee (FIRSTNAME,SURNAME,GENDER) VALUES (?,?,?)";
              String sqlscheduleresource = "INSERT INTO scheduleresource (ITBCRATE,SKILLS) VALUES (?,?)";
              try {
                   if (con.isClosed()) {
                        throw new IllegalStateException("error.unexpected");
                            // Insert into employee table
                   psemployee = con.prepareStatement(sqlemployee);
                   psemployee.setString(1,employee.getFirstName());
                   psemployee.setString(2,employee.getSurname());
                   psemployee.setString(3,employee.getGender());
                            // Insert into scheduleresource table
                   psscheduleresource = con.prepareStatement(sqlscheduleresource);
                   psscheduleresource.setDouble(1,employee.getItbcRate());
                   psscheduleresource.setString(2,employee.getSkills());
                   if (psemployee.executeUpdate() != 1 && psscheduleresource.executeUpdate() != 1) {
                        throw new CreateException("error.create.employee");
              } catch (SQLException e) {
                   e.printStackTrace();
                   throw new RuntimeException("error.unexpected");
              } finally {
                   try {
                        if (psemployee != null && psscheduleresource != null)
                             psemployee.close();
                             psscheduleresource.close();
                   } catch (SQLException e) {
                        e.printStackTrace();
                        throw new RuntimeException("error.unexpected");
         }

    Hi ,
    U can use
    set Auto Commit function here ..
    let it be false first
    and when u do with u r all queries ..
    make it true
    this function take boolean values
    i e helful when u want record to be inserted in all or not at all..
    Hope it helps

  • Breaking a pdf into multiple pdf's

    I have a 250 page pdf.  each page represents a departments information.  Is there a way to break apart that pdf into single pdf's but using part of the file to name the pdf?
    for example, if the first report has a title that contains department 123, I could extract that page and name it department 123.
    The only want I know how to break a pdf into multiple pages is to use the document / extract pages and select Extract pages as seperate files.  But when I do this it uses the name of the exiting file and adds a number to it.

    You will have to select a subforum, e.g. Creating, Editing & Exporting PDFs, or Acrobat SDK (since you probably need to write the functionality you want by yourself).

  • Syncing model sources across multiple WARs

    One of the problems we're hitting in our development is keeping model classes synced across a multi-WAR project. For example, the model class for, say, a User object was changed in WAR B, but that developer (an intern) did not publish those changes to WARs A and C. The end result was that a few of our web service calls started failing on the unchanged WARs, while others worked fine.
    I started looking into EJB3, intrigued by the @Remote and @Local setup, but those are related to the session beans themselves. I was hoping that object models could be referenced by interface across multiple WAR distributions as well, though I haven't dug up anything specific on this yet.
    Is there any advice on this forum for keeping model classes in sync across a multiple-WAR project (aside from tighter repository control and swift kicks to the butt)?

    Wraithe wrote:
    Quoting myself: +"The end result was that a few of our web service calls started failing on the unchanged WARs"+
    My original question pertaining to ensuring that the source code for the end user model classes remained consistent. You can't if the interface contains Java classes that are changed. You immediately have to deploy updated JAR files with the new code to all the clients that need it.
    The JAR idea is applicable, though not ideal, and I was hoping there was some other suggestion as to how to handle client-side objects.There is: XML messaging in the service interface instead of Java classes.
    %

  • Merge multiple WAR to single EAR for deployin JDev 11.1.1. & WLS 10.3.1

    Greetings Experts,
    First of all, i've read so many threads here in this forum and i rarely find threads regarding Merging multiple WAR to a single EAR for deployment (CMIIW).
    Anyway, i have an issue reagarding my applications.
    Currenty, I have a lot of web applications, and each of them is deployed as a single EAR file into the weblogics 10.3.1. And lots of EAR is then deployed to a single Managed Server in WLS.
    From reading many references, it seems that what i have done is not entirely correct, because of the inefficient use of resources in a single Managed server in WLS (lots of EAR in a single Managed Server (MS) may takes more overhead cost).
    Therefore, i am planning to merge those small applications (EAR) to a single bigger EAR, so that it will reduce the numbers of EAR in a single managed server.
    Currently, we are trying to merge the small application as WAR and combine them to EAR. FYI, we are using ADF based web application, thus, each web application (WAR) will have its own adfc and each.
    At this moment, we are able to deploy a single EAR with 2 WARs inside it. However, when we try to run the application, only 1 application is able to be run. The other one is giving me "404 Page not Found".
    By reading the forum, there is a lead on using adfc-setting.xml. We've tried using that but still did not work (probably our adfc-settings.xml is not correct).
    My question is, are there any more references on how to merge WAR files to a single EAR from JDEV and deploy it to WLS 10.3.1. or anybody want to share their experiences?
    Thank you in advanced...

    Is a different context root specified for the 2 web apps.
    <application>
    <display-name>test</display-name>
    <module>
    <web>
    <web-uri>webapp1.war</web-uri>
    <context-root>webapp1</context-root>
    </web>
    </module>
    <module>
    <web>
    <web-uri>webapp2.war</web-uri>
    <context-root>webapp2</context-root>
    </web>
    </module>
    </application>

  • Split a record into multiple records

    Hi,
    I have situation where i need to split a record into multiple records.
    InputData :
    value|BeginDate |EndDate
    15 |2002/10/15|2002/10/16
    13 |2002/10/13|2002/10/20
    19 |2002/10/19|2002/10/23
    10 |2002/10/10|2002/10/12
    OutPut :
    10 |2002/10/10|2002/10/12
    13 |2002/10/13|2002/10/15
    15 |2002/10/15|2002/10/16
    13 |2002/10/16|2002/10/19
    19 |2002/10/19|2002/10/23
    Thanks

    Hi ,
    As a far I understood from your example ,
    I have few questions...
    1. You have information about the patient in a 1 source table.
    2. how u are identifying for patient X u need 5 rows to be created. R u storing these informations in seprate table or how ...
    3. if you have these information in a seperate tables ..... a simple cross join in ODI should get you the expected result.....
    Or give some more information with a example ..that would be great ...
    Thanks

  • Can I export a single file into multiple files?

    Is there an option or a plugin that would allow me to set markers in the audio, and then have Soundbooth export the audio into multiple files?
    As an example, let's say I have a 1 minute audio file. I place a marker at 0:00 and another marker at 0:10 and a third marker at 0:30. I then would select Export Multiple and I would end up with three seperate wav files, one 10 seconds long, the second 20 seconds long and the last one 30 seconds long.
    Thanks

    Hi laforcej
    Open the PDF In Acrobat ...
    Go to Tools -> Pages -> Extract
    Now Select the Page Number you Want to Extract and Save them

  • Split a record into multiple records (rows)

    I am using ODI to move data from source system to target system .Both are Oracle . In the source system I have a record which I need to split into multiple records or rows in the target system based on some rules . How can I achieve this in ODI . Please explain

    Hi ,
    As a far I understood from your example ,
    I have few questions...
    1. You have information about the patient in a 1 source table.
    2. how u are identifying for patient X u need 5 rows to be created. R u storing these informations in seprate table or how ...
    3. if you have these information in a seperate tables ..... a simple cross join in ODI should get you the expected result.....
    Or give some more information with a example ..that would be great ...
    Thanks

  • How do you make one long track into multiple tracks?

    How do you make one long track in itunes into multiple tracks? Is there a way to do that?

    I found another solution too through Garageband. I don't know if it was easier, but I liked this way of creating seperate tracks.
    First, You put the long track into Garageband.
    -then you create a New Basic Track under Track Tab-create as many of those as tracks you want to make
    -also make sure the headphones button is lit up under each New Basic Track-this allows it to be a 'solo' track.
    -then you can start cutting music-with the long strip find where you want to split into a new track and drag that half down into each New Basic Track.
    -Once you are done, press Option Z and a purple little triangle will appear up by the measures. drag the triangle to the end of the first track-this allows it when sharing to itunes to just record the particular track you want, it puts a stop/end to that track.
    -then, make sure the track you want to share is highlighted the bright orange and go to share, 'send to itunes'
    -it will send that to itunes and you can rename it in itunes.
    -Go back to Garageband-delete the first track you successfully shared and move the next one up to where that one was. Slide it accross to the left so it is at the beginning, press option Z and move the purple triangle where you want it to be...and you are good to repeat until all your tracks are done!
    I am a very visual person, and this helped to see where I was cutting each track, just another way!

  • App with multiple WAR files

    We have a customer self-service web site, freshly re-implemented using facelets in a WAR file. It works fine. We are just now starting to re-implement a second significant component from the previous generation. This component is pretty complicated, so we would like to maintain and deploy it individually in its own WAR. However, we would like this component to blend smoothly in the primary application. Ideally, the main app would create a borderless window in which this component would live, but everything inside that window would be controlled by the second WAR file. Both WAR files run on the same web server, and if it helps, can run in the same session.
    In previous times, we might have done this with an iframe to contain the second application. But I'm well aware of the downsides of iframes and that they are strongly discouraged in new apps, What is the current recommended approach for blending multiple WAR files into what appears to be a single application to the end user? Portlets? Can I easily make a simple facelets application (our primary app) into a portlet container without making it into a full scale portal? All the portlet examples I find show the portlet in a window that the user can minimize or maximize. Can our primary app hide those window controls so that the contents of the second WAR appear to be part of the primary application?
    Thanks for any and all suggestions. I've spent a couple hours searching for "multiple war files" and "external war" and didn't find any useful leads.

    But I'm well aware of the downsides of iframes and that they are strongly discouraged in new apps,If it solves your problem, what would be bad about it? I wouldn't use iframes to merge applications from different hosts, but when the sub-applications are part of one larger application that you have under your own control, then why not?
    It is fine to follow current trends, but only if it is intelligent to do so.

  • Splitting comma seperated column data into multiple rows

    Hi Gurus,
    Please help me for solving below scenario. I have multiple value in single column with comma seperated values and my requirement is load that data into multiple rows.
    Below is the example:
    Source Data:
    Product         Size                                 Stock
    ABC              X,XL,XXL,M,L,S                 1,2,3,4,5,6
    Target Data:
    Product         Size                                 Stock
    ABC              X                                     1
    ABC              XL                                   2
    ABC              XXL                                 3
    ABC              M                                    4
    ABC              L                                      5
    ABC             S                                        6
    Which transformation we need to use for getting this output?
    Thanks in advance !

    Hello,
    Do you need to do this tranformation through OWB mapping only? And can you please tell what type of source you are using? Is it a flat file or a table?
    Thanks

Maybe you are looking for