[EJB/JBoss] - Passivation - can its time of occurance be controlled? (4.2.
by konkimalla
We use a stateful session bean, which opens a socket connection. It is understood that during the passivation this connection needs to be closed, otherwise the connection becomes hung state and becomes useless during the next garbage collection time. So, during activation we are reopening the connection and everything works well.
I observed that in 4.2.1.ga, passivation happens approximately 6 to 10 mins. I have seen the variation in the time. I thought of removing the passivation, so edited the following file
ejb3-clustered-sfsbcache-service.xml with to have false. Even after running using "-c all" option, I see passivation is happening; I see logs showing that the state is getting stored in a file.
1) Is there any way I can stop the passivation?
2) Is there any way to increase the time of passivation to "x" mins.
This is becoming a bottleneck to our requirement. Hence, Please give me a solution.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093090#4093090
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093090
18Â years, 7Â months
[JBossWS] - @EJB in a web service
by trippstowe
I am having some problems with dependency injection of an ejb in a webservice on jboss 4.0.5. What am i doing wrong?
The below code i have also tried @EJB without any parameters:
Also i could not get the setter to work either. it never entered the setter and displayed the logs.
| @EJB(name="LookupTest/remote",
| beanInterface=RemoteLookupTest.class)
| RemoteLookupTest ps;
|
| /* public void setPersonService(RemoteLookupTest newPs){
| log.info("injecting new personService: "+newPs);
| this.ps = newPs;
| log.info("injected personService: ps="+ps);
| }
| */
| @WebMethod
| public Person queryPerson(long personId) throws RemoteException{
| System.out.println(ps.getName());
| }
|
this code gives me a null pointer exception at the ps.getName();
this next code snippet is the next function in the web service and it works fine. this makes me think that the bean is deployed correctly.
| @WebMethod
| public void testLookupBean() throws RemoteException{
| try{
| Context ctx = new InitialContext();
| String jndiName = "LookupTest/remote";
| RemoteLookupTest obj = (RemoteLookupTest)ctx.lookup(jndiName);
| System.out.println(obj.getName());
|
thanks in advance
-==-
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093087#4093087
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093087
18Â years, 7Â months