Server:Apache...
X-Powered-By:PHP/7.0.28
The main IP address: 52.66.162.32,Your server United States,Seattle ISP:Amazon Technologies Inc. TLD:com CountryCode:US
The description :spring bean scopes...
This report updates in 10-Aug-2018
Created Date: | 2018-05-01 |
Changed Date: | 2018-05-01 |
Geo IP provides you such as latitude, longitude and ISP (Internet Service Provider) etc. informations. Our GeoIP service found where is host myjavablog.com. Currently, hosted in United States and its service provider is Amazon Technologies Inc. .
Latitude: | 47.627498626709 |
Longitude: | -122.34619903564 |
Country: | United States (US) |
City: | Seattle |
Region: | Washington |
ISP: | Amazon Technologies Inc. |
HTTP Header information is a part of HTTP protocol that a user's browser sends to called Apache containing the details of what the browser wants and will accept back from the web server.
Content-Length: | 36916 |
X-Powered-By: | PHP/7.0.28 |
Set-Cookie: | ct_sfw_pass_key=33f9e5fac4e07e5270488d8639d4ec85; path=/, ct_cookies_test=42f1edc797adcadaff863a42ffc86493; path=/, apbct_timestamp=1533907820; path=/, apbct_prev_referer=http%3A%2F%2Fwww.bing.com%2F; path=/, apbct_site_landing_ts=1533907820; path=/, apbct_page_hits=1; path=/, apbct_cookies_test=%7B%22cookies_names%22%3A%5B%22apbct_timestamp%22%2C%22apbct_prev_referer%22%2C%22apbct_site_landing_ts%22%2C%22apbct_page_hits%22%5D%2C%22check_value%22%3A%221b88a27a9361478ea73285a81ee785a6%22%7D; path=/ |
Content-Encoding: | gzip |
Vary: | Cookie,Accept-Encoding |
Keep-Alive: | timeout=2, max=100 |
Server: | Apache |
Connection: | Keep-Alive |
Link: | |
Cache-Control: | max-age=0, no-cache |
Date: | Fri, 10 Aug 2018 13:30:20 GMT |
X-Frame-Options: | SAMEORIGIN |
Content-Type: | text/html; charset=UTF-8 |
X-Mod-Pagespeed: | 1.9.32.14-0 |
soa: | dns1.bigrock.in. anup.bhagwat7.rediffmail.com. 2018070702 7200 7200 172800 38400 |
ns: | dns2.bigrock.in. dns4.bigrock.in. dns1.bigrock.in. dns3.bigrock.in. |
ipv4: | IP:52.66.162.32 ASN:16509 OWNER:AMAZON-02 - Amazon.com, Inc., US Country:US |
skip to content scriptthome myjavablog menu spring core spring introduction spring ioc container types spring hello world spring annotation based configuration spring inversion of control(ioc) vs dependency injection(di) spring setter injection spring constructor injection spring bean scopes spring boot spring boot introduction spring boot hello world spring boot + angular js + hibernate crud restful webservices using spring boot spring boot + spring security spring boot data jpa+ angular js + mysql database crud spring boot + activemq interview questions immutable class in java collections interview questions core java java basics 1 introduction to java 2. java environment setup 3. hello world java collections in java hashcode and equals methods in java spring bean scopes august 6, 2018 july 22, 2018 by anup bhagwat in this example , we will see bean scopes in spring container . in spring 5 below scopes (websocket) have been newly introduced – scope description singleton (default) single bean object instance per spring ioc container prototype opposite to singleton, it produces a new instance each and every time a bean is requested. request return a single bean instance per http request.only valid in web-aware spring applicationcontext . session return a single bean instance per http session.only valid in web-aware spring applicationcontext . application a single instance will be created and available during complete lifecycle of servletcontext .only valid in web-aware spring applicationcontext . websocket a single instance will be created and available during complete lifecycle of websocket .only valid in web-aware spring applicationcontext . tools used to create below project – spring 5.0.7.release maven 3.3 java 8 eclipse neon.2 github link : download step 1: create simple maven project with spring configuration step 2: configure maven dependencies below pom.xml file contains the dependencies required for spring project – <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.myjavablog</groupid> <artifactid>springbeanscopesdemo</artifactid> <version>0.0.1-snapshot</version> <packaging>jar</packaging> <name>springbeanscopesdemo</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceencoding>utf-8</project.build.sourceencoding> <spring.version>5.0.7.release</spring.version> </properties> <dependencies> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <version>3.8.1</version> <scope>test</scope> </dependency> <!-- spring 5 dependencies --> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-core</artifactid> <version>${spring.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-context</artifactid> <version>${spring.version}</version> </dependency> </dependencies> </project> below project structure will be created for you by eclipse . step 3: create city.java under com.myjavablog.beans package – city.java package com.myjavablog.beans; /** * @author anupb * */ public class city { string cityname; public string getcityname() { return cityname; } public void setcityname(string cityname) { this.cityname = cityname; } } these are bean files where we have only getters and setters defined. step 4: create applicationcontext.xml under /src/main/resources- applicationcontext.xml <div id="crayon-5b537011533c5704156605-2" class="crayon-line crayon-striped-line"> <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:context="http://www.springframework/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <!-- default singleton scope bean --> <bean id="citysingletonbean" class="com.myjavablog.beans.city"> </bean> <!-- proptotype scope bean--> <bean id="cityprototypebean" class="com.myjavablog.beans.city" scope="prototype"> </bean> </beans> </div> step 5: create a beanscopesmain.java under com.myjavablog package – package com.myjavablog; import org.springframework.context.applicationcontext; import org.springframework.context.support.classpathxmlapplicationcontext; import com.myjavablog.beans.city; public class beanscopesmain { public static void main(string[] args) { @suppresswarnings("resource") applicationcontext beanfactory = new classpathxmlapplicationcontext("applicationcontext.xml"); //default singleton scope bean city singletonbeaninstance1 = (city) beanfactory.getbean("citysingletonbean"); singletonbeaninstance1.setcityname("pune"); system.out.println("singleton bean value: "+singletonbeaninstance1.getcityname()+"---------- instance hashcode: "+singletonbeaninstance1.hashcode()); city singletonbeaninstance2 = (city) beanfactory.getbean("citysingletonbean"); system.out.println("singleton bean value: "+singletonbeaninstance2.getcityname() +"---------- instance hashcode: "+singletonbeaninstance2.hashcode()); //proptotype scope bean city prototypebeaninstance1 = (city) beanfactory.getbean("cityprototypebean"); prototypebeaninstance1.setcityname("pune"); system.out.println("prototype bean value: "+prototypebeaninstance1.getcityname()+"---------- instance hashcode: "+prototypebeaninstance1.hashcode()); city prototypebeaninstance2 = (city) beanfactory.getbean("cityprototypebean"); prototypebeaninstance2.setcityname("pune"); system.out.println("prototype bean value: "+prototypebeaninstance2.getcityname()+"---------- instance hashcode: "+prototypebeaninstance2.hashcode()); } } we have created applicationcontext which actually loads bean definitions from xml configuration. output: singleton bean value: pune---------- instance hashcode: 1509563803 singleton bean value: pune---------- instance hashcode: 1509563803 prototype bean value: pune---------- instance hashcode: 684874119 prototype bean value: null---------- instance hashcode: 1157740463 in case of singleton bean , when we firstly called getbean and retrieved city object and set cityname to “pune” and when second time we called getbean method it did nothing but returned same object with cityname as “pune”. both the objects has same hashcodes as its same object. in case of prototype bean ,when we firstly called getbean and retrieved city object and set cityname to “pune”and when second time we called getbean method it returned new object with cityname as “null”. both the objects has different hashcodes shows these are completely different and created freshly. step 6: clean and install project now run the maven clean install phase as below – command: mvn clean install or right click on project -> debug as -> maven build . below popup will come up – step 7: run the spring application as java application output: singleton bean value: pune---------- instance hashcode: 1509563803 singleton bean value: pune---------- instance hashcode: 1509563803 prototype bean value: pune---------- instance hashcode: 684874119 prototype bean value: null---------- instance hashcode: 1157740463 categories spring core leave a comment spring constructor injection august 6, 2018 july 22, 2018 by anup bhagwat in th
http://www.myjavablog.com/page/3/
http://www.myjavablog.com/wp-login.php
http://www.myjavablog.com/2018/07/21/4-spring-annotation-based-configuration/#respond
http://www.myjavablog.com/spring/
http://www.myjavablog.com/2018/07/20/5-spring-inversion-of-controlioc-vs-dependency-injectiondi/
http://www.myjavablog.com/bitnami/index.html
http://www.myjavablog.com/2018/07/
http://www.myjavablog.com/2018/06/29/4-restful-webservices-using-spring-boot/
http://www.myjavablog.com/2018/07/21/4-spring-annotation-based-configuration/
http://www.myjavablog.com/2018/05/23/core-java-tutorial-for-beginners/#comment-35
http://www.myjavablog.com/2018/05/23/core-java-tutorial-for-beginners/#comment-36
http://www.myjavablog.com/category/spring-core/
http://www.myjavablog.com/2018/06/29/1-spring-boot-introduction/
http://www.myjavablog.com/2018/07/14/1-spring-introduction/#respond
http://www.myjavablog.com/2018/07/22/6-spring-setter-injection/#respond
Whois is a protocol that is access to registering information. You can reach when the website was registered, when it will be expire, what is contact details of the site with the following informations. In a nutshell, it includes these informations;
Domain Name: MYJAVABLOG.COM
Registry Domain ID: 2258884123_DOMAIN_COM-VRSN
Registrar WHOIS Server: Whois.bigrock.com
Registrar URL: http://www.bigrock.com
Updated Date: 2018-05-01T13:04:41Z
Creation Date: 2018-05-01T13:04:40Z
Registry Expiry Date: 2019-05-01T13:04:40Z
Registrar: BigRock Solutions Limited
Registrar IANA ID: 1495
Registrar Abuse Contact Email: [email protected]
Registrar Abuse Contact Phone: +1.2013775952
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Name Server: DNS1.BIGROCK.IN
Name Server: DNS2.BIGROCK.IN
Name Server: DNS3.BIGROCK.IN
Name Server: DNS4.BIGROCK.IN
DNSSEC: unsigned
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2019-01-25T04:14:17Z <<<
For more information on Whois status codes, please visit https://icann.org/epp
NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar. Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.
TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability. VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.
The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.
REGISTRAR BigRock Solutions Limited
SERVERS
SERVER com.whois-servers.net
ARGS domain =myjavablog.com
PORT 43
TYPE domain
DOMAIN
NAME myjavablog.com
CHANGED 2018-05-01
CREATED 2018-05-01
STATUS
clientTransferProhibited https://icann.org/epp#clientTransferProhibited
NSERVER
DNS1.BIGROCK.IN 162.251.82.122
DNS2.BIGROCK.IN 162.251.82.249
DNS3.BIGROCK.IN 162.251.82.246
DNS4.BIGROCK.IN 162.251.82.253
REGISTERED yes
The following list shows you to spelling mistakes possible of the internet users for the website searched .