Computerized WorldComputerized WorldDiscussion on latest News and Events in my computerized world Articles
Lazy loading vs. pre-loading beans with Spring Framework
2008-09-09 14:16:00 Spring framework can instantiate and bind (called loading) related Java objects (called beans) according to a given configuration. An XML file can easily be used to define these bindings. Spring framework supports two different types of loading methods; lazy loading and pre-loading respectively managed by BeanFactory and ApplicationContext containers. Lazy LoadingA bean is loaded only when an instance of that Java class is requested by any other method or a class. org.springframework.beans.factory.BeanFac tory (and subclasses) container loads beans lazily. Following code snippet demonstrate lazy loading, concentrate on how "beans.xml" spring configuration file is loaded by BeanFactory container class.BeanFactory factory = new XmlBeanFactory( new InputStreamResource( new FileInputStream("beans.xml"))); // 1Employee emp = (Employee) factory.getBean("employeeBean") ; // 2Even though "beans.xml" configur... More About: Beans , Tech , Spring , Framework
Lazy loading vs. pre-loading beans with Spring Framework
2008-09-09 14:16:00 Spring framework can instantiate and bind (called loading) related Java objects (called beans) according to a given configuration. An XML file can easily be used to define these bindings. Spring framework supports two different types of loading methods; lazy loading and pre-loading respectively managed by BeanFactory and ApplicationContext containers. Lazy LoadingA bean is loaded only when an instance of that Java class is requested by any other method or a class. org.springframework.beans.factory.BeanFac tory (and subclasses) container loads beans lazily. Following code snippet demonstrate lazy loading, concentrate on how "beans.xml" spring configuration file is loaded by BeanFactory container class.BeanFactory factory = new XmlBeanFactory( new InputStreamResource( new FileInputStream("beans.xml"))); // 1Employee emp = (Employee) factory.getBean("employeeBean") ; // 2Even though "beans.xml" configur... More About: Beans , Tech , Spring , Framework
Lazy loading vs. pre-loading beans with Spring Framework
2008-09-09 14:16:00 Spring framework can instantiate and bind (called loading) related Java objects (called beans) according to a given configuration. An XML file can easily be used to define these bindings. Spring framework supports two different types of loading methods; lazy loading and pre-loading respectively... More About: Beans , Tech , Spring
Lazy loading vs. pre-loading beans with Spring Framework
2008-09-09 14:16:00 Spring framework can instantiate and bind (called loading) related Java objects (called beans) according to a given configuration. An XML file can easily be used to define these bindings. Spring framework supports two different types of loading methods; lazy loading and pre-loading respectively managed by BeanFactory and ApplicationContext containers. Lazy LoadingA bean is loaded only when an instance of that Java class is requested by any other method or a class. org.springframework.beans.factory.BeanFac tory (and subclasses) container loads beans lazily. Following code snippet demonstrate lazy loading, concentrate on how "beans.xml" spring configuration file is loaded by BeanFactory container class.BeanFactory factory = new XmlBeanFactory( new InputStreamResource( new FileInputStream("beans.xml"))); // 1Employee emp = (Employee) factory.getBean("employeeBean") ; // 2Even though "beans.xml" configur... More About: Beans , Tech , Spring , Framework
Lazy loading vs. pre-loading beans with Spring Framework
2008-09-09 14:16:00 Spring framework can instantiate and bind (called loading) related Java objects (called beans) according to a given configuration. An XML file can easily be used to define these bindings. Spring framework supports two different types of loading methods; lazy loading and pre-loading respectively managed by BeanFactory and ApplicationContext containers. Lazy LoadingA bean is loaded only when an instance of that Java class is requested by any other method or a class. org.springframework.beans.factory.BeanFac tory (and subclasses) container loads beans lazily. Following code snippet demonstrate lazy loading, concentrate on how "beans.xml" spring configuration file is loaded by BeanFactory container class.BeanFactory factory = new XmlBeanFactory( new InputStreamResource( new FileInputStream("beans.xml"))); // 1Employee emp = (Employee) factory.getBean("employeeBean") ; // 2Even though "beans.xml" configur... More About: Beans , Tech , Spring , Framework
[Eclipse] Access restriction: Class is not accessible due to restriction on
2008-09-09 14:00:00 "Access restriction: Class is not accessible due to restriction on required library"; error message may be shown while developing Java projects in Eclipse IDE. Error message is self-explanatory, some classes can not be loaded into the project since restriction rules are being imposed on those classes.How to solveThis error message can be removed by changing a setting inside Eclipse IDE. Open up the dialog box shown below, using any of the following paths.Windows -> Preferences -> Java -> Compiler -> Errors/Warnings(Project) Properties -> Java Compiler -> Errors/WarningsLocate the "Forbidden reference (access rules)" option under "Deprecated and restricted API" section in the dialog box. This option decides how to handle access rules defined inside Eclipse. By default it is set to "Error" which causes Eclipse to complain about references to any restricted classes. Choosing any other option (Warning or Ignore) will remove these error mes... More About: Tools , Tech
[Eclipse] Access restriction: Class is not accessible due to restriction on
2008-09-09 14:00:00 "Access restriction: Class is not accessible due to restriction on required library"; error message may be shown while developing Java projects in Eclipse IDE. Error message is self-explanatory, some classes can not be loaded into the project since restriction rules are being imposed on those... More About: Software , Tools , Tech
[Eclipse] Access restriction: Class is not accessible due to restriction on
2008-09-09 14:00:00 "Access restriction: Class is not accessible due to restriction on required library"; error message may be shown while developing Java projects in Eclipse IDE. Error message is self-explanatory, some classes can not be loaded into the project since restriction rules are being imposed on those classes.How to solveThis error message can be removed by changing a setting inside Eclipse IDE. Open up the dialog box shown below, using any of the following paths.Windows -> Preferences -> Java -> Compiler -> Errors/Warnings(Project) Properties -> Java Compiler -> Errors/WarningsLocate the "Forbidden reference (access rules)" option under "Deprecated and restricted API" section in the dialog box. This option decides how to handle access rules defined inside Eclipse. By default it is set to "Error" which causes Eclipse to complain about references to any restricted classes. Choosing any other option (Warning or Ignore) will remove these error mes... More About: Tools , Tech
[Eclipse] Access restriction: Class is not accessible due to restriction on
2008-09-09 14:00:00 "Access restriction: Class is not accessible due to restriction on required library"; error message may be shown while developing Java projects in Eclipse IDE. Error message is self-explanatory, some classes can not be loaded into the project since restriction rules are being imposed on those classes.How to solveThis error message can be removed by changing a setting inside Eclipse IDE. Open up the dialog box shown below, using any of the following paths.Windows -> Preferences -> Java -> Compiler -> Errors/Warnings(Project) Properties -> Java Compiler -> Errors/WarningsLocate the "Forbidden reference (access rules)" option under "Deprecated and restricted API" section in the dialog box. This option decides how to handle access rules defined inside Eclipse. By default it is set to "Error" which causes Eclipse to complain about references to any restricted classes. Choosing any other option (Warning or Ignore) will remove these error mes... More About: Tools , Tech
[Eclipse] Access restriction: Class is not accessible due to restriction on
2008-09-09 14:00:00 "Access restriction: Class is not accessible due to restriction on required library"; error message may be shown while developing Java projects in Eclipse IDE. Error message is self-explanatory, some classes can not be loaded into the project since restriction rules are being imposed on those classes.How to solveThis error message can be removed by changing a setting inside Eclipse IDE. Open up the dialog box shown below, using any of the following paths.Windows -> Preferences -> Java -> Compiler -> Errors/Warnings(Project) Properties -> Java Compiler -> Errors/WarningsLocate the "Forbidden reference (access rules)" option under "Deprecated and restricted API" section in the dialog box. This option decides how to handle access rules defined inside Eclipse. By default it is set to "Error" which causes Eclipse to complain about references to any restricted classes. Choosing any other option (Warning or Ignore) will remove these error mes... More About: Tools , Tech
[Eclipse] Access restriction: Class is not accessible due to restriction on
2008-09-09 14:00:00 "Access restriction: Class is not accessible due to restriction on required library"; error message may be shown while developing Java projects in Eclipse IDE. Error message is self-explanatory, some classes can not be loaded into the project since restriction rules are being imposed on those classes.How to solveThis error message can be removed by changing a setting inside Eclipse IDE. Open up the dialog box shown below, using any of the following paths.Windows -> Preferences -> Java -> Compiler -> Errors/Warnings(Project) Properties -> Java Compiler -> Errors/WarningsLocate the "Forbidden reference (access rules)" option under "Deprecated and restricted API" section in the dialog box. This option decides how to handle access rules defined inside Eclipse. By default it is set to "Error" which causes Eclipse to complain about references to any restricted classes. Choosing any other option (Warning or Ignore) will remove these error mes... More About: Tools , Tech
Chrome or Firefox - which browser to choose?
2008-09-04 15:14:00 Chrome is the newest baby in browser family or the next competitor in browser war. What ever it is, Google released their browser named Chrome. But Mozilla Firefox is the most popular browser in the world right now and Google was the major supporter for Firefox. Even while supporting it, they have built their own browser free and open source. Here we are looking at the two browsers and trying to compare them to decide whether to switch to the new one or not leaving our old but fascinating friend Firefox?Interesting features1. One Process per each tabTab is not another thread running inside the browser process; there is a separate process per tab. Even if one tab crashes, the rest of the tabs will be running as nothing happened; which was not available in Firefox. This is one of the most interesting features.2. New tab is filled with useful linksFor a new tab in Firefox, you can load a predefined page, a blank page or a predefined set of page links (using an extension). But you would... More About: News , Tools , Tech
Chrome or Firefox - which browser to choose?
2008-09-04 15:14:00 Chrome is the newest baby in browser family or the next competitor in browser war. What ever it is, Google released their browser named Chrome. But Mozilla Firefox is the most popular browser in the world right now and Google was the major supporter for Firefox. Even while supporting it, they have... More About: Software , News , Tools
Chrome or Firefox - which browser to choose?
2008-09-04 15:14:00 Chrome is the newest baby in browser family or the next competitor in browser war. What ever it is, Google released their browser named Chrome. But Mozilla Firefox is the most popular browser in the world right now and Google was the major supporter for Firefox. Even while supporting it, they have built their own browser free and open source. Here we are looking at the two browsers and trying to compare them to decide whether to switch to the new one or not leaving our old but fascinating friend Firefox?Interesting features1. One Process per each tabTab is not another thread running inside the browser process; there is a separate process per tab. Even if one tab crashes, the rest of the tabs will be running as nothing happened; which was not available in Firefox. This is one of the most interesting features.2. New tab is filled with useful linksFor a new tab in Firefox, you can load a predefined page, a blank page or a predefined set of page links (using an extension). But you would... More About: News , Tools , Tech
Chrome or Firefox - which browser to choose?
2008-09-04 15:14:00 Chrome is the newest baby in browser family or the next competitor in browser war. What ever it is, Google released their browser named Chrome. But Mozilla Firefox is the most popular browser in the world right now and Google was the major supporter for Firefox. Even while supporting it, they have built their own browser free and open source. Here we are looking at the two browsers and trying to compare them to decide whether to switch to the new one or not leaving our old but fascinating friend Firefox?Interesting features1. One Process per each tabTab is not another thread running inside the browser process; there is a separate process per tab. Even if one tab crashes, the rest of the tabs will be running as nothing happened; which was not available in Firefox. This is one of the most interesting features.2. New tab is filled with useful linksFor a new tab in Firefox, you can load a predefined page, a blank page or a predefined set of page links (using an extension). But you would... More About: News , Tools , Tech
Chrome or Firefox - which browser to choose?
2008-09-04 15:14:00 Chrome is the newest baby in browser family or the next competitor in browser war. What ever it is, Google released their browser named Chrome. But Mozilla Firefox is the most popular browser in the world right now and Google was the major supporter for Firefox. Even while supporting it, they have built their own browser free and open source. Here we are looking at the two browsers and trying to compare them to decide whether to switch to the new one or not leaving our old but fascinating friend Firefox?Interesting features1. One Process per each tabTab is not another thread running inside the browser process; there is a separate process per tab. Even if one tab crashes, the rest of the tabs will be running as nothing happened; which was not available in Firefox. This is one of the most interesting features.2. New tab is filled with useful linksFor a new tab in Firefox, you can load a predefined page, a blank page or a predefined set of page links (using an extension). But you would... More About: News , Tools , Tech
Chrome or Firefox - which browser to choose?
2008-09-04 15:14:00 Chrome is the newest baby in browser family or the next competitor in browser war. What ever it is, Google released their browser named Chrome. But Mozilla Firefox is the most popular browser in the world right now and Google was the major supporter for Firefox. Even while supporting it, they have built their own browser free and open source. Here we are looking at the two browsers and trying to compare them to decide whether to switch to the new one or not leaving our old but fascinating friend Firefox?Interesting features1. One Process per each tabTab is not another thread running inside the browser process; there is a separate process per tab. Even if one tab crashes, the rest of the tabs will be running as nothing happened; which was not available in Firefox. This is one of the most interesting features.2. New tab is filled with useful linksFor a new tab in Firefox, you can load a predefined page, a blank page or a predefined set of page links (using an extension). But you would... More About: News , Tools , Tech
Better use
2008-09-03 13:42:00 Spring configuration xml is used for defining the wiring between different object. It has the following format. <beans> <bean id=".." class="..."> ... </bean> ...<beans>Classes specified in the configuration file will be instantiated by Spring container. And those objects will be bound with each other accordingly. Any java class specified under attribute named "class" will be instantiated. There is no much limitations on the classes that can be used for this here. It does not need to be a Java Bean . It can be any POJO (plan old java object). The only requirement is that this class must be possible to instantiate.So why does this tags are named <beans> and <bean>? This seems to be misleading.In Spring one way of binding objects is using the beaness of java classes. But that is not that only way to bind them together, constructor can be used to bind objects. So if configuration file used tags as follows, it would be more mea... More About: Tech , Opinion , Spring
Use "object" instead of "bean" in Spring Configuration XML
2008-09-03 13:42:00 Spring configuration xml is used for defining the wiring between different object. It has the following format. <beans> <bean id=".." class="..."> ... </bean> ...<beans>Classes specified in the configuration file will be instantiated by Spring container. And those objects will be bound with each other accordingly. Any java class specified under attribute named "class" will be instantiated. There is no much limitations on the classes that can be used for this here. It does not need to be a Java Bean . It can be any POJO (plan old java object). The only requirement is that this class must be possible to instantiate.So why does this tags are named <beans> and <bean>? This seems to be misleading.In Spring one way of binding objects is using the beaness of java classes. But that is not that only way to bind them together, constructor can be used to bind objects. So if configuration file used tags as follows, it would be more mea... More About: Tech , Opinion , Spring
Use "object" instead of "bean" in Spring Configuration XML
2008-09-03 13:42:00 Spring configuration xml is used for defining the wiring between different object. It has the following format. <beans> <bean id=".." class="..."> ... </bean> ... <beans> Classes specified in the configuration file will be instantiated by Spring... More About: Java , Tech , Opinion , Spring , Bean
Use "object" instead of "bean" in Spring Configuration XML
2008-09-03 13:42:00 Spring configuration xml is used for defining the wiring between different object. It has the following format. <beans> <bean id=".." class="..."> ... </bean> ...<beans>Classes specified in the configuration file will be instantiated by Spring container. And those objects will be bound with each other accordingly. Any java class specified under attribute named "class" will be instantiated. There is no much limitations on the classes that can be used for this here. It does not need to be a Java Bean . It can be any POJO (plan old java object). The only requirement is that this class must be possible to instantiate.So why does this tags are named <beans> and <bean>? This seems to be misleading.In Spring one way of binding objects is using the beaness of java classes. But that is not that only way to bind them together, constructor can be used to bind objects. So if configuration file used tags as follows, it would be more mea... More About: Tech , Opinion , Spring
Use "object" instead of "bean" in Spring Configuration XML
2008-09-03 13:42:00 Spring configuration xml is used for defining the wiring between different object. It has the following format. <beans> <bean id=".." class="..."> ... </bean> ...<beans>Classes specified in the configuration file will be instantiated by Spring container. And those objects will be bound with each other accordingly. Any java class specified under attribute named "class" will be instantiated. There is no much limitations on the classes that can be used for this here. It does not need to be a Java Bean . It can be any POJO (plan old java object). The only requirement is that this class must be possible to instantiate.So why does this tags are named <beans> and <bean>? This seems to be misleading.In Spring one way of binding objects is using the beaness of java classes. But that is not that only way to bind them together, constructor can be used to bind objects. So if configuration file used tags as follows, it would be more mea... More About: Tech , Opinion , Spring
Use "object" instead of "bean" in Spring Configuration XML
2008-09-03 13:42:00 Spring configuration xml is used for defining the wiring between different object. It has the following format. <beans> <bean id=".." class="..."> ... </bean> ...<beans>Classes specified in the configuration file will be instantiated by Spring container. And those objects will be bound with each other accordingly. Any java class specified under attribute named "class" will be instantiated. There is no much limitations on the classes that can be used for this here. It does not need to be a Java Bean . It can be any POJO (plan old java object). The only requirement is that this class must be possible to instantiate.So why does this tags are named <beans> and <bean>? This seems to be misleading.In Spring one way of binding objects is using the beaness of java classes. But that is not that only way to bind them together, constructor can be used to bind objects. So if configuration file used tags as follows, it would be more mea... More About: Tech , Opinion , Spring
Google Web Toolkit (GWT) & Servlets - Web application tutorial
2008-09-02 14:20:00 Google Web Toolkit (GWT) and Java Servlets used in one web application. This tutorial will take you though the steps of developing a simple web application with Google Web Toolkit and J2EE Servlet Technology. The application will have a servlet on server side and one web page.PrerequisitesBetter to be familiar with developing web applications with J2EE/ServletsKnowledge on deploying a web application into Tomcat web serverSystem RequirementsJDK installedApache Tomcat web server (download, any other web server can be used)GWT (download)In brief, GWT is a framework for developing Ajax based web pages with Java. All the HTML page content will be written as Java classes and converted into a set of Javascript files. For more information on GWT, refer to official site here. http://code.google.com/webtoolkit/Introdu ctionIn this tutorial we will create a simple web application which has one page. When a user clicks a button, web page content will be updated without refreshing or leaving th... More About: Google , Tutorial
Google Web Toolkit (GWT) & Servlets - Web application tutorial
2008-09-02 14:20:00 Google Web Toolkit (GWT) and Java Servlets used in one web application. This tutorial will take you though the steps of developing a simple web application with Google Web Toolkit and J2EE Servlet Technology. The application will have a servlet on server side and one web page.PrerequisitesBetter to be familiar with developing web applications with J2EE/ServletsKnowledge on deploying a web application into Tomcat web serverSystem RequirementsJDK installedApache Tomcat web server (download, any other web server can be used)GWT (download)In brief, GWT is a framework for developing Ajax based web pages with Java. All the HTML page content will be written as Java classes and converted into a set of Javascript files. For more information on GWT, refer to official site here. http://code.google.com/webtoolkit/Introdu ctionIn this tutorial we will create a simple web application which has one page. When a user clicks a button, web page content will be updated without refreshing or leaving th... More About: Google , Tutorial
Google Web Toolkit (GWT) & Servlets - Web application tutorial
2008-09-02 14:20:00 Google Web Toolkit (GWT) and Java Servlets used in one web application. This tutorial will take you though the steps of developing a simple web application with Google Web Toolkit and J2EE Servlet Technology. The application will have a servlet on server side and one web page.PrerequisitesBetter to be familiar with developing web applications with J2EE/ServletsKnowledge on deploying a web application into Tomcat web serverSystem RequirementsJDK installedApache Tomcat web server (download, any other web server can be used)GWT (download)In brief, GWT is a framework for developing Ajax based web pages with Java. All the HTML page content will be written as Java classes and converted into a set of Javascript files. For more information on GWT, refer to official site here. http://code.google.com/webtoolkit/Introdu ctionIn this tutorial we will create a simple web application which has one page. When a user clicks a button, web page content will be updated without refreshing or leaving th... More About: Google , Tutorial
Google Web Toolkit (GWT) & Servlets - Web application tutorial
2008-09-02 14:20:00 Google Web Toolkit (GWT) and Java Servlets used in one web application. This tutorial will take you though the steps of developing a simple web application with Google Web Toolkit and J2EE Servlet Technology. The application will have a servlet on server side and one web page.PrerequisitesBetter to be familiar with developing web applications with J2EE/ServletsKnowledge on deploying a web application into Tomcat web serverSystem RequirementsJDK installedApache Tomcat web server (download, any other web server can be used)GWT (download)In brief, GWT is a framework for developing Ajax based web pages with Java. All the HTML page content will be written as Java classes and converted into a set of Javascript files. For more information on GWT, refer to official site here. http://code.google.com/webtoolkit/Introdu ctionIn this tutorial we will create a simple web application which has one page. When a user clicks a button, web page content will be updated without refreshing or leaving th... More About: Google , Tutorial
Google Web Toolkit (GWT) & Servlets - Web application tutorial
2008-09-02 14:20:00 Google Web Toolkit (GWT) and Java Servlets used in one web application. This tutorial will take you though the steps of developing a simple web application with Google Web Toolkit and J2EE Servlet Technology. The application will have a servlet on server side and one web page.PrerequisitesBetter to be familiar with developing web applications with J2EE/ServletsKnowledge on deploying a web application into Tomcat web serverSystem RequirementsJDK installedApache Tomcat web server (download, any other web server can be used)GWT (download)In brief, GWT is a framework for developing Ajax based web pages with Java. All the HTML page content will be written as Java classes and converted into a set of Javascript files. For more information on GWT, refer to official site here. http://code.google.com/webtoolkit/Introdu ctionIn this tutorial we will create a simple web application which has one page. When a user clicks a button, web page content will be updated without refreshing or leaving th... More About: Google , Tutorial
Is Partitioning a hard disk into multiple drives bad?
2008-08-27 13:59:00 Hard disk partitioning is almost a must, according to what I have heard so far from my colleagues and other professionals (may be same for you). I am used to partition a hard disk at least to three drives; "C" for OS (Operating System), "D" for programs and "E for other files like documents, archives. But I got a chance to read some material on hard drive performance and it completely argued my partitioning practices.When considering the speed in reading a file from hard drive following are two important points related to partitioning.1. Files in outer tracks are readable much fasterIt is a well known theory in hard disk read/writes that performance is much higher in outer tracks compared to inner tracks.2. When partitioning a hard disk, the first partition is created in the outer tracksIn creating partitions, the first partition is created in the outer most tracks while each new partition is created in inner tracks than the previous. So the partitions in a hard disk would look as t... More About: Hardware , Windows , Tech , Opinion , Disk
Is Partitioning a hard disk into multiple drives bad?
More articles from this author:2008-08-27 13:59:00 Hard disk partitioning is almost a must, according to what I have heard so far from my colleagues and other professionals (may be same for you). I am used to partition a hard disk at least to three drives; "C" for OS (Operating System), "D" for programs and "E for other files like documents, archives. But I got a chance to read some material on hard drive performance and it completely argued my partitioning practices.When considering the speed in reading a file from hard drive following are two important points related to partitioning.1. Files in outer tracks are readable much fasterIt is a well known theory in hard disk read/writes that performance is much higher in outer tracks compared to inner tracks.2. When partitioning a hard disk, the first partition is created in the outer tracksIn creating partitions, the first partition is created in the outer most tracks while each new partition is created in inner tracks than the previous. So the partitions in a hard disk would look as t... More About: Hardware , Windows , Tech , Opinion , Disk 1, 2, 3, 4, 5, 6, 7 |



