Emails Architecture for big J2EE Applications

Hi all !
Need some inputs regarding design of email sending mechanism in huge J2EE applications.
We are having a medium based application (say 2 lakh subscibers) but may have a increase in
subsciber base sooner. Its a 3-tier application using Struts (JSP), EJB & Database is Oracle 8i.
Till now we are using Oracle jobs for submitting emails (asynchronus), it works fine for small subscriber
base but increase in subscriber base will increase load on database and we want to avoid that.
Concerned points are :
1. What architecture is followed in big J2EE applications for sending emails asynchronously ?
2. How much feasible is using JMS provided with weblogic app server for huge applications ?
3. Does using messaging queues at app server end will degrade performance considerably ?
Please see if anyone can help out in this..
Puneet Gandhi

I've used JMS + Weblogic (2 quad processor servers in cluster) and JMS in a system that took between 5,000 & 10,000 new users per day. It held up fine.
I'm not an architect (more of a developer), but I would create a serializable NotificationBean, send it to a MessageBean, and let the MessageBean send the email. Providing your queues are persisting and that you limit the number of MessageBeans to something reasonable, I don't see why you should have performance problems.
Alternatively if you use MQ I believe it has an email node that you can send messages to. Don't know much about this though.

Similar Messages

  • Architecture for big ADF Applications

    My developer team finish a web application that contain about 350 web pages, 45 entity object and like 90 view object between 12 app modules.
    The application problem is that Running low.
    I use all tips i get from Performance and tunning guide... so i think the problem is the architecture is building.
    Is correct use one proyect for model think but is correct use only one viewController Project??
    maybe we can get more performance using multiples viewCOntroller projects each one using dependence from same model project and making multiples war file attached in one ear file??
    Thanks for tips...
    NOTE: I am using ADF 11 with webLogic.. All queries using in the application run in 50 - 100 ms, so are good times from database..
    Edited by: user10363801 on 3/05/2011 03:52 PM

    To profile your page from a browser's point of view, you can try using YSlow and Firebug with Firefox. Install firebug then install YSlow: https://addons.mozilla.org/en-US/firefox/addon/yslow/
    Note: this is only from the browser's point of view. This will reveal which resources(css, js, images, etc) are taking time to load. It will also give you some hints. Some of the problems it will report might be out of your control(e.g. the location <script> tags).
    You can also turn on the logging for BC layer so you can see the queries the BC is firing. Get those query and try to profile those using Explain Plan. If you see a lot of Full table scans in your queries, then that would be a good place to do some optimization.
    Edited by: Hyangelo on May 4, 2011 11:06 AM

  • Suitable for big enterprise applications?

    Hello,
    I am an advocate of Apex in our Oracle Forms shop, but received the following statement: "I am afraid that because of its 2 tier architecture (entire processing is taking place in the DB) it is not suitable for big enterprise applications".
    Please help me respond to this.
    Not by saying "yes, it is" or "no, it is not, the person is right", but by saying why it is or it is not.
    References would be nice too.
    Thanks very much, in advance,
    Gabor

    As the Director of IT for my company, here's why we use APEX as our main data entry/reporting solution:
    1) Centralized data. All the data resides in a single place. No duplication and no wondering "Is this everything?"
    2) Anywhere access. Because it is web/browser based, your users can gain access to the system whether at work or on the road. My company operates in the transportation industry across more than 8 states and we support many traveling managers. Web-based access and wireless connectivity enable them to be anywhere and get access to real-time data.
    3) Instant deployment and updates. With APEX, content and new functionality can be instantly deployed across an entire organization without the need for expensive software management agents. It also eliminates versioning problems because it ensures everyone is using the same version. You can't do it that simply with a normal enterprise application.
    4) Cross-platform Compatability. Again, because everything is browser-/standards-based, users can use Apple, Windows, Linux, smartphones, etc. Most standard applications have to have specific components written to interact with each type of device or operating system. With web applications, you can develop once and deliver everywhere.
    5) Rapid development. I can have a basic application developed including table definitions, etc. in a matter of days BY MYSELF.
    About the comment, I'd like to know what types of enterprise applications AREN'T 2-tiered or even 3-tiered applications? You have a presentation layer and a data layer in all applications; the application doesn't house the data itself. The main difference between APEX and many other applications is the delivery method: instead of a proprietary/internal transfer of data between the data layer and the presentation layer, it's being run out over the Internet. Frankly, the concern isn't about the tiers, it's about something else and the objector doesn't want to tell you the real reason.

  • Login module for the J2EE application

    Hi ,
    I am trying to use the BasicPasswordLoginModule for my J2EE application which will be deployed in the SAP J2EE engine.My application will not be accessed through the portal.
    I am having a login screen in my application for which i want to use the already avaliable login module. ie.. BasicPasswordLoginModule.
    When i am trying to get the login(). i am getting the following the error.
    "javax.security.auth.login.LoginException: No LoginModules configured for BasicPasswordLoginModule".
    Please let me know what needs to be done.
    PS: The version environment is CE 7.1
    Regards
    Abu Bakar

    Hi Julius
    I am totally confused, my application is a pure J2EE application which has only one screen which just displays the details. And i want only the login screen to be implemented. I have gone through a couple of dec from sap which tells to created a custom login module if requiredl but i want to user the FORM based authentication and use the BasicPasswordLoginModule(in-built in WAS)
    All that i am doing is written a web.xml with the following information:
    <login-config>
       <auth-method>FORM</auth-method>
       <form-login-config>
       <form-login-page>/home.jsp</form-login-page>
       <form-error-page>/relogin.jsp</form-error-page>
       </form-login-config>
      </login-config>
      <security-role>
        <role-name>App_Viewer</role-name>
      </security-role>
    web-j2ee-engine with following information:
    <security-role-map>
              <role-name>App_Viewer</role-name>
               <server-role-name>Administrator</server-role-name>
         </security-role-map>
         <login-module-configuration>
         <login-module-stack>
         <!-- Contains all login modules used for authentication -->
              <login-module>
              <!-- Contains information about one login module -->
                   <login-module-name>BasicPasswordLoginModule</login-module-name>
                   <flag>SUFFICIENT</flag>
                   <options>
                        <option>
                        <!-- The option UserNamePrefix determines that the user name must start with "Admin" -->
                        <name>UserNamePrefix</name>
                        <value>Admin</value>
                        </option>
                   </options>
              </login-module>
         </login-module-stack>
         <security-policy-domain></security-policy-domain>
    </login-module-configuration>
    And I am not sure, if the above mentioned details are enough. My implementation code is as follows:
    try {
              HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
              HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
              request.setAttribute(ILoginConstants.LOGON_UID_ALIAS, this.getUserName());
              request.setAttribute(ILoginConstants.LOGON_PWD_ALIAS, this.getPassword());
              UMFactory.getLogonAuthenticator().logon(request, response, "BasicPasswordLoginModule");
              status = success;
         } catch (Exception e) {
              e.printStackTrace();
              status = e.toString();
    In the NWA i have just configured the UserNamePrefix with Admin, thats all . Since the form login authentication method is already configure with the BasicPasswordLoginModule, I left it untouched.
    I also implemented a custom login module and deployed it but not sure how to use it in my code.
    Please let me know if i am in the rite track. Correct me if i am wrong. At the end of the day i want to use the login screen just to get authenticated. I am also not bothered about the password changing etc.. As the users who are going to use my application are the users in the Identity Management. Few portions of my screen should be allowed to be displayed based on the roles.
    PS: My application is not configured in the portal. Its an independent application deployed on the WAS(CE 7.1).
    Please advice
    Regards
    Abu Bakar

  • Is anyone doing disaster recovery for a J2EE application?

    We generally use database log shipping to maintain a standby database for our ABAP instances.  We can successfully fail over our production application to our disaster recovery site with no real issues.  With the J2EE instances (EP, ESS/MSS, BI, etc), we have a few concerns:
    hostname cannot change, without going through a system copy procedure, so we would have to keep the hostnames in DR the same. (for example, ref: oss note 757692 - changing hostname is not supported)
    fully qualified domain name - from what I understand, there are potentially issues with changing the fqdn, for example SSO certificates, BSPs, XI has issues, etc.
    we can't keep both hostname and fqdn the same between DR and production, or we could never do a DR test.
    Has anyone implemented disaster recovery for any SAP J2EE application that has run into these concerns and addressed them?  Input would be greatly appreciated regarding how you addressed these issues, or how you architected your disaster recovery implementation.
    Regards,
    David Hull
    The Walt Disney Company

    I haven't done this personally, but I do have some experience with these issues in different HA environments.
    To your first point:  You can change the hostname, note 757692 tells you exactly how to do it.  However like the note says, "Changing the name of a host server in a production system is not automatically supported by SAP."  When it says "supported by SAP" I think it means SAP the company, not SAP's software.  So I would contact SAP to see if this configuration would be covered under your service agreement.  Then you have to think about whether you want to do something that isn't "officially supported" by SAP.  Also I'm sure you'll need some kind of additional licensing for the DR systems as their hardware keys will de different.
    To your second point:  As for SSO certs (SAP Login Tickets), I think they should still work as long as the SID and client number of the issuing system remain the same.  I don't think they are hostname or fqdn dependant.  For BSPs I would think they would still work as long as they use relative paths rather than absolute paths.  And for XI... I have no idea what kind of issues may arise, I'm not an XI guy.
    Again, I haven't done what you're describing myself.  This is just based on my HA experiences.
    Hope this helps a little,
    Glenn

  • Portal User details and credentials for a J2EE application?

    Hi,
    I am trying to access a J2EE application which is deployed in  SAP Web Application Server. I want to maintain the security of this application depending the portal user. So I want to get the user id of the portal login to my J2EE application. For Example:
    A user with id "super" is logging into portal I want the userid "super" in my J2EE application how to get the userid to my J2EE application's servlet. Is this possible? If possible please tell how I can acheive it?
    Can I do it by creating HTTP System? If possible can u tell me where can I set the URL?
    Thanks,
    Ashok.

    hi,
    Certainly you can get the user id of the portal login in your J2EE application by using UME api's
    IUserFactory userFact = UMFactory.getUserFactory();
    getUserFactory().getUser(String uniqueID)
    getUserFactory().getUserByLogonID(String logonID)
    Also have a look at this
    http://help.sap.com/saphelp_nw04/helpdata/en/15/abdc3ed98f7650e10000000a114084/frameset.htm
    Instead  of url iview, it would be better to use AppIntegrator
    Also have a look at this
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/webinars/using the user management api with ep applications.pdf
    Hope it helps...
    Regards,
    Ganesh N
    Hope it helps...

  • Server Requirements for Launching J2EE Application on web

    Hi,
    I am new to web technologies, I apologize if I am asking a very basic question. I have a developed a J2EE Web Application for Online Assessment. I use Tomcat as server and MySQL database. I am expecting around 1000 users to simultaneously undergo our assessment. The assessment is a computerized adaptive assessment. For running the statistical calculation, I am keeping some information in the User Session, which will be around 10 Kilobytes per user.
    I was trying to understand what would be the minimum system requirements (on processing speed and ram) for supporting this application.
    Is storing more information of Session could be a bottle neck for me in supporting maximum concurrent users?
    Anticipating your help.
    Thanks
    De Paul

    You should just be able to put the SWF and wrapper HTML file
    on the server, and it just "serves" the swf and wrapper file. I
    don't think there is anything else you need, unless you are using
    LifeCycle DS.

  • Users for the j2ee application

    hi friends,
    i want to create the users for J2EE applications.
    can i create the users only for j2ee engine ?
    how can i create these users?
    if i want to implement the sap
    is it necessary to buy the licence for j2ee users?
    thanks&regards,
    srinivas.

    Hi
    To create the users in J2EE applications is not an issue, but the licensing is always applicable as it is applicable for ABAP applications.
    There are two ways depends on configurations:
    1. If the UME store is ABAP, then you can create the users at ABAP side using SU01 and at java side using http://<hostname>:5<Systemnumber>00/useradmin
    2. If the UME store is JAVA, then you can only create using http://<hostname>:5<Systemnumber>00/useradmin
    The licensing for JAVA applications depends as ABAP is having, if you use it as production you have to pay the charges. Please contact your local SAP representative for further details

  • What is the architecture for a kiosk application?

    Hi gurus,
    What do you think is the best option for a kiosk application, running on a touch screen station, that doesn't allow the user to switch to other apps?
    I'm think on an applet, or a web page, or a JFrame in full screen (if that is possible).
    Any ideas from your vast expertise?

    There's no way to to ensure that a user can not switch apps using pure java. The operation system has to support kiosk mode in order to do something like that (e.g. Windows WEPos).
    You can, however, get pretty close using a JFrame in full screen exclusive mode (http://download.oracle.com/javase/6/docs/api/java/awt/GraphicsDevice.html#setFullScreenWindow(java.awt.Window)). A tool like auto hotkey can be used to disable things like alt+tab, and you can disable the task manager in group policies.

  • Hundreds of roles for a J2EE application using SSO/OID

    We are starting to develope a J2EE software that will have hundreds of logical roles. These logical roles must be assignable to users and groups on OID.
    When prototyping this scenario, we were not able to make this work well enough. Namely, in OIDDAS (which will be used by the end users to administrate users), all the "role groups" and user groups are always shown in one listing.
    Ideally, what we would want is to only have configurable user groups visible in OIDDAS and all the fine-grained roles would be assignable to users and groups separately. Tthe "Roles Assignment" section in user/group edit screen is quite close to the idea though having hundreds of low-level roles listed there will make administration a bit complex.
    We have also considered hiding the raw "role groups" from OID by moving the low-level administration to Enterprise Manager, where multiple logical roles would be mapped to composite OID groups. However, we currently don't see this as a viable option since we don't want to allow normal login administrators access to OEM where they can break too many things.
    How have you guys solved the problem of mapping hundreds of roles to user-configurable groups and users? What would you suggest? Is our planned approach (map logical roles to LDAP groups) the wrong way to try to solve the issue? What would be a better way?
    Thanks in advance,
    Keke

    Hi Peter,
    Thanks a lot for your post.
    My requirement is such that I have to fetch nodes from WLP content management system and all the associated data (content, security related info) with that node. Since security for a particular node is in the form of roles, I need to fetch the roles list for the node under processing.
    However my application requirement is such that any user can ask for retrieval of node(its contents). In that case I need to check whether user lies in the list of roles defined for the current node (node for which user asked).
    Thus my requirement becomes: Checking whether a user is in the given list of roles.
    A careful investigation if the API's helped me find out a method isUserInRole(role, rolemap), but this method provides information for the logged in user only.
    My application will login thru admin credentials(weblogic, weblogic) and will chekc other users say bryan, linda are in the roles list of the nodes under procesing.
    Please guide.
    Regards,
    Shakti

  • Connection pool for big web application

    hi,
    i am developing an application which had more then 20 classes and each class use databases.
    i made an connection bean and use it for database connectivity but as my code expand and my application run for longer time i start getting error of connection limit.
    then i start using connection pool. in this i start using one connection for whole application.
    now i want that my
    1-whole application use that connection pool and i dont need to initialize it in different classes.
    2- The main problem is that may at a time i have to connect database with different user and these connections should remain active.
    my application will be used for enterprise level and remain active for months .
    following is my connection pool
    public class ConnectionPool implements Runnable
          private Log log=new Log();
          private String driver, url, username, password;
          private int maxConnections;
          private boolean waitIfBusy;
          private Vector availableConnections, busyConnections;
          private boolean connectionPending = false;
          public ConnectionPool(String driver, String url,String username, String password,int initialConnections, int maxConnections, boolean waitIfBusy) 
              this.driver         =     driver;
              this.url            =     url;
              this.username       =     username;
              this.password       =     password;
              this.maxConnections =     maxConnections;
              this.waitIfBusy     =     waitIfBusy;
              if (initialConnections > maxConnections)
                initialConnections = maxConnections;
              availableConnections = new Vector(initialConnections);
              busyConnections = new Vector();
              try
                  for(int i=0; i<initialConnections; i++)
                    availableConnections.addElement(makeNewConnection());
              catch(Exception e)
                log.write(e.getMessage());
          }//EO constructor
      public synchronized Connection getConnection()
             if (!availableConnections.isEmpty())
                  log.write("Total connections="+availableConnections.size());
                  Connection existingConnection =  (Connection)availableConnections.lastElement();
                  int lastIndex = availableConnections.size() - 1;
                  availableConnections.removeElementAt(lastIndex);
                  // If connection on available list is closed (e.g.,it timed out), then remove it from available list
                  // and repeat the process of obtaining a connection. Also wake up threads that were waiting for a connection because maxConnection limit was reached.
                        try
                            if (existingConnection.isClosed())
                              notifyAll(); // Freed up a spot for anybody waiting
                              return(getConnection());
                            else
                              log.write(  "in available connection"  );
                              busyConnections.addElement(existingConnection);
                              return(existingConnection);
                        catch(SQLException se)
                            log.write(se.getMessage());
              } else {
                        // Three possible cases:
                        // 1) You haven't reached maxConnections limit. So establish one in the background if there isn't
                        //    already one pending, then wait for the next available connection (whether or not it was the newly established one).
                        // 2) You reached maxConnections limit and waitIfBusy flag is false. Throw SQLException in such a case.
                        // 3) You reached maxConnections limit and waitIfBusy flag is true. Then do the same thing as in second
                        //    part of step 1: wait for next available connection.
                        if ((totalConnections() < maxConnections) &&  !connectionPending)
                          makeBackgroundConnection();
                        else if (!waitIfBusy)
                            log.write("Connection limit reached");
                        // Wait for either a new connection to be established (if you called makeBackgroundConnection) or for
                        // an existing connection to be freed up.
                        try {
                          wait();
                        catch(InterruptedException ie)
                          log.write(ie.getMessage());
                  // Someone freed up a connection, so try again.
                return(getConnection());
              }//EO main if-else
          return null;
    }//EO getconnection method
      // You can't just make a new connection in the foreground
      // when none are available, since this can take several
      // seconds with a slow network connection. Instead,
      // start a thread that establishes a new connection,
      // then wait. You get woken up either when the new connection
      // is established or if someone finishes with an existing
      // connection.
      private void makeBackgroundConnection() {
        connectionPending = true;
        try {
          Thread connectThread = new Thread(this);
          connectThread.start();
        } catch(OutOfMemoryError oome) {
          // Give up on new connection
          log.write(oome.getMessage());
      public void run() {
        try {
          Connection connection = makeNewConnection();
          synchronized(this) {
            availableConnections.addElement(connection);
            connectionPending = false;
            notifyAll();
        } catch(Exception e) { // SQLException or OutOfMemory
          // Give up on new connection and wait for existing one free up.
          log.write(e.getMessage());
      // This explicitly makes a new connection. Called in
      // the foreground when initializing the ConnectionPool,
      // and called in the background when running.
      private Connection makeNewConnection()
        //log.write("make new connection with  "+url+" "+username+" "+password +" and driver= "+driver);
        Connection connection=null;
          try
            // Load database driver if not already loaded
            //Class.forName(driver);
             DriverManager.registerDriver(new OracleDriver());
            // Establish network connection to database
            connection =  DriverManager.getConnection(url, username, password);
                    if( connection.isClosed() )
                      log.write("ooooooops no connection");
                    else
                      log.write("yahoooo get connection");
          catch(Exception e)
            log.write(e.getMessage());
        return(connection);
      public synchronized void free(Connection connection) {
        busyConnections.removeElement(connection);
        availableConnections.addElement(connection);
        // Wake up threads that are waiting for a connection
        notifyAll();
      public synchronized int totalConnections() {
        return(availableConnections.size() + busyConnections.size());
      /** Close all the connections. Use with caution:
       *  be sure no connections are in use before
       *  calling. Note that you are not <I>required</I> to
       *  call this when done with a ConnectionPool, since
       *  connections are guaranteed to be closed when
       *  garbage collected. But this method gives more control
       *  regarding when the connections are closed.
      public synchronized void closeAllConnections() {
        closeConnections(availableConnections);
        availableConnections = new Vector();
        closeConnections(busyConnections);
        busyConnections = new Vector();
      private void closeConnections(Vector connections) {
        try {
          for(int i=0; i<connections.size(); i++) {
            Connection connection =
              (Connection)connections.elementAt(i);
            if (!connection.isClosed()) {
              connection.close();
        } catch(SQLException sqle) {
          // Ignore errors; garbage collect anyhow
          log.write(sqle.getMessage());
      }i get this code from internet, in which it also mention that use following code
    public class BookPool extends ConnectionPool {
    private static BookPool pool = null;
    private BookPool(...) {
    super(...); // Call parent constructor
    public static synchronized BookPool getInstance() {
    if (pool == null) {
    pool = new BookPool(...);
    return(pool);
    }if some one want to use it for whole application then use connection pool by BookPool,
    now main point is i m not getting the BookPool class could some one explain it to me???
    and second by using it can i connect to different users of DB at a time, if cant then how i can.
    its good if some one explain it by little code.
    thxxxxxxxxxxxxxxxxxx

    If this is a real, serious application and not just for practice, then why are you trying to write your own connection pool implementation?
    You'd better use Jakarta's Commons Pool and Commons DBCP, which are widely used, well tested implementations of connection pools.
    If this is a web application running in a J2EE container, you'd normally configure the connection pool in the container. The container will register the pool in JNDI and you'd look it up in JNDI from your application.
    Here's some documentation on how to do that in Tomcat 5.5: JNDI Datasource HOW-TO

  • WebLogic 10 support for old J2EE application

    Hi,
    we have an application written with Java 1.4 and EJB 2.0 (+ Hibernate 3.0, + Struts 1.3.8).
    Will it work in WebLogic server as is (I suppose we would need to change descriptors?) or we will have to re-write the application in EJB 3.0?
    Thanks

    I believe this should work. In fact you'll want to leave the deployment descriptors alone so they indicate the correct level of the specification that the application was developed for:
    http://edocs.bea.com/wls/docs100/compatibility/compatibility.html
    http://edocs.bea.com/wls/docs100/ejb/overview.html#wp1116252

  • Which is the best and user freindly IDE for developing  J2EE applications ?

    Please advice me if there is any good IDE for developing all kind of Java applications.
    I m confused about which IDE to use.
    I have Searched on Net also. and most of the answers i found was for JBuilder and JBoss.
    But cant confirm until u guys suggest me.
    Because i think this is the best place to ask questions about java.
    Please advice

    i would prefer Eclipse rather than JBuilder.

  • How can imp an existing html page for developing j2ee application?

    I have a page in html souce code, that is save from an existing portal page, I need rewrite it as jsp, j2ee. in jdeveloper 10.1.3, how can I import that html souce then I edit on this.
    thanks

    how can I map the input to the java file? by name or by property?
    thanks

  • Architecture for product selector application

    I am working on a Flex app that will recommend a product based on input that the user enters in a viewstack.  The viewstack has 5 pages and as a user selects checkboxes and the search is being narrowed down.  The data is in an XML.
    I did some filtering on the XML data for the first part of the viewstack but it seems that I need a way to save/store the narrowed srach so the next section in the viewstack can be evaluated using the narrowed-down list created in the first part... and so on.
    There is probably a better approach to this and I'm new to Flex so any information you can provide would be helpful.
    Thanks

    Hi,
    Use creationPolicy="all" property of the ViewStack.Then you can apply the sampe approach which you have applied on the
    First Child of viewstack. It does not matter then that the Check Box of which  one Child of viewstack you are using then.
    Let me know if you have any issue with this.
    with Reagards,
    Shardul Singh Bartwal

Maybe you are looking for