Skip to main content

Srinivas Raghu

Srinivas Raghu's Public Library

22 Apr 08

JBossWiki : Running2.6WithJBossAS4.2.xAndMyFaces

  • For 4.2.2 and beyond



    Replace the following from the web.xml found under jboss-4.2.2.GA\server\<config-name>\deploy\jboss-web.deployer\conf.


       <init-param> 
    <description>JSF standard tlds</description>
    <param-name>tagLibJar0</param-name>
    <param-value>jsf-libs/jsf-impl.jar</param-value>
    </init-param>
    <init-param>
    <description>JSTL standard tlds</description>
    <param-name>tagLibJar1</param-name>
    <param-value>jstl.jar</param-value>
    </init-param>


    with


       <init-param> 
    <description>MyFaces tlds</description>
    <param-name>tagLibJar0</param-name>
    <param-value>myfaces-libs/myfaces-impl.jar</param-value>
    </init-param>
  • Install Apache MyFaces JSF implementation


    Use Apache MyFaces version that comes bundled with JBoss AS 4.0.4.x or JBoss AS 4.0.5.x. Delete jboss-4.2.0.GA\server\<config-name>\deploy\jboss-web.deployer\jsf-libs. Create jboss-4.2.0.GA\server\<config-name>\deploy\jboss-web.deployer\myfaces-libs and copy the following libraries into the myfaces-lib directory. For Portal 2.6.3 use the files found under jboss-portal.sar\portal-admin.sar\portal-admin.war\WEB-INF\lib2.


       commons-beanutils.jar
    commons-digester-1.6.jar
    commons-el.jar
    commons-lang-2.1.jar
    myfaces-api.jar
    myfaces-impl.jar


    Modify the web.xml found under jboss-4.2.0.GA\server\<config-name>\deploy\jboss-web.deployer\conf to add the listener as follows:


      <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
  • 1 more annotations...
30 Mar 08

Afroz - My Ideal Match

  • My
    perfect partner is the person who is able to provide the three most important
    elements I value in a relationship- trust, love and respect. My ideal mate has
    to be intelligent, have a good sense of humor, strong family values! Someone
    who can appreciate my company all the time, bring a smile to my heart, someone
    I can walk with or be with and not say a word and know that was the best conversation
    I ever had!.

orkut - sumathi's profile

  • Sumathi




    ideal match:


    my sweet hubby :-)





    first thing you will notice about me:


    Long Curve in my face .............. (hey its my smile)





    eye color:


    black





    hair color:


    black





    build:


    about average





    looks:


    average





    turn ons:


    candlelight





    from my past relationships i learned:


    how people can be very cunning and selfish, on the whole i learnt life's uncertainity.





    five things I cant live without:


    1. my hubby
    2. my true friends (ABJMMK- my friends names' starting letters)
    3. my parents
    4. music &
    5. delicious mom's food... (mouth-watering...................:-) )





    in my bedroom you will find:


    "Do not disturb" - this card hangs at the door...

Ayurveda vs Homeopathy - Audarya Fellowship

  • i honestly think that both ayurveda and homeopathy is a lifestyle change.



    Homeopathy:

    This system is based on the workings of the energy mediums in your body. The treatment process includes everything from plant/animal extracts and some minerals as well. This being said homeopathy is very strict in that it may be antidoted with caffeine, menthol and even mint. This medicine actually works off the four humours of the body (or so thats what it is called) and it focuses primarily on gentle, easy to use medicine. The plus point of this that the medicine is purely based on enhancing your bodies natural defenses and therefore there usually isn't side effects of the treatments liek in traditional allopathic medicine. If it doesn't work just stop.



    Ayurveda:

    (excuse my bias) but it is literally the Science of Life and this is what this medicine accomplishes. Ayurveda uses food and the correct combinations of the food to cure. In addition there is the sciences of yoga, pranayam, system cleansing, mental stability and a total lifestyle change. Those who choose to take the ayurveda route ( and those doing so correctly) will change there way of living. The concept includes "junk in, junk out" so it really concentrates on your entire being



    Whats better or worse, both have there place in medicine but homeopathy is easier to learn for home treatment but ayurveda is something that should be taken from an experienced person.



    I hope this helps, both systems are marvelous and really prooves the healing power of the mind and body and prooves the connection of nature with self.



    Jai Shri Krishna
29 Mar 08

Does sweden has 6 months day and 6 months night ? - Yahoo! Answers India

  • Does sweden has 6 months day and 6 months night ?
  • Northern Finland, Northern Sweden and some part of Norway, Northern Canada, Greenland, Iceland has 6 months straight day and 6 months straight a night. Its called "Polar Day and Polar Night (also called Midnight Sun)" because the Midnight Sun is a phenomenon occurring in latitudes North and nearby to the South of the Arctic Circle and South and nearby to the North of the Antarctic Circle where the sun remains visible at the local midnight. Given fair weather, the sun is visible for a continuous 24 hours, mostly north of the Arctic Circle and south of the Antarctic Circle. The number of days per year with potential midnight sun increases the further poleward one goes.
01 Mar 08

Finance Act 2007 Important Amendments at a Glance and Income Tax Rates applicable for 2007-08-Income Tax FAQ - Vakilno1.com

  • INCOME TAX RATES APPLICABLE FOR FINANCIAL YEAR 2007-2008

















    Annual Net Income from all sources


    (After all permissible deductions)

    Income-Tax Rates


    (In Rs.)

    Upto 1,10,000

    NIL

    1,10,001 - 1,50,000 #

    10% of the amount exceeding 1,10,000(1,50,000-1,10,000=40,000X10%)=4,000+2% education cess Rs. 100 = 4,080

    1,50,001 - 2,50,000 *

    4,000 + 20% on the amount exceeding 1,50,000 [2,50,000-1,50,000=1,00,000 x 20%=20,000]=24,000 + 2% education cess Rs. 480 = 24,480


    # Slab for Women (below 65) begins from 1,45,001


     


    * Slab for Senior Citizen begins from 1,95,001


    2,50,001 and above

    24,000 + 30% on the amount exceeding 2,50,000


    # Slab for Women (below 65) begins from 1,45,001


    * Slab for Senior Citizen begins from 1,95,001

29 Feb 08

Transactional Capabilities In Oc4j

    • Transactional Capabilities
      in Oracle9iAS Containers for J2EE (OC4J)



      Date: 22-Jul-2002


      Introduction





      A key service required for robust server side development
      is transactions. A Transaction can be defined as a series of operations that

      appear to execute as one large, atomic operation. Transactions guarantee an
      all-or-nothing value proposition. Transactions allows multiple users to share
      the same data and guarantee that any set of updated data will be completely
      updated, with no interleaving of updates from other clients. This document contains
      the following topics:




      Different Types of Transaction



      1. Declarative Transactions: Container-Managed Transactions


      XML deployment descriptors are used to specify transaction
      boundaries for components, in case of declarative transactions. At runtime,

      the container initiates a transaction and commits it. This helps the user in
      avoiding the transaction related code and helps in focussing on the core business
      logic of the application. In this approach, the EJB code is completely isolated
      from the transaction APIs. For sample deployment descriptor code snippet click
      here.



      2. Programmatic Transactions: Bean-Managed Transactions


      In this approach, the transactions have to be controlled by

      the bean developer explicitly. The benefit of this approach is that the bean
      developer has full control over the transactional boundaries. The developer
      has to start a transaction by issuing begin and complete the transaction by
      issuing a end or abort statement. For sample code  snippet click here.

  • Dirty read occurs when an application reads the data that has been updated
    but not committed to database.




    Unrepeatable read problem occurs when a component finds that
    the data it read previously has been modified by some other component. Phantom
    problems are related to appearance of a new set of data in a database between
    2 database operations




    These different isolation levels are set in the XML deployment
    descriptor e orion-ejb-jar.xml, which has to be packaged with deployment jar
    file. The tag <entity-deployment> should be present for every entity bean.
    The isolation attribute value can be set using the isolation attribute.  
    DTD for this file can be found at orion-ejb-jar.dtd
    For Sample orion-ejb-jar.xml file please click here.



    Concurrency Control



    There are 2 ways by which concurrency control can be implemented.
    They are pessimistic & optimistic. In optimistic concurrency control, 
    lock is acquired only at the time of committing the transaction, whereas in
    pessimistic concurrency control, lock is acquired for the entire duration of
    the transaction. Concurrency control can be specified in <entity-deployment>

    tag of orion-ejb-jar.xml.

  • 2 more annotations...
15 Feb 08

jGuru: Explain the different Transaction Attributes and Isolation Levels with reference to a scenario.

  • different Transaction Attributes and Isolation Levels with reference to a scenario.
    • Answer





      The Enterprise JavaBeans model supports six different transaction rules:
      • TX_BEAN_MANAGED. The TX_BEAN_MANAGED setting indicates that the enterprise bean manually manages its own transaction control. EJB supports
        manual transaction demarcation using the Java Transaction API. This is very tricky and should not be attempted without a really good reason.



      • TX_NOT_SUPPORTED. The TX_NOT_SUPPORTED setting indicates that the enterprise bean cannot execute within the context of a transaction. If a client
        (i.e., whatever called the method-either a remote client or another enterprise bean) has a transaction when it calls the enterprise bean, the container suspends the transaction for the duration of the method call.



      • TX_SUPPORTS. The TX_SUPPORTS setting indicates that the enterprise bean can run with or without a transaction context. If a client has a transaction when it calls the enterprise bean, the method will join the client's transaction
        context. If the client does not have a transaction, the method will run without a
        transaction.



      • TX_REQUIRED. The TX_REQUIRED setting indicates that the enterprise
        bean must execute within the context of a transaction. If a client has a transaction
        when it calls the enterprise bean, the method will join the client's transaction
        context. If the client does not have a transaction, the container automatically
        starts a new transaction for the method.
        Attributes



      • TX_REQUIRES_NEW. The TX_REQUIRES_NEW setting indicates that the
        enterprise bean must execute within the context of a new transaction. The
        container always starts a new transaction for the method. If the client has a
        transaction when it calls the enterprise bean, the container suspends the client's
        transaction for the duration of the method call.



      • TX_MANDATORY. The TX_MANDATORY setting indicates that the
        enterprise bean must always execute within the context of the client's transaction.
        If the client does not have a transaction when it calls the enterprise bean, the
        container throws the TransactionRequired exception and the request fails.







14 Feb 08

JSP Interview Questions

  • Q:

    How
    do I prevent the output of my JSP or Servlet
    pages from being cached by the browser?



    A:

    You will need to set the appropriate HTTP
    header attributes to prevent the dynamic
    content output by the JSP page from being
    cached by the browser. Just execute the
    following scriptlet at the beginning of
    your JSP pages to prevent them from being
    cached at the browser. You need both the
    statements to take care of some of the older
    browser versions.

    <%

    response.setHeader("Cache-Control","no-store");
    //HTTP 1.1

    response.setHeader("Pragma\","no-cache");
    //HTTP 1.0

    response.setDateHeader
    ("Expires", 0); //prevents caching
    at the proxy server

    %>

22 Jan 08

EJB 3.0 Based Web Services | Reg Developer

  • Web Services are no more and no less than distributed applications that run across heterogeneous networks using (currently) HTTP protocols and XML data formats.

Application Platform Strategies Blog: January 2008

    • A Minimalist's Perspective on ESBs





      Blogger: Anne Thomas Manes



      Annethomasmanesbg



      Steve Jones has just posted a blog and a specification of what he calls a Business Service Bus (BSB), which he defines as "a simple mechanism for exchanging information between business domains". Steve is proposing that a BSB should be very simple -- doing only what is absolutely essential to enable information exchange--and explicitly disallowing more complex transformation capabilities typically associated with an Enterprise Service Bus (ESB).



      To get a better sense of Steve's proposal, you should also read his previous post on the subject, in which he separates out ESB capabilities into two tiers:



      • Business Service Bus (BSB)
      • Domain Service Bus (DSB)


      The DSB supports information exchange within a particular business domain, and typically supports more integration features than the BSB.

14 Jan 08

volatile and static keywords (Java in General (intermediate) forum at JavaRanch)

  • if you declare a variable as static ,

    it will be shared and seen by all objects of a class

    ::::::::::

    if you declare a variable as volatile ,

    it will be shared and seen by all threads of an object
    • Static has been discussed many times on this forum.
      • Static code is loaded before the clas is instantiated and stays in memory until the JVM exits (as opposed to instance members which are loaded and unloaded: "dynamic" code),
      • each class has one copy of each of its static members in memory,
      • Each instance of the class has access to that single static memory location,
      • the single member is the same for every instance,
      • but a static member does not have access to instance members (it has no way of knowing where they are located), nor the keyword this and super.

      Volatile means that the value of a variable is liable to change suddenly, and it instructs methods using a volatile member to update it immediately before use. I have never actually seen it used.

jGuru: What's a MalformedURLException?


  • When you create an instance of the java.net.URL class,
    >

    its constructor can throw a MalformedURLException. This occurs when the URL is invalid. When it is thrown, it isn't because the host machine is down, or the URL path points to a missing file; a malformed URL exception is thrown when the URL cannot be correctly parsed.
    >





    Common mistakes include :-
    >



    1. leaving out a protocol
    >


    (eg "www.microsoft.com"
    >

    instead of "http://www.microsoft.com/")
    >


    2. specifying an invalid protocol
    >

    (eg "www://netscape.com")
    >


    3.leaving out the ':' character
    >


    (eg http//www.micrsoft.com/)
    >






    MalformedURLException will not be thrown if :-
    >


    1. the host name is invalid
    >


    eg "www.microsoft-rules-the-world.com")
    >



    2. the path is invalid
    >

    (eg "http://www.microsoft.com/company_secrets.htm")
    >

11 Jan 08

Mapping java object to Oracle TYPE ...

  • Mapping java object to Oracle TYPE
  • I have a Oracle TYPE declared in database, with few attributes.

    I have a Java class with the same set of attributes and also implements SQLDATA interface and provided implementation for two of interface methods readSQL() and writeSQL(). These methods are not there in Oracle TYPE. Now, Can I map this java object to Oracle TYPE as follows:

    Map typeMap = connection.getTypeMap();
    typeMap.put("REQSUM_OBJ_T", Class.forName("RequisitionSummary"));
    connection.setTypeMap(typeMap);
    callableStatement = connection.prepareCall("{? = call NW2IDAA.INS_REQSUM_PROC(?)}");
    callableStatement.setObject(1, reqsum);
    callableStatement.execute();


    I am getting an error while setting object to callable statement as follows:

    java.sql.SQLException: Non supported character set: oracle-character-set-178
  • 1 more annotations...
10 Jan 08

ONJava.com -- Configuring JBoss 4.0 JDBC Connectivity

    • The <driver-class/> and
      <connection-url/> settings for Oracle are
      as follows:



      Oracle OCI Type 2 Driver



      • Class: oracle.jdbc.driver.OracleDriver
      • URL: jdbc:oracle:oci8:@<database>
      • Class: oracle.jdbc.driver.OracleDriver
      • URL: jdbc:oracle:thin:@<host>:<port>:<database>
      • Class: oracle.jdbc.xa.client.OracleXADataSource
      • URL: jdbc:oracle:thin:@<host>:<port>:<database>
      • Class: oracle.jdbc.driver.OracleDriver
      • URL: jdbc:oracle:oci8:@<database>

Jboss Faq - All jboss and j2ee questions answered - View Thread - Need help on EJB

  • To work with EJB applications on JBOSS server,
    1.apart from the application created the jars to place in the classpath are:
    ejb-api.jar,jca-api.jar(for any of the datasource you are using)
    2.Make a jar of the application and structure of the jar is:
    META-INF
    ejb-jar.xml
    jboss.xml
    class files
    3.The JNDI name is given in jboss.xml file,the JBoss has a standardjboss.xml for all ejb applications and this you can ignore for small applications
    4.Deploy the jar in any of the server configurations(default,all,minimal),the jndi name get resgisters in the JBOSS AS.
    5.Start the server,Run the client application.
1 - 16 of 16
Showing 20 items per page

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo