Gaurav Bhatia

Ranch Hand
+ Follow
since Jan 01, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gaurav Bhatia

Is it possible to inject beans to war deployed in jboss 5?
After searching through documentation and online tutorials, i understand need to package beans + war into an EAR and then deploy.

What is did :
Added beans to the war file, added listener to web.xml, added spring configuration file to WEB-INF folder and deployed the war.
Deployment fails with errors like

2011-09-07 02:45:59,356 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/ServerTime
2011-09-07 02:45:59,403 WARN [org.jboss.web.tomcat.service.injection.WebEJBRemoteHandler] (main) EJBTHREE-1289: Using legacy EjbEncInjector, because mappedName for enc "env/com.test.ws.server.ServerTime/bean", field "null" is null (container.environmentRefGroup.annotatedEjbReferences = [AnnotatedEJBReferenceMetaData{name=com.test.ws.server.ServerTime/bean,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=null,beanInterface=class com.test.ws.server.TestBean}])
2011-09-07 02:45:59,466 ERROR [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) ENC setup failed
java.lang.IllegalStateException: Resolution should not happen via injection container
at org.jboss.web.tomcat.service.TomcatInjectionContainer.getEjbJndiName(TomcatInjectionContainer.java:640)
at org.jboss.injection.EjbEncInjector.inject(EjbEncInjector.java:80)
at org.jboss.web.tomcat.service.TomcatInjectionContainer.populateEnc(TomcatInjectionContainer.java:482)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment$EncListener.lifecycleEvent(TomcatDeployment.java:471)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4388)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)



... 69 more
2011-09-07 02:45:59,622 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/jmx-console
2011-09-07 02:45:59,731 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS IN ERROR:
Deployment "vfszip:/C:/DevTools/jboss-5.1.0.GA/server/default/deploy/ServerTime.war/" is in error due to the following reason(s): java.lang.IllegalStateException: Resolution should not happen via injection container

12 years ago
Hi,

I have a query :

Environment :
Two jboss servers running, a distributed cache is shared between them and they add data to it. Both have simultaneous threads reading and processing data from the cache.
I need to ensure that data is fetched from both servers sequentially.

Solution : Run both nodes and using HASingleton mode of clustering, only the master node processes data. As and when the master goes down, slave gets notified and starts processing.

Problem : Reading through lots of articles, i learned that in HA singleton clustering, only one node has the war or application deployed. Second node deploys the application only when the first or master dies.
I dont want that case. I need both nodes up and running, but only master doing the processing of messages. Cannot afford any downtime.

Thanks in advance.

Gaurav
12 years ago
Hi All,

I have few web-services deployed in JBoss 5 and on opening JMX-console i can see the mbean registered and 4 methods available i.e. create, start, stop and destroy (under jboss.web.deployment category)

I need to provide a web interface to the webservices so that start/stop/read the config file/reload some caches can be done in the running process. Thought to leverage on the existing jboss-jmx view and add extra methods to perform these operations.

Is there some way to do that? i mean extending from some jboss interface class and configuring jboss to make the new methods available?

Thanks in advance.

Cheers
12 years ago
I have a Java process running and exchanging messages over ems to other components and exposing RMI services.
On an exception from ems server (i.e. when EMS connection is lost), i call System.exit(1).

There is a shutdown hook that gets called, this closes the ems connections.
After this the process keeps on running and doesn't die.

Any thoughts what could be stopping it from getting crashed?

Thanks,
13 years ago
I am able to compile and run it without any modification.


The call is using reference of class A. And as per the method definition i.e process method in class A, it throws an Exception. So, while making the call you need to enclose this in try catch blocks.
HTH
"this" here refers to the reference of the class testing1.
This is happening because you are trying to create an instance of the inner class directly which is NOT allowed.
I tried and it worked without the explicit cast also.

I used ->

PS: Using JDK 1.5 and Eclipse as IDE
Hi Steve,
Any book that you followed and would like to recommend?

Also, I did SCJP5 a few days back....Now, i have to do both SCJD and SCWCD.
But not sure in which order i should proceed. Any suggestions.

Thanks!!
Can you please share some information regarding the books followed?
thanks
15 years ago
After how many days did you receive that.
I appeared for the exam two weeks ago and haven't received any email or mail for that.
Even on trying to register at the Sun's Certification Manager being the first time user it doesn't allows login using all the details that i have in the printed document that i received after clearing the exam from prometric centre.

Thanks!!
Hi,

What is the best book to refer for preparation of SCBCD exam?

Thanks!!
Hi,

What is the best book to refer for preparation of SCWCD exam?

Thanks!!
Hi,

What is the best book to refer for preparation of SCJD exam?

Thanks!!
Hi Guys....
Apologies if i am posting this question in wrong section. But to be honest couldn't find a better section in the list of forums available.

Last week i cleared SCJP 5 certification and really excited to go for a few more certifications.
Now, i am confused if i should go ahead with SCWCD -> SCBCD -> SCJD or should directly work for the SCJD.
I have good experience in Java Swings and Core Java. But have very less experience in EJB and Servlets part.
Kindly share your thoughts and suggestions on the same. I have planned to do atleast 2-3 more certifications in the next 1 year time frame.

Thanks!!