[Microcontainer] - Re: How to install a bean without affecting unrelated bean's
by jaikiran
"alesj" wrote :
| You don't know if it's really (un)related until you tried it.
| How else would you know that beanX is not related to beanY
|
Isn't this possible by just checking the dependencies of beanX?
"alesj" wrote :
| The recursion shouldn't be too big, since if bean has no real dependencies, it's moved to installed on first attempt, hence not hugely involved anymore in context state changing/checking.
|
I need to explain this a bit more :) The (MC) bean (=proxyfactory) has no real dependencies. Infact the question is not really about dependencies. Its more of a single install triggering a recursive installation of all other (unrelated) contexts that are available in the controller. The controller recursively installs these based on *states* and not because those are any dependencies of the bean being installed:
// This one resolves all the contexts by State. So if there are N number of contexts in
| // the ready to start state, their state will be incremented even if they are not
| // real dependencies of the original context that was passed for "install"
| protected boolean resolveContexts(ControllerState fromState, ControllerState toState, boolean trace)
| {
| boolean resolutions = false;
| Set<ControllerContext> unresolved = contextsByState.get(fromState);
| Set<ControllerContext> resolved = resolveContexts(unresolved, toState, trace);
| if (resolved.isEmpty() == false)
| {
| for (ControllerContext context : resolved)
| {
| Object name = context.getName();
| if (fromState.equals(context.getState()) == false)
| {
| if (trace)
| log.trace("Skipping already installed " + name + " for " + toState.getStateString());
| }
| else if (installing.add(context) == false)
| {
| if (trace)
| log.trace("Already installing " + name + " for " + toState.getStateString());
| }
| else
| {
| try
| {
| if (trace)
| log.trace("Dependencies resolved " + name + " for " + toState.getStateString());
|
| if (incrementState(context, trace))
|
"alesj" wrote :
| And 300+ should be the number we can handle ...
Right now not :) The application that i attached is bare minimal in terms of dependencies within the beans.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219890#4219890
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219890
17 years, 1 month
[EJB/JBoss] - Re: MDB 'at most, once' delivery (Ack before onMessage)
by azda
Ok, I checked and JMSRedelivered is set to false.
After pouring over the specs, I think I've corrected some of my misunderstandings.
According to the JMS spec, with AUTO_ACKNOWLEDGE, the acknowledgment occurs after receive or onMessage. Since the MDB is using the MessageListener interface, I would assume the receipt must happen after onMessage. I guess what I'm really after is CLIENT_ACKNOWLEDGE, which the EJB spec does not support. (Unfortunate, because I'll just have to waste time doing all the JMS and thread pool programming to simulate an EJB container with this functionality. That, or do duplicate checking)
All that said, I still think there is a bug with AUTO_ACKNOWLEDGE. The JMS spec states that the client should be prepared for re-delivery of the last consumed message, for this very reason. (Processing occurring in onMessage, and JMS crashing before receipt). It states that in this situation, JMSRedelivered should be set to true. (Which it is not in my example). I'll have to do more testing, and take my questions to the JMS forum.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219887#4219887
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219887
17 years, 1 month
[Microcontainer] - Re: How to install a bean without affecting unrelated bean's
by alesj
"jaikiran" wrote : "alesj" wrote :
| | If you wanted this, it would mean you would have to express all your
| | "unrelated" dependencies, hence making it *related*. :-)
| |
| Not sure i understand this - the BMD being installed (Bean2) has all the related dependencies defined within itself. And those dependencies are *not* on Bean3 or any other contexts.
|
You don't know if it's really (un)related until you tried it.
How else would you know that beanX is not related to beanY
unless you tried to push beanY past some state or by inspecting all dependencies out there.
"jaikiran" wrote :
| Since proxyfactory and the other contexts are unrelated and independent, i would have expected no state change on other beans when proxyfactory is installed thus avoiding this recursion on the same method.
|
This is by design, we try to move anything until something previously still moved.
The recursion shouldn't be too big, since if bean has no real dependencies,
it's moved to installed on first attempt, hence not hugely involved anymore in context state changing/checking.
And 300+ should be the number we can handle ...
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219882#4219882
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219882
17 years, 1 month
[JBossWS] - Missing jar file /java class com.sun.tools.internal.xjc.api
by pinan
Hi
I am trying ot intergrate a 3rd party web services on Jboss 5.01.(with hava version 6)
Having got as far as the web services being listed in http://127.0.0.1:8080/jbossws/services, when I try to access them I get an detailed exception followed by a JAXBException refering to a missing class com.sun.tools.internal.xjc.api.XJC
Which I have assumed is from a jar file that I missing.
I have found a reference to this class on DocJar, but no jar library.
I have been through the entire collection of jars supplied with Glass fish, suns web develiopers pack, etc(jar tvf |grep blah, etc) with no luck.
Has anybody got any clue if this if this class belongs to a published jar or where I could find that jar.
Web trace is
java.lang.IllegalStateException: Unable to create schema compiler
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:264)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:196)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:175)
at uk.co.infoterra.geostore.bean.stateful.UserManager.(UserManager.java:169)
at uk.co.infoterra.geostore.util.InitEnvListener.buildSessionData(InitEnvListener.java:138)
at uk.co.infoterra.geostore.util.InitEnvListener.sessionCreated(InitEnvListener.java:411)
at org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:397)
at org.apache.catalina.session.StandardSession.setId(StandardSession.java:369)
at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:829)
at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:291)
at org.apache.catalina.connector.Request.doGetSession(Request.java:2367)
at org.apache.catalina.connector.Request.getSession(Request.java:2094)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
at uk.co.infoterra.geostore.httpservlet.PageGenerator.doRequest(PageGenerator.java:159)
at uk.co.infoterra.geostore.httpservlet.PageGenerator.doGet(PageGenerator.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at uk.co.infoterra.geostore.filter.LoggerFilter.doFilter(LoggerFilter.java:133)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.bind.JAXBException
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.tools.internal.xjc.api.XJC from BaseClassLoader@ef2f9f{VFSClassLoaderPolicy@11f993c{name=vfszip:/C:/
jb/jboss-5.0.1.GA/server/default/deploy/cxf-2.1.4.jar/ domain=ClassLoaderDomain@18fc9ba{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss
.system.NoAnnotationURLClassLoader@12c7568} roots=[MemoryContextHandler@25507275[path= context=vfsmemory://5d3fja-1v9hx6-fsiltcp3-1-fsilup4k-22
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219880#4219880
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219880
17 years, 1 month
[Microcontainer] - Re: How to install a bean without affecting unrelated bean's
by jaikiran
"alesj" wrote :
| If you wanted this, it would mean you would have to express all your
| "unrelated" dependencies, hence making it *related*. :-)
|
Not sure i understand this - the BMD being installed (Bean2) has all the related dependencies defined within itself. And those dependencies are *not* on Bean3 or any other contexts.
"alesj" wrote :
| Why would this bother you?
|
Okay, so here's the real issue https://jira.jboss.org/jira/browse/EJBTHREE-1724 and here's what's happening (the real scenario which i mocked in my post earlier):
1) Consider an application having around 300 EJBs
2) EJBContainer (this is the Bean1 we talked in my first post) corresponding to one of these 300 beans has a start which installs a proxyfactory (bean2 in the earlier post).
2) The kernel internally has other contexts for remaining 299 beans ready to be pushed to START.
3) The proxyfactory (bean2) is *not* dependent on any of these 299 beans (kernel contexts Bean3, Bean4, Bean5 that we discussed in my first post) and ideally can be "installed" without having to do anything with the remaining 299 contexts. (This isn't the case currently in MC - read #4 below)
4) Right now in MC, the proxyfactory install (which was triggered by the EJBContainer (Bean1)) triggers a START of Bean3 which installs proxyfactory2 which then triggers START of someother context (Bean4) and this goes on and on for all those 300 beans and effectively leads to a recursive call on the same instance of AbstractController install method, leading to a StackOverflowError.
Since proxyfactory and the other contexts are unrelated and independent, i would have expected no state change on other beans when proxyfactory is installed thus avoiding this recursion on the same method.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219868#4219868
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219868
17 years, 1 month