Featured Posts
Windows
  • How to install Windows in dual boot with Windows 7

    If you could not stand to hold the curiosity and downloaded the Windows Developer Preview 8for testing, but do not want to lose your data and programs from Windows 7 , will learn from this tutorial RytBrothers.com how to put two operating systems running in dual boot your machine. After downloading[...]

  • Download And Try Out Windows 8 Developer Preview

    As we posted about windows 8 OS release, Microsoft released windows 8 developer preview tool for download. You can download it from Microsoft msdn site. Download summary: Windows released developer preview for 64-bit (x64) and 32-bit(x86) and also Windows Developer Preview with developer tools[...]

  • How to scan & repair windows 7 corrupted files

    Sometimes your windows 7 may behave weird because of some corrupted windows file. In such case you will want to scan for corrupted files and repair them. Here is how you can repair corrupted windows 7 files: Click Start button and then type cmd in the Start Search box. In the search results list, right-click Command P[...]

  • How to Check the Basic Information of Your Computer in Wind

    In this tutorial you will see the steps to view the basic information of your computer such as rating, computer name, processor speed, system type, RAM and operating system information. Following are the few easy steps to view the basic configuration of your computer in Windows 7. STEP 1Right Click on Computer icon[...]

  • Tech News
  • Windows 8 Security: What's New?

    Microsoft has been adding and improving advanced security features and capabilities in its Windows operating system and other applications over the past few years. Each iteration of Windows has featured improved security—necessary to withstand the constant barrage of attacks—and Windows 8 coming is no exception. I[...]

  • Controversial ESP Study Fails

    A study published last year in a scientific journal claimed to have found strong evidence for the existence of psychic powers such as ESP. The paper, written by Cornell professor Daryl J. Bem, was published in The Journal of Personality and Social Psychology and quickly made headlines around the world for[...]

  • The new iPad is on 16 March in the shops

    This is how the new iPad. On Wednesday evening, it was presented in San Francisco. Apple gives a clear signal to its competitors: The next iPad will remain the king in the tablet market. With the improved technology, the device can remove the classic PC more and more tasks. The iPad is clearly the ne[...]

  • Still Think Facebook's Not Threatened by Google+? Facebook

    In order for the Google + users who are on Facebook on the move (or vice versa), do not get confused, and pages users can now also place a "+" are marked. The functionality is no different to the @ character. Just a status update, or enter a comment and it appears the familiar + selection. One good thing[...]

  • Blogging
  • Tips to Hardcore Bloggers

    Tips to Hardcore Bloggers Who spend their most of time sitting front of the computer screen. Which actually lead to eyestrain symptom. [...]

  • Blogger Launched Auto LightBox Effect

    Now Blogger already has the automatic effect LightBox images published in the posts.I noticed this when posting new sentences in another blog, after sending the images to light box effect appeared alone and searching the internet I saw that the blogger is now standard. But this new Blogger facilitate, or rather [...]

  • Tips to Get Approved by Google AdSense Easy

    Just want to share Tips to Get Approved by Google AdSense The main point is “unique”, as Big Google said on your email! I write all of my post manually, not a lot, just 20 blog post. Use paid domain. But one of my adsense account registered using co.cc domain THIS IS MOST IMPORTANT! Use your own mail address t[...]

  • Google Adsense Beginners Guides

    Rule’s: Google Adsense Rule No.1 – You must have your ownDOMAIN(Your own site www.yoursite.com) Rule No.2 – Your site must be active for 6 months. Rule No.3 – Your site must have ORIGINALcontent and not COPIED from other site. Rule No.4 – Your site must have largeTRAFFIC. Rule No.5 – Yo[...]

  • How To
  • WHAT IS A TEMPLE,WHY TO VISIT TEMPLES ?

    (Unfortunately,every thing needs some standardization for the west to acknowledge God's way of living 'sanathan dharam"). (Scientific Reason) There are thousands of temples all over India in different size, shape and locations but not all of them are considered to be built the Vedic way. Generally, a temple shoul[...]

  • How to Make Screw Thread ?

    Making a Screw Thread  Elementary Knowledge of Screws Machine screws are extensively used for securing parts. The number of different types and sizes of machine screws, nuts & bolts prohibit the possibility of introducing them all here so the following information addressed the elementary information onl[...]

  • How to Change Facebook User Name ?

    Facebook has certainly turned out to be a massive social website with more than 500 million users, as claimed by Facebook. No doubt, it is a huge platform and almost everyone is on this social networking website. However, the privacy concerns that are being raised recently make it a bit daunting for the users, [...]

  • How to Deal with Common Allergy ?

    An allergy is a medical condition that makes you feel ill when you eat or come in contact with a particular substance. General physician Dr Shahid Barmare says, “Allergies happen when the immune system mistakenly believes that something the person ate or came in contact with, is harmful to the body. To protect the[...]

  • Recent Articles

    Full List Of Useful Windows 8 Shortcuts You Need To Know

    The latest version of the Windows OS was successfully launched last month by Microsoft, the all new Windows 8. Knowing the Windows 8 shortcuts is very important in order to make the most out of this beautiful operating system. Windows 8 shortcuts are simpler as compared to that of Windows 7. Windows 8 is certainly an[...]

    09 Dec 2012 | 0 commentsView Post

    Windows 8 Security: What's New?

    Microsoft has been adding and improving advanced security features and capabilities in its Windows operating system and other applications over the past few years. Each iteration of Windows has featured improved security—necessary to withstand the constant barrage of attacks—and Windows 8 coming is no exception. I[...]

    30 Oct 2012 | 0 commentsView Post

    The definite article - THE

    The definite article the is the same for all genders in singular and in plural. the boy, the girl, the cat, the computers If the following word begins with a vowel, we speak [], if the following word begins with a consonant, we speak []. [] [] the following word starts with[...]

    07 Jun 2012 | 0 commentsView Post

    WHAT IS A TEMPLE,WHY TO VISIT TEMPLES ?

    (Unfortunately,every thing needs some standardization for the west to acknowledge God's way of living 'sanathan dharam"). (Scientific Reason) There are thousands of temples all over India in different size, shape and locations but not all of them are considered to be built the Vedic way. Generally, a temple shoul[...]

    03 Apr 2012 | 0 commentsView Post

    Controversial ESP Study Fails

    A study published last year in a scientific journal claimed to have found strong evidence for the existence of psychic powers such as ESP. The paper, written by Cornell professor Daryl J. Bem, was published in The Journal of Personality and Social Psychology and quickly made headlines around the world for[...]

    17 Mar 2012 | 0 commentsView Post

    Mahindra Java Interview Questions With Answers Part II


    1) What is diffrence between StateFul and Stateless Session Bean?

    A Stateful Session Bean is a bean that is designed to service business processes that span multiple method requests or transactions. Stateful Session beans  retain state on behalf of an individual client. Stateless Session Beans do not maintain state.

    EJB containers pools stateless session beans and reuses them to service many clients. Stateful session beans can be passivated and reused for other clients.  But this involves I/O bottlenecks. Because a stateful session bean caches client  conversation in memory, a bean failure may result in loosing the entire client conversation. Therefore, while writing a stateful session bean the bean  developer has to keep the bean failure and client conversation loss in mind.

    In case of stateless session beans, client specific data has to be pushed to the bean for each method invocation which will result in increase in the network traffic. This can be avoided in a number of ways like persisting the client specific data in database or in JNDI. But this also results in I/O performance  bottlenecks.

    If the business process spans multiple invocations thereby requiring a conversation then stateful session bean will be the ideal choice. On the other hand, if business process lasts only for a single method call, stateless session bean model suits.

    Stateful session beans remembers the previous request and responses. But stateless beans do not. stateful does not have pooling concept, whereas the stateless bean instances are pooled


    2) What is difference between BeanMangedPersistance and ContainerMangedPersistance?

    CMP: Tx behaviour in beans are defined in transaction attributes of the methods
    BMP: Programmers has to write a code that implements Tx behaviour to the bean class.

    Tuned CMP entity beans offer better performance than BMP entity beans. Moving towards the CMP based approach provides database independence since it does not contain any database storage APIs within it. Since the container performs database operations on behalf of the CMP entity bean, they are harder to debug. BMP beans offers more control and flexibility that CMP beans.

    Diff 1) In BMP you will take care of all the connection and you write the SQL code inside the bean whereas in CMP the container will take care of it
    Diff 2) The BMP is not portable across all DB s.whereas the CMP is


    (3)Draw and explain MVC architecture?

    MVC Architecture is Module ViewController Architecture. Controller is the one which controls the flow of application / services the requests from the View.  Module is the other layer which performs the exact operations. Each layer should be loosely coupled as much as possible.


    (4)Difference between forward(request,response) and SendRedirect(url) in Servlet?

    With Forward, request & response would be passed to the destination URL which should be relative (means that the destination URL shud be within a servlet  context). Also, after executing forward method, the control will return back to the same method from where the forward method was called. All the opposite to  the above points apply to sendRedirect. (OR)The forward will redirect in the application server itself. It does not come  to the client. wherea Response.sendredirect() will come to the client and go back ...ie. URL appending will happen.


    (5)What is Synchornize?

    Synchronize is a technique by which a particular block is made accessible only by a single instance at any time. (OR) When two or more objects try to access a  resource, the method of letting in one object to access a resource is called sync


    (6)How to prevent Dead Lock?
    Using synchronization mechanism. For Deadlock avoidance use Simplest algorithm where each process tells max number of resources it will ever need. As process runs, it requests resources but never exceeds max number of resources. System schedules processes and allocates resoures in a way that ensures that no deadlock results. 

    7)Explain different way of using thread? :
    The thread could be implemented by using runnable interface or by inheriting from the Thread class. The former is more advantageous, cause when you are going for multiple inheritance..the only interface can help 

    (8)what are pass by reference and passby value?
    Pass By Reference means the passing the address itself rather than passing the value. Passby Value means passing a copy of the value to be passed.


    (9)How Servlet Maintain Session and EJB Maintain Session?
    Servlets maintain session in ServleContext and EJB s in EJBContext.


    (10)Explain DOM and SAX Parser?

    DOM parser is one which makes the entire XML passed as a tree Structure and will have it in memory. Any modification can be done to the XML.

    SAX parser is one which triggers predefined events when the parser encounters the tags in XML. Eventdriven parser. Entire XML will not be stored  in memory. Bit faster than DOM. NO modifications can be done to the XML. 


    (11)What is HashMap and Map?

    Map is Interface and Hashmap is class that implements that and its not serialized HashMap is non serialized and Hashtable is serialized


    (12)Difference between HashMap and HashTable?

    The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as key and value  whereas Hashtable doesnt allow). HashMap does not guarantee that the order of  the map will remain constant over time. 


    (12a) Difference between Vector and ArrayList?
    Vector is serialized whereas arraylist is not


    (13)Difference between Swing and Awt?

    AWT are heavyweight componenets. Swings are lightweight components. Hence
    swing works faster than AWT.


    14) Explain types of Enterprise Beans?

    Session beans > Associated with a client and keeps states for a client
    Entity Beans > Represents some entity in persistent storage such as a database

    15) What is enterprise bean?
    Server side reusable java component

    Offers services that are hard to implement by the programmer
    Sun: Enterprise Bean architecture is a component architecture for the  deployment and development of componentbased distributed business applications.  Applications written using enterprise java beans are scalable, transactional and  multiuser secure. These applications may be written once and then deployed on  any server plattform that supports enterprise java beans specification. 

    Enterprise beans are executed by the J2EE server.

    First version 1.0 contained session beans, entity beans were not included. Entity beans were added to version 1.1 which came out during year 1999. Current release is EJB version 1.2 

    16)Services of EJB?
    Database management :
    ?Database connection pooling
    ?DataSource, offered by the J2EE server. Needed to access connection pool of the server.
    ?Database access is configured to the J2EE server > easy to change database / database driver

    Transaction management :
    ?Distributed transactions
    ?J2EE server offers transaction monitor which can be accessed by the client.

    Security management :

    ?Authetication
    ?Authorization
    ?encryption

    Enterprise java beans can be distributed /replicated into separate machines Distribution/replication offers
    ?Load balancing, load can be divided into separate servers.
    ?Failover, if one server fails, others can keep on processing normally.
    ?Performance, one server is not so heavy loaded. Also, for example Weblogic has thread pools for improving performance in one server.

    17)When to choose EJB?

    Server will be heavy loaded :
    ?Distribution of servers helps to achieve better performance.
    Server should have replica for the case of failure of one server:
    ?Replication is invisible to the programmer
    Distributed transactions are needed "
    ?J2EE server offers transaction monitor that takes care of transaction management.
    ?Distributed transactions are invisible to the programmer
    Other services vs. money :
    Weblogic J2EE server ~ 80 000 mk and Jbuilder X Professional Edition ~ 5 000mk


    18) Why not to use free J2EE servers?

    ?no tecnical support
    ?harder to use (no graphical user interface ...)
    ?no integration to development tools (for example, Jbuilder)
    ?Bugs? Other problems during project?


    19) Alternative:Tuxedo
    Tuxedo is a middleware that offers scalability services and transaction monitors.
    C or C++ based.
    Can be used with Java client by classes in JOLT package offered by BEA.

    Faster that J2EE server?
    Harder to program?
    Harder to debug?
    Implementation is platform dependent.


    20) J2EE server offers


    DataSource:
    ?Object that can be used to achieve database connection from the connection pool.
    ?Can be accessed by the interface DataSource

    Transaction monitor:

    ?Can be accessed by the interface UserTransaction.


    21)Java Naming and the Directory Service

    Naming service is needed to locate beans home interfaces or other objects (DataSource, UserTransaction): ?For example, jndi name of the DataSource
    Directory service is needed to store and retrieve properties by their name: ?jndi name: java:comp/env/propertyName




    22) XML ? deployment descriptor

    ejbjar.xml + serverspecific xml file Which is then Packed in a jar ? file together with bean classes. Beans are packaged into EJB JAR file , Manifest file is used to list EJB?s and jar file holding Deployment descriptor.


    23) Session Bean

    Developer programs three classes:
    ?Home interface, contains methods for creating (and locating for entity beans) bean instances.
    ?Remote interface, contains business methods the bean offers.
    ?Bean class, contains the business logic of the enterprise bean.


    24)Entity Beans

    Represents one row in the database:
    ?Easy way to access database
    ?business logic concept to manipulate data.
    Container managed persistence vs. bean managed persistence:

    Programmer creates three or four classes:

    ?Home interface for locating beans
    ?Remote interface that contains business methods for clients.
    ?Bean class that implements bean?s behaviour.
    ?Primary key class ? that represents primary key in the database. Used to locate beans.
    Primary key class is not needed if primary key is a single field that could


    25) When to use which bean?

    Entity beans are effective when application wants to access one row at a time. If many rows needs to be fetched, using session beans can be better alternative  ava class (for example, Integer).   Entity beans are efficient when working with one row at a time  Cause a lot of network trafic.   Session Beans are efficient when client wants to access database directry.  ?fetching/updating multiple rows from the database  

    26) Explain J2EE Arch?

    Normally, thinclient multitiered applications are hard to write because they  involve many lines of intricate code to handle transaction and state management,  multithreading, resource pooling, and other complex lowlevel details.  The componentbased and platformindependent J2EE architecture makes J2EE  applications easy to write because business logic is organized into reusable  components and the J2EE server provides underlying services in the form of a  container for every component type. Because you do not have to develop these  services yourself, you are free to concentrate on solving the business problem  at hand.  

    Share and Enjoy:

    0 comments for this post

    Leave a reply

    Share me whatever in your mind. Comment is welcomed to all :) Tips: Choose Name/URL (next to the comment as:) and type your website name and URL. And you can post your comment.

    We will keep You Updated...
    Sign up to receive breaking news
    as well as receive other site updates!
    Subscribe via RSS Feed subscribe to feeds
    Sponsors
    Template By rytbrothers.comrytbrothers.comrytbrothers.com
    Template By rytbrothers.comrytbrothers.comrytbrothers.com
    Popular Posts
    Recent Stories
  • Full List Of Useful Windows 8 Shortcuts You Need To Know

    The latest version of the Windows OS was successfully launched last month by Microsoft, the all new Windows 8. Knowing the Windows 8 shortcuts is very important in order to make the most out of this beautiful operating system. Windows 8 shortcuts are simpler as compared to that of Windows 7. Windows 8 is certainly an[...]

  • Windows 8 Security: What's New?

    Microsoft has been adding and improving advanced security features and capabilities in its Windows operating system and other applications over the past few years. Each iteration of Windows has featured improved security—necessary to withstand the constant barrage of attacks—and Windows 8 coming is no exception. I[...]

  • The definite article - THE

    The definite article the is the same for all genders in singular and in plural. the boy, the girl, the cat, the computers If the following word begins with a vowel, we speak [], if the following word begins with a consonant, we speak []. [] [] the following word starts with[...]

  • Connect with Facebook
    Sponsors
    Search
    Archives
    Categories
    Blog Archives
    Tag Cloud