How to SET Informix (ifxjdbcx.jar) LOCALES in Pool Properties - by G Moykin

Hi everybody,
Some users complain about setting the DB and Client Locales in Connection Pool Properties, when IBM Informix JDBC Driver (Type 4 XA) <b>ifxjdbcx.jar</b> is used. The usual way to set them is:<br>
<i>DB_LOCALE= …<br>
CLIENT_LOCALE= …</i><br>
But regardless of what is written, the Locales are NOT set. Does the Connection Pool transmit these properties correctly? Does the Driver set them? Both are true but with a very important specification: the right way to set them in the Connection Pool Properties field is:<br>
<b>IfxDB_LOCALE= …<br>
IfxCLIENT_LOCALE= …</b><br>
The appearance of prefix ‘<b>Ifx</b>’ is the clue.
Most of <b>set</b><i>PropertyName</i> Driver methods are standard such as:
<i>user</i> -> <b>setUser</b>; <i>password</i> -> <b>setPassword</b>; <i>serverName</i> -> <b>setServerName</b>
but in particular, IBM decided to give a name to set Locales Methods (w/o notify BEA) as:<br>
<i> public void setIfxDB_LOCALE(String string) {<br>
     Properties.setProperty("DB_LOCALE", string);<br>
}<br>
public void setIfxCLIENT_LOCALE(String string) {<br>
     Properties.setProperty("CLIENT_LOCALE", string);<br>
}</i><br>
Methods reside in (<b>ifxjdbcx.jar</b>) class <b>com.informix.jdbcx.IfxCoreDataSource</b>,
and the Driver class <i>com.informix.jdbcx.IfxXADataSource extends IfxCoreDataSource</i>.
According to a standard properties SET (such as user, password, databaseName, serverName etc.), BEA developers have written a brilliant class (in <b>weblogic.jar</b>) which retrieves the properties from the Connection Pool and invokes the corresponding Driver SET Methods:
<b>weblogic.management.console.utils.JDBC.testConnection</b> method determines whether the JDBC driver class is instance of <i>javax.sql.XADataSource</i>, and if it is, the method passes
the driver instance:
<i>XADataSource xadatasource =(XADataSource)Class.forName(yourDriverClass).newInstance();</i>
And the Connection Pool properties obtained from
<i>weblogic.management.configuration.JDBCConnectionPoolMBean_Stub.getProperties</i>
to the method
<b>weblogic.jdbc.common.internal.DataSourceUtil.initProps(null, xadatasource, properties);</b>
which via <b>weblogic.jdbc.common.internal.DataSourceUtil.initProp</b> method invokes the SETs methods of the driver.
<b>DataSourceUtil.initProp</b> method reads the corresponding ‘set property name’ and search through a Driver method <b>set</b><i>Propertyname</i>.
Do you get me?! If you have written: DB_LOCALE= … , the <i>initProp</i> method search for a Driver method called <b>setDB_LOCALE</b>.
Since IBM gave a name to set Locales Methods <b>setIfxDB_LOCALE</b>, you must set them in the Connection Pool Properties field as:<br>
<b>IfxDB_LOCALE= …<br>
IfxCLIENT_LOCALE= …</b><br>
Best Regards: George Moykin, Sofia, Bulgaria
e-mail: [email protected]<br>
Some of my decisions and fixes:
- Eliminate the problem ‘CHAR to Boolean’ automatic generation of Entity EJB Field in BEA Workshop EJB Project, when ‘new Entity bean from database table’ option is used.
- Eliminate the problem ‘Scan of table tablename failed: java.lang.NullPointerException’, when the user tries to create an Entity EJB from a DBMS table (‘new Entity bean from database table’) using BEA Informix JDBC Driver (Type 4) wlinformix.jar.
- Eliminate the problem ‘JDBC Pool Connection Leak/JTAConnection leak’.

Hi everybody,
Some users complain about setting the DB and Client Locales in Connection Pool Properties, when IBM Informix JDBC Driver (Type 4 XA) <b>ifxjdbcx.jar</b> is used. The usual way to set them is:<br>
<i>DB_LOCALE= …<br>
CLIENT_LOCALE= …</i><br>
But regardless of what is written, the Locales are NOT set. Does the Connection Pool transmit these properties correctly? Does the Driver set them? Both are true but with a very important specification: the right way to set them in the Connection Pool Properties field is:<br>
<b>IfxDB_LOCALE= …<br>
IfxCLIENT_LOCALE= …</b><br>
The appearance of prefix ‘<b>Ifx</b>’ is the clue.
Most of <b>set</b><i>PropertyName</i> Driver methods are standard such as:
<i>user</i> -> <b>setUser</b>; <i>password</i> -> <b>setPassword</b>; <i>serverName</i> -> <b>setServerName</b>
but in particular, IBM decided to give a name to set Locales Methods (w/o notify BEA) as:<br>
<i> public void setIfxDB_LOCALE(String string) {<br>
     Properties.setProperty("DB_LOCALE", string);<br>
}<br>
public void setIfxCLIENT_LOCALE(String string) {<br>
     Properties.setProperty("CLIENT_LOCALE", string);<br>
}</i><br>
Methods reside in (<b>ifxjdbcx.jar</b>) class <b>com.informix.jdbcx.IfxCoreDataSource</b>,
and the Driver class <i>com.informix.jdbcx.IfxXADataSource extends IfxCoreDataSource</i>.
According to a standard properties SET (such as user, password, databaseName, serverName etc.), BEA developers have written a brilliant class (in <b>weblogic.jar</b>) which retrieves the properties from the Connection Pool and invokes the corresponding Driver SET Methods:
<b>weblogic.management.console.utils.JDBC.testConnection</b> method determines whether the JDBC driver class is instance of <i>javax.sql.XADataSource</i>, and if it is, the method passes
the driver instance:
<i>XADataSource xadatasource =(XADataSource)Class.forName(yourDriverClass).newInstance();</i>
And the Connection Pool properties obtained from
<i>weblogic.management.configuration.JDBCConnectionPoolMBean_Stub.getProperties</i>
to the method
<b>weblogic.jdbc.common.internal.DataSourceUtil.initProps(null, xadatasource, properties);</b>
which via <b>weblogic.jdbc.common.internal.DataSourceUtil.initProp</b> method invokes the SETs methods of the driver.
<b>DataSourceUtil.initProp</b> method reads the corresponding ‘set property name’ and search through a Driver method <b>set</b><i>Propertyname</i>.
Do you get me?! If you have written: DB_LOCALE= … , the <i>initProp</i> method search for a Driver method called <b>setDB_LOCALE</b>.
Since IBM gave a name to set Locales Methods <b>setIfxDB_LOCALE</b>, you must set them in the Connection Pool Properties field as:<br>
<b>IfxDB_LOCALE= …<br>
IfxCLIENT_LOCALE= …</b><br>
Best Regards: George Moykin, Sofia, Bulgaria
e-mail: [email protected]<br>
Some of my decisions and fixes:
- Eliminate the problem ‘CHAR to Boolean’ automatic generation of Entity EJB Field in BEA Workshop EJB Project, when ‘new Entity bean from database table’ option is used.
- Eliminate the problem ‘Scan of table tablename failed: java.lang.NullPointerException’, when the user tries to create an Entity EJB from a DBMS table (‘new Entity bean from database table’) using BEA Informix JDBC Driver (Type 4) wlinformix.jar.
- Eliminate the problem ‘JDBC Pool Connection Leak/JTAConnection leak’.

Similar Messages

  • How to set path to jar file (classes)?

    hi,
    i have a java program which uses a jar file (lots of classes). so, i run them all in eclipse but i want to run it on a command line, like through cmd from run.
    the classes are found in a different folder, and the code snippet is found in another folder. so where or how to set the path to the jar file?

    Write
    c:/java -?
    you can use the -cp pption to use your jar file or a folder with classes.
    java -cp jar1.jar myclass.class

  • How to set classloader SearchPolicy to "Local-First"

    Hi, I am wondering how to set the classloading search policy of OC4J to "Local-First", so not only for web apps. Basically what I'm trying to achieve is to incorporate both toplink and commons-logging/log4j libraries in my .EAR without having to worry about those libraries being loaded by another (parent) classloader.
    Help appreciated.

    Oc4j does not support local class first policy at the level of ear. Oc4j support local class first policy at the level of we apps only because it is recommended in the j2ee spec.
    Users of this local class first policy is either delighted by its wonderful work or, more often than not in a large project, bitten by its various bad implications, especially when commons-logging is involved. So I would not recommend to use this policy unless other directions have been tried.

  • How to set min & max connections for  MSSQLconnection pool

    Hi,
    I want to set minconnection, maxconnection, idletimeout initial limit for the pool
    I have got a MSSQL database connection using following java code.
    // MSSQL DbConnection Code
    import java.sql.*;
    public class MsSqlDataSource
    public static void main(String arr[])
    Connection con = null;
    ResultSet rs = null;
    try{
    com.microsoft.sqlserver.jdbc.SQLServerDataSource ds = new com.microsoft.sqlserver.jdbc.SQLServerDataSource();
    ds.setServerName("10.50.50.51");
    ds.setPortNumber(1711);
    ds.setDatabaseName("test");
    ds.setUser("starhome");
    ds.setPassword("starhome");
    con = ds.getConnection();
    }catch(Exception e){}
    }In oracle i have passed min and max number of connection properties through setConnectionCacheProperties method.
    //Connection Pooling using Oracle Data Source:
    m_connSource = new OracleDataSource();
    m_connSource.setDriverType("thin");
    m_connSource.setServerName(m_host);
    m_connSource.setNetworkProtocol("tcp");
    m_connSource.setDatabaseName(m_db);
    m_connSource.setPortNumber(m_port);
    m_connSource.setUser(m_user);
    m_connSource.setPassword(m_password);
    // Enable caching. m_connSource.setConnectionCachingEnabled(true);
    java.util.Properties prop = new java.util.Properties();
    prop.setProperty("MinLimit", m_minConnections);
    prop.setProperty("MaxLimit", m_maxConnections);
    prop.setProperty("InitialLimit", m_initialConnections);
    prop.setProperty("InactivityTimeout", m_inactivityTimeout);
    prop.setProperty("AbandonedConnectionTimeout", m_abandonedTimeout);
    prop.setProperty("ConnectionWaitTimeout", m_connWaitTimeout);
    m_connSource.setConnectionCacheProperties(prop);I dont know how to pass min and max number of connection properties for SQLServerDataSource. Is there any method available to pass min and max number of connection properties for SQLServerDataSource.
    Iam using Tomcat. I found one way to set min and max connections for pool by doing changes in context.xml and web.xml using below url http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    I dont want to touch tomcat configuration files. I need to set connection pooling properties which is independent of application server.
    Please anybody give solution for this?
    Thanks,
    Prisha

    Hi,
    you need to define your database under the DB Admin tab. In the Schema objects node you'll find Sequence Implementations, and there you can definde min max values as well as caching and increments.
    Gerald

  • How to set up a JSP local host server?

    I am trying to set up a local host JSP server, do you know any good youtube or tutorials in general that would help me set up a local host JSP server? Or could you post the steps here and your source (if any).
    I am looking for something similar to XAMPP as in this youtube tutorial: http://ca.youtube.com/watch?v=KWRB-maTVyM&feature=rec-fresh However, any help would be greatly appreciated.
    By the way, I am very new to JSP and was wondering, XAMPP includes Apache, is Apache a JSP server?
    -Direction needed.
    Edited by: watwatacrazy on Aug 31, 2008 6:51 AM

    You need a Java web container to run JSP/Servlets. A commonly used one is Apache Tomcat. It is not the same as Apache HTTP Server which can only serve static files.
    You can find Tomcat here: [http://tomcat.apache.org].
    How to install/use it, just check the User Guide: [http://tomcat.apache.org/tomcat-6.0-doc/index.html].

  • How to set Classpath fro Jar executable archive

    Hello,
    I'm a java programmer since 4 years, but it's the first real desktop application I develop (always build web apps).
    I've developed an application that connect to a DB using the mysql java driver
    I've pachaged all in a jar that is structured like this:
    agenzia.jar
    Agenzia\
    Agenzia.class (the startup class)
    application classes
    mysql-connector-java-2.0.14-bin.jar
    and in the manifest I add this 2 lines:
    Main-Class: agenzia.Agenzia
    Class-Path: mysql-connector-java-2.0.14-bin.jarthe program works fine on my PC, but when I copy the jar in another PC it gives me a ClassNotFoundException not loading the mysql driver...I mean I can see the UI, but when I connect to the DB it gives me the error... I run the program double-clicking on the filename (in windows)
    Does anybody know how to solve this problem?
    Thank you
    Simone

    I've also noticed that if I take the mysqldriver out of the jar, put it in the same dir as the agenzia.jar everything works fine.
    Thank you
    Simone

  • How to set PF status title in module pool.If we are executing it in VA01

    Hi all!
    I a executing my screen in module pool.I set the title for my screen.While i a executing i am getting title in the screen like pf status title only. But if i am executing that screen through VA01.I am not getting title and at the same time it is capturing the VA01 title.But i want the title as the se51 pf status screen title.Plz give me the solution

    Hi,
    I think you should assign your program at the
    'Output types' using tcode: NACE.
    thanks|
    Mahesh

  • How to set transaction isolation level for a method in a Local Interface

              By reference at:
              http://e-docs.bea.com/wls/docs61/ejb/reference.html#1071267,
              the value for method-intf can only be "Remote" or "Home".
              My question is--
              How to set transaction isolation level for a method inside a Local Interface or
              Local_Home Interface?
              Thanks.
              Xing
              

    I'd try 6.1SP2. I'm pretty sure this works now.
              -- Rob
              Xing wrote:
              > I tried "Local", but got an error when deploying the EJB jar, saying that only
              > "Remote" or "Home" is allowed.
              >
              > Any idea?
              >
              > Xing
              >
              > Rob Woollen <[email protected]> wrote:
              > >
              > >
              > >Use LocalHome or Local.
              > >
              > >-- Rob
              > >
              > >Xing wrote:
              > >
              > >> By reference at:
              > >> http://e-docs.bea.com/wls/docs61/ejb/reference.html#1071267,
              > >> the value for method-intf can only be "Remote" or "Home".
              > >>
              > >> My question is--
              > >>
              > >> How to set transaction isolation level for a method inside a Local
              > >Interface or
              > >> Local_Home Interface?
              > >>
              > >> Thanks.
              > >>
              > >> Xing
              > >
              > >--
              > >
              > >----------------------------------------------------------------------
              > >
              > >AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
              > >
              > >by Michael Girdley, Rob Woollen, and Sandra Emerson
              > >
              > >http://learnWebLogic.com
              > >
              > >
              > >
              > >
              > ><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
              > ><html>
              > >Use LocalHome or Local.
              > ><p>-- Rob
              > ><p>Xing wrote:
              > ><blockquote TYPE=CITE>By reference at:
              > ><br>http://e-docs.bea.com/wls/docs61/ejb/reference.html#1071267,
              > ><br>the value for method-intf can only be "Remote" or "Home".
              > ><p>My question is--
              > ><p>How to set transaction isolation level for a method inside a Local
              > >Interface
              > >or
              > ><br>Local_Home Interface?
              > ><p>Thanks.
              > ><p>Xing</blockquote>
              > >
              > ><pre>--
              > >
              > >----------------------------------------------------------------------
              > >
              > >AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
              > >
              > >by Michael Girdley, Rob Woollen, and Sandra Emerson
              > >
              > >http://learnWebLogic.com</pre>
              > > </html>
              > >
              > >
              AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
              by Michael Girdley, Rob Woollen, and Sandra Emerson
              http://learnWebLogic.com
              [att1.html]
              

  • How to set password for Local are connection?

    How to set password for Local are connection?

    do you mean the 802.1x authentication?
    check out links below:
    http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2950/software/release/12-1_9_ea1/configuration/guide/scg/Sw8021x.html
    http://technet.microsoft.com/en-us/network/bb545365.aspx
    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    IT Stuff Quick Bytes

  • How to set default locale in JDK1.3.0 to US?

    Hi, everyone!
    I found the default locale in JDK 1.3.0 is not set to US when I converted our JDK from 1.2 to 1.3.0. So I have to change code by passing Locale.US.
    The output from below test code is:
    default=��100.00
    US=$100.00
    import java.util.Locale;
    import java.text.*;
    public class TestCurrency
    public static void main(String[] args)
    int amount = 100;
    //default
    NumberFormat moneyWriter = NumberFormat.getCurrencyInstance();
    System.out.println ("default=" + moneyWriter.format(amount) );
    //US
    moneyWriter = NumberFormat.getCurrencyInstance(Locale.US);
    System.out.println ("US=" + moneyWriter.format(amount) );
    Can anyone tell me how to set default locale in JDK 1.3.0 to US?
    Thanks!

    You have to set something on your computer (outside Java) to tell it that you are in the US. You didn't say, but I'm going to guess that you are using Windows; if that's so, then try Regional Options in Control Panel.

  • How to set the classpath for external .jar files after importing?

    Hi techs,
    How to set the classpath in WSAD5.1.2 after importing the .jar file to the WEB-INF/lib folder.
    urgent

    I got it.
    after importing the jar file to the perspective,we need to right click on project name, go to proprties,
    goto java build path,
    there we need to include the external jar files.

  • How to set UCS Locales using Radius/Tacacs+ Attributes

    I know how to set a remotely authenticated/authorized users Role using the Radius av-pairs with UCS.
    What Radius attribute/av-pair syntax is needed to set the users Locale within UCS?
    I have tried shell:roles="role@locales" and shell:locales="locale name" with no success.

    Something else to note:
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;}
    Configuring locales to the user roles are not valid as these are global-system users:
    -          aaa
    -          admin
    -          operations
    Locales can be configured only with following user roles:
    -          Network
    -          Server-equipment
    -          Server-profile
    -          Server-security
    -          Storage

  • How to set local currency in AR/Invoice through DI API SAP B1?

    Dear Expert,
    I am using DI API to add AR/Invoice document, but I can't find how to set local currency for BP with foreign currency.
    This my code snip :
            oSO = oCompany.GetBusinessObject(BoObjectTypes.oInvoices)
            oSO.DocDate = dtpPostDate.Value
            oSO.DocDueDate = dtpDueDate.Value
            oSO.TaxDate = dtpDocDate.Value
            oSO.Series = cSeries
            oSO.DocNum = txtNumber.Text
            oSO.DocCurrency = doccur
            oSO.CardCode = txtBP.Text
            oSO.CardName = txtName.Text
            oSO.ContactPersonCode = cntctCode
            oSO.JournalMemo = txtRemarks.Text
            For i = 0 To dgv.RowCount - 2
                oSO.Lines.SetCurrentLine(i)
                oSO.Lines.ItemCode = dgv.Item(0, i).Value
                oSO.Lines.ItemDescription = dgv.Item(2, i).Value
                oSO.Lines.Quantity = dgv.Item(4, i).Value
                oSO.Lines.Price = dgv.Item(5, i).Value
                oSO.Lines.DiscountPercent = dgv.Item(6, i).Value
                oSO.Lines.TaxCode = dgv.Item(7, i).Value
                oSO.Lines.LineTotal = dgv.Item(9, i).Value
                oSO.Lines.Currency = doccur
                oSO.Lines.Add()
            Next
            lRetCode = oSO.Add()
            If lRetCode <> 0 Then
                oCompany.GetLastError(lErrCode, sErrMsg)
                MsgBox(sErrMsg, 16, "Attention")
            Else
                MsgBox("Operation completed successfully.", 64, "Information")
             End If
    When trying to Add, system show error message " Enter valid currency code [OINV.DocCur][Line:1], '$' "
    I am not lucky after trying for a day , wish enlightenment from the experts here, Thank you.
    My machine : SAP B1 9 PL 4
    Best Regards,
    Muh.Ulfah

    Hi
    In the other thread I suggested that you can add document using interface first because there is a possibility that B1 doesn't accept this currency code not because you set it improperly in your code but because of some other reason, for example this currency is not valid for this particular business partner. Despite the fact that this way you can eliminate other possible problems you can also use DI to save an existing document as XML and check what is the actual currency code that B1 itself placed in the document lines object.
    Afterwards you can again try to add document using DI.
    btw
    check this thread:
    How to set local currency in sales order for BP with foreign currency through DI?
    Kind regards,
    Radek

  • How do I set up a custom (local) Sync server for Firefox 4?

    I am having difficulty finding a clear set of instructions on how to set up a custom Sync server for Firefox 4. Most of the information that I can find seems outdated (only mentioning Weave and/or previous versions of Firefox).

    The URL you are looking for is https://wiki.mozilla.org/Labs/Weave/Sync/1.1/Setup

  • How to set standalone model and create local company code

    HI,
    For  SRM5.0 or 7.0  , how to set standalone model ?,   when I check attribute , the system warn me I must fill company code for BUK.  I have no backend system .
    thanks a lot
    Jesse

    Jesse,
      You should define a Backend System using IMG setting 'Define Backend Systems' as a non-sap backend system and use it with BUK attribute.
    SG

Maybe you are looking for

  • Can't print complete web pages in Ver 5.0

    Just upgraded to Ver 5.0. OS is XP SP3. Printer is Brother MFC-7225N. When trying to print a page from a site, instead of the one page, I got multiple pages that were the frame by frame pages. The "Print Frame" section is greyed out under the print c

  • Jsf problem go from jsp page to another jsp in new window

    I’ve two jsp pages attendReport.jsp and printAttendReport.jsp attendReport.jsp contains inputs for attend duration and employee id and command button “view” to view attendance data entered employee during entered duration inside the same page(this wo

  • Calling Webservice from Pl/sql

    Hi All, Can any one give me a detailed example, to call a web service from a pl/sql package. preferably by POSt method. Thank you!

  • AJAX and Read-Only Items

    I used the examples from Carl Backstrom and Denes Kubicek to get my cascading select list working. I have two select list fields (Origin and Type) that I use to determine the data to appear in a third select list field (Customer). With help from peop

  • Error :TNS illegal address parameters

    Hi all error ORA-12533 : TNS illegal address parameters I am getting an error while trying to access the oracle database. this is what i have in my tnsnames.ora # tnsnames.ora Network Configuration File: C:\OraHome_1\network\admin\tnsnames.ora # Gene