[JBoss Seam] - Re: core resource-loader for resource bundles
by asookazian
I tried that and got the below stack trace. How will it know which resource bundle to process???
| Exception during request processing:
| Caused by javax.servlet.ServletException with message: "#{securityAuditAction.submit}: javax.ejb.EJBTransactionRolledbackException: Can't find resource for bundle org.jboss.seam.core.SeamResourceBundle, key test1"
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| java.lang.Thread.run(Unknown Source)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108262#4108262
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108262
18 years, 5 months
[Microcontainer] - Re: migrating from ServiceMBeanSupport
by alesj
"jhalliday" wrote :
| The software is used standalone as well as in JBossAS. Internally we will continue to use MBeans as that's easiest for the standalone version. The JBossAS integration previously called ServiceMBeanSupport.getServer() to get an MBeanServer for use internally. What is the equivalent call in MC (or AS5.0)?
|
MC is all about POJOs.
So there is no direct link to MBeanServer or other MC internals.
But you can simply get that injected - @Inject or via XML.
It's up to your bean. ;-)
"jhalliday" wrote :
| We previously used NotificationListener to register such that a method on our bean is invoked when some other bean (jboss.system:type=Server) entered a specified state (running). Is there a way to wire such a thing in MC? It's not quite the same as requiring the other bean to be started before our bean. Indeed, such a solution is not viable as we must start earlier. The BarrierController seems close to what I need but the example is old - is this functionality still present in MC? (http://wiki.jboss.org/wiki/Wiki.jsp?page=BarrierController)
|
You can use different dependency mechanisms. From the one's that already exist - depend, demand - or you can easily write your own.
Or there is also KernelEventListener - http://anonsvn.jboss.org/repos/jbossas/projects/microcontainer/trunk/kern... - if that's what suites you best.
e.g.
| <bean name="mybean" class="org.jboss.acme.FooBar">
| <demands state="Start">jboss.system:type=Server</demand>
| </bean>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108258#4108258
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108258
18 years, 5 months
[Remoting] - transporterclient not thread-safe for failover
by cbordelo
the jboss 1.4.1 transporterclient used by multithreaded program was giving strange results on a clustered server when failing over so i found lack of synchronization in the code.
I made these changes and seems to be helping.
changes to TransporterClient.java.
I would like this fixed in the 2.x and 3.x versions (hello developers).
I think i know how to fix the 2.x version of this code too as it has some new stuff but is likewise broken.
(developers send me an email to bord(a)iscp.telcordia.com if you need it. thx
Craig)
@@ -93,11 +93,12 @@
/**
* Disconnects the remoting client
*/
- private void disconnect()
+ private synchronized void disconnect()
{
if(remotingClient != null)
{
remotingClient.disconnect();
+ remotingClient = null;
}
}
@@ -232,14 +233,18 @@
do
{
+ Client rcl = null;
+ synchronized(this) { rcl = remotingClient; }
+ if (rcl == null) throw new CannotConnectException("Client has been dis
connected.");
try
{
failOver = false;
- response = remotingClient.invoke(request);
+ response = rcl.invoke(request);
}
catch(CannotConnectException cnc)
{
- failOver = findAlternativeTarget();
+ failOver = findAlternativeTarget(rcl);
+ if (log.isDebugEnabled()) log.error("on CannotConnectException failO
ver is "+failOver+" for "+rcl.getInvoker().getLocator());
if(!failOver)
{
throw cnc;
@@ -264,7 +269,7 @@
*
* @return
*/
- private boolean findAlternativeTarget()
+ private boolean findAlternativeTarget(Client rcl)
{
boolean failover = false;
@@ -287,12 +292,19 @@
{
// finally found server with target handler
InvokerLocator newLocator = data.getInvokerLocator();
- if(!remotingClient.getInvoker().getLocator().equals(new
Locator))
+ if(!rcl.getInvoker().getLocator().equals(newLocator))
{
try
{
- remotingClient = new Client(newLocator);
- remotingClient.connect();
+ synchronized(this) {
+ if (rcl == remotingClient) {
+ disconnect();
+ remotingClient = new Client(newLocator);
+ }
+ //otherwise have to assume some other thread
+ //has meanwhile changed it
+ //including even disconnecting
+ }
return true;
}
catch(Exception e)
@@ -300,6 +312,8 @@
log.warn("Problem connecting to newly found alter
nate target.", e);
}
}
+ else if (log.isDebugEnabled())
+ log.error(rcl.getInvoker().getLocator()+" == "+newLoc
ator);
}
}
}
@@ -333,4 +347,4 @@
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108251#4108251
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108251
18 years, 5 months