BeanFactory | ApplicationContext |
---|---|
Does not support the Annotation based dependency Injection. | Support Annotation based dependency Injection.-@Autowired, @PreDestroy |
Does not support. | Can publish events to beans that are registered as listeners. |
Does not support way to access Message Bundle(internationalization (I18N). | Support internationalization (I18N) messages. |
Does not support. | Support many enterprise services such JNDI access, EJB integration, remoting. |
By default its support Lazy loading. | its By default support Aggresive loading. |
Master in Web Development Provide Interview Questions for All IT Software and Coding Language. Like: Java Collection Interview Questions, .net Interview Questions, Design & UI Interview Questions & All Type of IT Job Interview Questions.
Showing posts with label java. Show all posts
Showing posts with label java. Show all posts
Friday, March 15, 2019
[Spring Interview Question] - Difference between BeanFactory and ApplicationContext in Spring?
Labels:
Application Context,
Bean,
BeanFactory,
Context,
j2ee,
java,
Spring,
Spring Framework
Location:
Rajkot, Gujarat, India
Monday, December 5, 2016
Java Alternative Version For Ubantu
Choose Java Alternative Version :
When we have got multiple versions of Java installed, we can choose which one you want to use by running the update-alternatives command.
Running below command shows a list of installed Java JDKs and JREs allowing one to be selected as the default that is used when java needs to be executed.
$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
* 2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051 manual mode
Press enter to keep the current choice[*], or type selection number: 2
To choose a default javac compiler, run the following command.
$ sudo update-alternatives --config javac
If we prefer to use a gui instead of the command line, we can execute galternatives instead and define the default versions of software with the following dialog.
$ sudo galternatives
Labels:
java,
Java Ubantu,
Oracle Java
Location:
Rajkot, Gujarat, India
Saturday, December 3, 2016
Eclipse IDE - If server option is disable due to some issue
If server option is disable due to some issue when we configure tomcat then..
- Close Eclipse
- In
{workspace-directory}/.
delete the following two files:metadata/.plugins/org.eclipse. core.runtime/.settings org.eclipse.wst.server.core.
prefs org.eclipse.jst.server.tomcat.
core.prefs
- Restart Eclipse
Location:
Rajkot, Gujarat, India
Friday, November 11, 2016
Rotate Tomcat catalina.out (If catalina.out becomes bulky in size, tomcat crashes and fails to start without any error message)
Rotate Tomcat catalina.out
If catalina.out becomes bulky in size, tomcat crashes and fails to start without any error message.
To avoid this scenario you should rotate catalina.out frequently.
Step - 1)create file [any directory] with name "tomcatrotate"
Step - 2)
add content
/opt/apache-tomcat-7.0.67/logs/catalina.out {
compress
copytruncate
daily
dateext
dateformat %Y-%m-%d
extension .out
missingok
rotate 14
size 100k
su root root
}
Step – 3)
after move to - /etc/logrotate.d/
sudo cp -i /home/minesh/Downloads/tomcatrotate /etc/logrotate.d/
Step - 4)
change the permission 777 to 644
sudo chmod -R 644 lportal
Step – 5)
after this test with below command it will do empty catalina.out and create its catalina2016-11-11.out.gz.
sudo /usr/sbin/logrotate -vf -s /var/log/logrotate-status /etc/logrotate.d/tomcatrotate
special thanks : https://masterinwebdev.blogspot.in/2016/11/tomcat-catalina.html
Labels:
catalina,
catalina.out,
j2ee,
java,
Tomcat,
tomcat server
Location:
Rajkot, Gujarat, India
Subscribe to:
Posts (Atom)