Best way to implement connection pooling with tomcat4.0?

Hi all!
I need your help:
What's the best way to implement connection pooling (Oracle Database) with tomcat 4.0?
I only found ways to implement it in tomcat 4.1, not in 4.0....
Thanks!
Michael

You can use a Datasource managed by tomcat. Earlier versions of tomcat used Exolab's Tyrex for the implementation of the Datasource API which uses connection pooling. Current version uses commons-dbcp and commons-pool (jakarta projects) I think.
You've got to declare the Datasource in server.xml and then in web.xml of your web app.

Similar Messages

  • The best way to implement connect pool?

    Hi:
    In my web application, I use javabean to access database for JSP, Because a lot of poeple will access my site, I need coonection pool. Then, If I still use JSP,Is it right I should use javabean to access coonection pool? If it is, Am I need another connection pool bean? Or I should switch to Servlet , I might need write a ancestor servlet to access the pool, and other servlet extend the ancestor servlet. Is there other suggestion for me?
    I am a newer to java, any suggestion will be greatly appreciated!
    Thanks a lot!
    xufang

    Hi, Gregor
    Thanks for your reply, I instance my DBConnectionManager in the Bean's constructor as:
    connMgr= connMgr.getInstance();
    and in the bean's getConnection method, I request a connection provided by the pool as:
    Connection dbCon = connMgr.getConnection("idb");
    and and in the bean's execSQL method , I use the dbCon as:
    s = dbCon.createStatement( );
    ResultSet r = s.executeQuery(sql);
    The problem is when JSP go to bean.getConnection,it's all right. But when JSP execute bean.execSQL, There is always wrong because the dbConn I get from the bean's getConnection method if null ! Can you tell me what's the problem arrives?
    Thanks,
    xufang

  • Repost-Best way of using connection pooling

    I am reposting this, seems best suitable in this category.
    I am using Eclipse 3.1 along with Tomcat 5.0, MySQL 4.1, J2EE1.4. I could set up the JNDI Dataresource connection pooling and tested with small test servlet. Now thinking of having common methods for getting connection / closing / commiting ....etc.
    I wrote following. [Please let me know whether it is correct way of doing it - as i am not very sure]
    package common;
    import java.sql.*;
    import javax.sql.*;
    import javax.naming.*;
    import org.apache.log4j.Logger;
    public final class connectionManager {
         private static Logger logger = Logger.getLogger(common.connectionManager.class);
         public connectionManager() {}
         public static Connection getConn () throws NamingException, SQLException
    //JNDI DataSource connection pooling
              Connection conn = null;
              try{
                   Context initContext = new InitialContext();
                   Context envContext  = (Context)initContext.lookup("java:/comp/env");
                   DataSource ds = (DataSource)envContext.lookup("jdbc/TQ3DB");
                   conn = ds.getConnection();
              }catch (NamingException ne) {
                  new GlobalExceptionHandler(logger, ne);
                   conn = null;
                   throw new NamingException();
              }catch (SQLException e){
                   new GlobalExceptionHandler(logger, e);
                   conn = null;
                   throw new SQLException();
              return conn;
           }//getConnection
         public static void commit(Connection conn) throws SQLException
              conn.commit();
         public static void rollback(Connection conn) throws SQLException
              conn.rollback();
           public static void setAutoCommit(Connection conn, boolean autoCommit)
                                        throws SQLException
                conn.setAutoCommit(autoCommit );
         public static void closeConnection(Connection conn) throws SQLException{
              if (conn != null) {
                   conn.close();
                   conn = null;
         }//closeConnection
         public static void closeResources(ResultSet oRS, PreparedStatement pstmt) throws SQLException
              if (oRS != null) {
                   oRS.close();
                   oRS = null;
              if (pstmt != null) {
                        pstmt.close();
                        pstmt = null;
         } // closeResources
    }//ConnectionManager
    I am having a login form which submits user name and password. I am checking this against the database. Following is the servlet to do that.
    package login;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import common.*;
    public class loginServlet extends HttpServlet {
         public void doGet(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException {          
              doPost(request, response);
         }//doGet
         public void doPost(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException,IOException{
              String userId = request.getParameter("userId");
              String password = request.getParameter("password");
              ** call a method to validate the password which will return the
              ** User Name for authorized users and null string for un-authorised.
              String uName = validateUser(userId, password);
              //if uName is null .. user is not authorized.
              if (uName == null){
                   //redirect to jsp page with error message
                  RequestDispatcher rd =
                       getServletContext().getRequestDispatcher("/jsps/mainmenu.jsp");
                  if (rd != null){
                       rd.forward(request,response);
              else{
                   // the user is valid - create a seesion for this user.
                   HttpSession userSession = request.getSession(true);
                   // put the user name session variable.
                   userSession.setAttribute("userName", uName);
                   //redirect to Main menu page
                   RequestDispatcher rd =
                        getServletContext().getRequestDispatcher("/jsps/mainmenu.jsp");
                   if (rd != null){
                        rd.forward(request,response);
         }// end of doPost
         private String validateUser(String userId, String password)
                   throws SQLException{
              String returnVal = null;
              connectionManager cm = new connectionManager();
              Connection conn = null;
              PreparedStatement pstmt = null;
              ResultSet oRS = null;
              try{
                   //get the connection
                   conn = cm.getConn ();
                   //get records from user table for this user id and password
                   String sQry = "SELECT  user_login FROM user "
                             + "where user_login = ? AND user_pwd = ? ";
                   pstmt = conn.prepareStatement(sQry);
                   pstmt.setString(1, userId);
                   pstmt.setString(2, password);
                   oRS = pstmt.executeQuery();
                   //check for record
                   if (oRS.next()) {
                        returnVal = oRS.getString("user_login");
                   }else {returnVal = null;}
                 }catch (Exception e){            
                      returnVal = null;
              }finally{
                   cm.closeResources(oRS, pstmt);
                   cm.closeConnection(conn);
              return returnVal;
    }// end of servlet class
    But i am unable to compile it and i am also getting lots of warnings.
    I am getting error at line
    1)String uName = validateUser(userId, password);
    Unhandled exception type SQLException loginServlet.java TQ3/WEB-INF/src/login line
    Following warnings:
    2)For loginServlet Declaration
    The serializable class DBTest does not declare a static final serialVersionUID field of type long loginServlet.java
    3)The static method getConn() from the type connectionManager should be accessed in a static way
    4)The static method closeResources(ResultSet, PreparedStatement) from the type connectionManager should be accessed in a static way
    5)The static method closeConnection(Connection) from the type connectionManager should be accessed in a static way
    Definitely I am doing it wrong but exactly where? I am having very strong doubt the way i am using connections is not the correct way. Pls help me.
    regards
    Manisha

    I am in a search of best way to use connection pooling. Initially was using simple JDBC call, then modified to JNDI, afterwards tried to have common class. Later came accross the idea of Singleton/Static. I wanted to have a common class which will handle all connection related issues and at the same time give good performance.
    With due respect to all Java Gurus: i got all from web articles/tutorials/java forum etc. There is a long discussion regarding Singlet vs static in this forum. But finally got confused and could not figure out in my case which method shall i make use of, so tried both.
    What I want is somebody pointing out flwas inside my 2 code snippets and guide me about which method shall i adopt in future.
    Static way:
    package common;
    import java.sql.Connection;
    import javax.sql.DataSource;
    import java.sql.SQLException;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public final class ConnectionManager_Static {
         private static InitialContext ctx = null;
         private static DataSource ds = null;
         public ConnectionManager_Static(){     }
         //as the staic method is updating static var i am synchonizing it
         private static synchronized void getDatasource () throws NamingException, SQLException
              if (ds == null){
                   ctx = new InitialContext();
                   ds = (DataSource)ctx.lookup("java:comp/env/jdbc/MySql");
         //making getConnection() also static as it is not instance specific     
         public static Connection getConnection () throws NamingException, SQLException, Exception
              Connection conn = null;
              try{     
                   if (ds == null) {getDatasource ();}
                   if (ds != null) {
                        conn = ds.getConnection();                 
              }catch (Exception e){
                   throw new Exception("From ConnectionManager_Static",e);
              return conn;
           }//getConnection
    }Singleton:
    package common;
    import java.sql.*;
    import javax.sql.*;
    import javax.naming.*;
    public final class ConnectionManager_Singleton {
             private static ConnectionManager_Singleton INSTANCE = null;
              private DataSource datasource = null;
              // Private constructor for singleton pattern
             private ConnectionManager_Singleton() throws NamingException{
                   Context ctx = new InitialContext();
                   datasource = (DataSource)ctx.lookup("java:comp/env/jdbc/MySql");
             //synchronized creator for  multi-threading issues
             //another if check to avoid multiple instantiation
             private synchronized static void createInstance() throws NamingException{
                 if (INSTANCE == null) {
                     INSTANCE = new ConnectionManager_Singleton();
             public static ConnectionManager_Singleton getInstance() throws NamingException {
                 if (INSTANCE == null) createInstance();
                 return INSTANCE;
              public Connection getConnection() throws Exception
                   Connection con = null;
                   try{
                        con = datasource.getConnection();
                   }catch(Exception e){
                        throw new Exception("From connection manager singleton ", e);
                   return con;
    }Sorry, It's becoming long.
    Thanaks in advance,
    Manisha

  • Best way to implement selectOneRadio component with "other" option

    I have a selectOneRadio component that has an other option (see below). If the other option is selected I need to pull the value out of a text field. Any ideas on the best way (or any way) to
    implement this?
    This is how it looks on the screen...
    Please select one...
    o 10.00
    o 20.00
    o 30.00
    o Other amount [    ] <--- Text box
    When I try to access the value of the selectOneRadio component in the backing bean I get the index of the selection instead of the item value that was selected.
    This is in 11g.
    Any help would be appreciated.
    Thanks,
    Mike

    Hi Mike,
    I came up with the following codes as I assume you populate the selectOneRadio from a VO. The inputText will only be rendered if the "Others" option is selected. And you can get the actual ID of the selected items instead of their index.
    /** Jspx **/
    <af:panelFormLayout partialTriggers="rdbPrice">
      <f:facet name="footer"/>
      <af:selectOneRadio value="#{bindings.SampleVO1.inputValue}"
                         label="#{bindings.SampleVO1.label}"
                         required="#{bindings.SampleVO1.hints.mandatory}"
                         shortDesc="#{bindings.SampleVO1.hints.tooltip}"
                         id="rdbPrice" autoSubmit="true">
        <f:selectItems value="#{bindings.SampleVO1.items}"/>
      </af:selectOneRadio>
      <af:panelLabelAndMessage label="Label 1"
                               rendered="#{bindings.priceId.inputValue == 98}">
        <af:inputText label="Label 1"
                      binding="#{backingbean.txtOthers}"
                      simple="true"/>
      </af:panelLabelAndMessage>
    </af:panelFormLayout>
    /** PageDef **/
    <bindings>
      <list ...>
      </list>
      <attributeValues IterBinding="SampleVO1Iterator" id="priceId">
        <AttrNames>
          <Item Value="priceId"/>
        </AttrNames>
      </attributeValues>
    </bindings>
    /** backing bean **/
    public void yourMethod() {
        String priceId = getBeanValue("#{bindings.priceId.inputValue}").toString();
        System.out.println(priceId);
    }Note:
    1) It is assumed that the value 98 refers to the "Others" ID value.
    2) The priceId attribute type in the SampleVO has to be changed to Long (my default was Number).
    3) The getBeanValue() is the usual getValue call of a ValueBinding or ValueExpression.
    http://brendenanstey.blogspot.com/2007/03/how-to-reduce-coding-by-extending.html
    Regards,
    Chan Kelwin

  • Implement Connection Pooling

    Hi,
    I want to create a pool of connection objects and when multiple users query the database, the connection should be returned from the pool to the different users. What is the best way to implement this? Could I use javax.sql package or dbcp classes to implement this? Please provide a suggestion.
    Thanks

    user13718790 wrote:
    Hi,
    I want to create a pool of connection objects and when multiple users query the database, the connection should be returned from the pool to the different users.It doesn't work like that. The connection cannot leave the application.
    If you have a server with threads then each thread can have a different connection.

  • Best way to implement m to n relation?

    Could you please give me some advice on the best way to implement m-n relations in apex?
    Example: I want to store server and database info. A server can have multiple database of course. But in case of a RAC database, the database can be running on multiple servers. So I have tables:
    create table SERVERS (id number primary key, name varchar2(30));
    create table DATABASES(id number primary key, name varchar2(30))
    and an m-to-n table
    create table SERV_DB(serv_id number references SERVERS(id), db_id number references DATABASES(id), instance_name varchar2(30))
    So the table SERV_DB can tell me e.g. that database PROD is running on server 'prdsrv1' with instance PROD1 and on server 'prdsrv2' with instance name PROD2
    How would you design an apex page to maintain this information (adding relations, updating instance names, etc)? I have a solution using checkboxes and 2 for-loops over htmldb_application.g_f40 (to process checkboxes) and g_f41 (to process text fields with instance names) and some delete statements but the logic behind it looks too complex for me. I am convinced that this can be done more simpler. Seems like a common problem to me, so I wonder if there is no out-of-the-box solution in apex for this?
    Could you please show me or create a small demo application with the solution that looks most elegant to you?
    Thanks,
    Geert

    Thanks for your reply. You modified the question slightly, but conceptually it is still the same. What you call the instances table corresponds with my serv_db table. I understand the solution you propose using the tabular report. If I see it correctly, you would have an insert button above the tabular report for each new relation (instance - server) you would want to add. This is ok for the case i used (databases, servers, instances) because there are relatively few relations. However I would not like this solution for other cases. E.g.:
    case: you have a list of persons and a list of tasks. You want to assign tasks to persons in a way that each person has multiple tasks to do and each task can be assigned to multiple persons.
    Suppose you add a new person, and you want to assign 15 tasks to him. The solution above (with the tabular report) would be quite some work because you would have to click 15 times on the insert button and on each click select a task from the select list. In this case it would be more appropriate to, after selecting the new person, see a list of all tasks (e.g. 30 tasks) with a checkbox in front, so you can mark 15 out of the 30 checkboxes and press submit. It gets more complex when you want to assign also an attribute to the relation, i.e. showing the list with all tasks, a checkbox in front and a select list next to each task where you can choose from e.g. "priority high" or "priority low" to indicate that this task is high or low priority for that person. Is there an easy way to implement that?

  • Displaying Multiple Values on GUI components - best way to implement

    Hi,
    my program needs to implement a basic function that most commercial programs use very widely: If the program requires that a GUI component (say a JTextField) needs to display multiple values it either goes <blank> or say something more meaningfull like "multiple values". What is the best way of implementing it?
    In particular:
    My data is a class called "Student" that among other things has a field for the student name, like: protected String name; and the usual accessor methods (getName, setName) for it.
    Assuming that the above data (i.e. Student objects) is stored in a ListModel and the user can select multiple "Students", if a JTextField is required to display the user selection (blank for multiple selections, or the student "name" for a single selection), what is the best (OO) way of implementing it? Is there any design pattern (best practice) for this basic piece of functionality? A crude way is to have the JTextField check and compare all the time the user selections one by one, but I'm sure there must be a more OO/better approach.
    Any ideas much appreciated.
    Kyri.

    Ok, I will focus on building a solution on 12c.
    right now I have used a USER_DATASTORE with a procedure to glue all the field together in one document.
    This works fine for the search.
    I have created a dummy table on which the index is created and also has an extra field which contains the key related to all the tables.
    So, I have the following tables:
    dummy_search
    contracts
    contract_ref
    person_data
    nac_data
    and some other tables...
    the current design is:
    the index is on dummy_search.
    When we update contracts table a trigger will update dummy_search.
    same configuration for the other tables.
    Now we see locking issues when having a lot of updates on these tables as the same time.
    What is you advice for this situation?
    Thanks,
    Edward

  • Best way to implement app wide process

    I am working on an application that has a list of art work in an sql report.. I want to be able to add each piece to a collection of items (which is stored in a table), so I added another column to the sql report to store the id of the art work. I am just wondering what is the best way to implement the process to insert the item to the collection of items. Since I want to do this from multiple pages - link from art work sql report; link from the edit page for a particular art work; and on the artists page where there is also an sql report, I thought it may be best to have an application process, to save duplicating the process on multiple pages.. however I don't think there's a way to pass the id of the item to the application process? as I was thinking best to have the application process conditional based on request, and then have the link as a doSubmit().
    So is it best just to have the link redirect to the same page, passing the id of the item, and then having a process that runs before header that inserts the item, then assigning the item to NULL?
    Thanks in advance,
    Trent

    Daniel:
    Thanks for the info. I have found that the IFRAME works nicely for some applications,
    however, some applications I want to re-write the front end to look better in
    the portal rather than screen scrape.
    Thanks for the help
    Ryan
    "Daniel Selman" <[email protected]> wrote:
    Ryan,
    Check out the thread (a few days old) titled "Different ways of creating
    portlets".
    Sincerely,
    Daniel Selman
    "Ryan Richards" <[email protected]> wrote in message
    news:3d2eda12$[email protected]..
    I have a few existing applications that I need to port over to portletsin
    Weblogic
    Portal 4.0. One application is a servlet based web application witha few
    html front-end
    screens. I am trying to determine how to do this in the best way. Ihave
    noticed
    that portlets behave differently inside the portal than do stand-aloneweb
    apps.
    Any help would be appreciated.
    The other web application is the Microsoft Outlook Web Access. (Thisone
    is going
    to be difficult because it is actually an ASP app. I dont know if thisis
    possible
    without building some proxy code between bea and iis.)
    Thanks
    Ryan

  • Strange behaviour when using connection pooling with proxy authentication

    All
    I have developed an ASP.NET 1.1 Web application that uses ODP.NET 9.2.0.4 accessing Oracle Database 8i (which is to be upgraded to 10g in the coming months). I have enabled connection pooling and implemented proxy authentication.
    I am observing a strange behaviour in the live environment. If two users (User 1 and User 2) are executing SQL statements at the same time (concurrent threads in IIS), the following is occurring:
    * User 1 opens a new connection, executes a SELECT statement, and closes this connection. The audit log, which uses the USER function, shows User 1 executed this statement.
    * User 2 opens the same connection (before it is released to the connection pool?), excutes an INSERT statement, and closes this connection. The audit log shows User 1, not User 2, executed this statement.
    Is this a known issue when using connection pooling with proxy authentication? I appreciate your help.
    Regards,
    Chris

    Hi Chris,
    I tried to reproduce your complaint, but was unable to. I didnt use auditting however, just a series of "select user from dual" with proxy authentication. You might want to see if you can put together a small complete testcase for this and open a sr with support.
    Cheers
    Greg

  • Best way to implement service in 3-tier webarchitecture

    Hi,
    What would be the best way to implement a service in the following 3-tier TopLink architecture: no ejb and a webclient (jsp/servlets)?
    Currently I have a server session type and a service pojo using a singleton SessionFactory. The service pojo is used by the jsp/servlets.
    Should the service pojo be a singleton? Should a SessionManager be used?
    In the examples on OTN a clientsession is directly acquired in the jsp/servlets.
    Thanks,
    Ronald

    Ronald,
    There are numerous ways to do this. I would recommend using the SessionFactory. The SessionFactory makes use of the SessionManager, which holds onto the singleton Server session. You can then acquire client sessions using the oracle.toplink.sessions.Session interface from the SessionFactory. There is no need to hold the SessionFactory in a singleton yourself and you do not need to reference the ClientSession directly either.
    We have introduced this latest approach to simplify coding. It will work in both the web architecture with JSP/Servlets accessing the sessions as well as within an EJB tier (Session/Message Driven beans).
    Doug

  • Event Structures​-best way to implement this UI?

    I am trying to write a VI to control & read data from 4 different "channels" (each measuring a DUT) at once.  I have written all the VI's for initializing instruments, communicating with the devices (VISA, GPIB), setting bias, reading data, etc...that has all completed. I just need to write the overall program with the user interface to allow the user to control these 4 channels & display the measured data.....as it turns out, this is the tricky part! My head is spinning from trying to figure out how to handle all the possible events.
    Basically for each channel, I want the user to be able to
    -enable/disable it  for measurement (e.g. if  there is no device loaded in Ch.3, we don't want to measure Ch.3..maybe disable/grey everything)
    -set bias conditions (only if channel enabled). Allow user to change bias "in real-time" by increment/decrementing (e.g. incrementing from 5.00 V to 5.01 V, for example).
    -turn biasing on/off (again, only if channel is enabled)
    Also,  I want each channel to display its measured data (e.g current, temperature reading)..every second or so. No graphs or anything fancy (for now! ), just numeric indicator. 
    Honestly, this all sounds so simple but I'm having trouble figuring out the best way to implement this, due to the fact that 1) there are multiple channels needing to be monitored for events  2) large number of user events that could occur (seems like at least 4 per channel - enabling/disabling, turning bias on/off, incrementing/decrementing bias values, etc ), Also the if a channel IS enabled, i want to be continously reading/displaying the data.  What is the best way to handle this? Should i have 4 separate while loops, each with an event structure to handle events for that particular channel..or will that give me grief somewhre? 
    Also, I have another nagging question. Pretty much all the examples I see re: Event Structures and booleans involve latched booleans, eg. buttons that are just pressed once and pop back up...e.g. buttons you press to tell it to complete a task (e.g. "Acquire Data" or "Stop") , and once it's pressed it's over and reset.  In my case, some of the booleans would not be latched...e.g. the "Enable Ch.2" button would be 'TRUE" as long as i want Ch. 2 to be read....does that make sense? Then, say hours later,  if i did want to disable that channel,  i would change it to "FALSE" and while that would be an "value change", the new value would not be "TRUE"..does that make sense? So  not sure if that would be dealt with the same way in an Event Structure. 
    Hope this all makes sense and many thanks in advance for any help!!!

    You're halfway there. I'd say the best solution is a producer/consumer structure, the event structure is used to generate queued commands to the consumer loop.
    All data is handled in the consumer loop, where you among other things have an array of clusters of channel/instrument settings. (I usually have several cluster, one for test data, one for instrument settings, one for general settings and so on)
    The event structure can have a 1 sec timeout, in which you queue up a Measure command.
    In the consumer, in the measure state you loop through your instruments and if enabled you measure them and update their indicators.
    The general (smart) way to setup the queue is with a cluster containing 2 elements, a typedef'd Command and a variant.
    This way you can send data with the command in any form which is then interpreted in the consumer.
    If, e.g. you press the Enable button on a channel, you can enqueue Enable and the channel number.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Best way to implement a simple read of multiple stings from a db

    Hello guys,
    I am trying to read a collection of countries (Strings) into a collection inside a Movie object. The countries reside in a separate DB table with a FK referencing the Movie.
    My questions:
    1) What is the best way to implement this? Do I need a seperate entity 'country' ? Is there a general way to read many strings into a collection?
    2) the countries list does not have to be updated, only read. How do I make sure it is not persistent?
    I have noticed that in my JPA implementation (in netbeans) I do not have something like CollectionOfElements (that is present in hybernate).
    Thank you,
    Marek

    >
    My questions:
    1) What is the best way to implement this? Do I need a seperate entity 'country' ? Is there a general way to read many strings into a collection?
    Probably yes, you need to have one entity for country.for getting the right answer, Post it here - Enterprise Technologies - Java EE SDK (http://forums.sun.com/forum.jspa?forumID=136)

  • Best way to implement a standard layout across application

    What is the best way to implement a standard layout across the application?  For example, I am converting an HTML/ColdFusion site to Flex and I need to keep the look of the existing site in the new Flex app.  I need a standard layout on every screen in the new app with a standard header, footer and left nav bar.  Do I need to add that code to every screen in the app or can I just create on layout file and call that into every screen?  Thanks!

    There a few that will help you, look for Form and validator.
    Sincerely,
    Michael
    El 16/05/2009, a las 14:01, lee704 <[email protected]> escribió:
    >
    Thanks.  Are there sample data entry apps in the Tour de Flex samples?
    >

  • Best way to implement request-response and still reliability

              HI,
              what is the best way to implement a request -response paradigm and still have
              the reliability that message will be 100% processed and give response...do i need
              to create the permanant queues with storage..
              anybody gives suggestions..
              Akhil
              

    Hi Akhil,
              Temporary destinations can only store non-persistent messages
              as per JMS spec - so they are not useful for reliable for holding
              responses that must survive longer than the life of the
              interested client. For persistence, you will need to use configured
              queues or durable subscriptions. For detailed
              discussion of request/response, I suggest reading the "WebLogic JMS
              Performance Guide" white-paper on dev2dev.bea.com. If you
              have many clients, or expect large message back-logs,
              there can be a performance impact when using selectors...
              FYI: There is a new pub/sub subscriber index enhancement
              that is available in 8.1 and
              in the latest service-packs for 6.1, 7.0.
              "Indexing Topic Subscriber Message Selectors To Optimize Performance"
              http://edocs.bea.com/wls/docs81/jms/implement.html#1294809
              This may be useful.
              Tom, BEA
              Akhil Nagpal wrote:
              > HI,
              > what is the best way to implement a request -response paradigm and still have
              > the reliability that message will be 100% processed and give response...do i need
              > to create the permanant queues with storage..
              >
              > anybody gives suggestions..
              > Akhil
              

  • Best way to implement auto increment in JPA.

    What is the best way to implement auto increment in JPA so that it will support all databases such as MySQL, MSSQL Server, Oracle etc. ? Or is there any way to set auto increment strategy in common place such as persistence.xml? Please help...

    All JPA strategies require something (like a table or sequence object) be in the database, with table sequencing being the most portable, though EclipseLink does allow custom sequence stratgies where you could use something else, such as the UUID. Sequencing is described here described here http://wiki.eclipse.org/EclipseLink/Examples/JPA/PrimaryKey with a custom UUID example shown here http://wiki.eclipse.org/EclipseLink/Examples/JPA/CustomSequencing .

Maybe you are looking for