[JBoss Microcontainer Development] New message: "Profiling the dependency project"
by Kabir Khan
JBoss development,
A new message was posted in the thread "Profiling the dependency project":
http://community.jboss.org/message/525047#525047
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
Since the indexing dependency resolver I have been working on does not yield the performance improvements I was hoping for, I am now benchmarking the dependency project in isolation. It makes profiling a lot easier since there is a lot less other things going on which is the case when starting up the application server. My thinking now is that we should do the same for the other MC modules.
One thing is to not try to resolve contexts that are in the INSTALLED state (or where the , from AbstractController.resolveContexts(boolean), this shaves off about 20% for contexts installed in the right order. See http://community.jboss.org/message/524747#524747 for a description of the benchmark.
for (ControllerState fromState : stateModel)
{
ControllerState toState = stateModel.getNextState(fromState);
- if (resolveContexts(fromState, toState, trace))
+
+ if (stateModel.isValidState(toState))
{
- resolutions = true;
- break;
+ if (resolveContexts(fromState, toState, trace))
+ {
+ resolutions = true;
+ break;
+ }
}
}
}
Another simple thing that cuts deploying 2000 contexts
-with dependencies in the right order from 852ms->789ms
-with dependencies in the right order from 12788ms->8320ms
is to further modify resolveContexts to not break out of the loop once it resolves some contexts for a state, e.g.
boolean resolutions = true;
while (resolutions || onDemandEnabled)
{
if (onDemandEnabled)
wasOnDemandEnabled = true;
onDemandEnabled = false;
resolutions = false;
for (ControllerState fromState : stateModel)
{
ControllerState toState = stateModel.getNextState(fromState);
if (stateModel.isValidState(toState))
{
if (resolveContexts(fromState, toState, trace))
{
resolutions = true;
// break; // Don't exit here
}
}
}
}
Profiling this for 500 contexts reduces the number of calls to the nested resolveContexts from
-17,500 to 7000 (right order)
-17,500 to 10,493 (wrong order), a bit down the line we end up with 377K instead of 627K calls to resolveDependencies()
All tests pass apart from the ones mentioned in http://community.jboss.org/message/524862#524862 which I know how to fix if Ales agrees:
> mailto:kabir.khan@jboss.com wrote:
>
> I mean this:
>
> *public* *void* testPlainLifecycleDependencyWrongOrder() *throws* Throwable
> {
> plainLifecycleDependencyWrongOrder();
>
> ControllerContext context2 = assertInstall(1, "Name2", ControllerState.+CONFIGURED+);
> ControllerContext context1 = assertInstall(0, "Name1");
> +assertEquals+(ControllerState.+INSTALLED+, context2.getState());
>
> SimpleBeanWithLifecycle bean1 = (SimpleBeanWithLifecycle) context1.getTarget();
> +assertNotNull+(bean1);
>
> SimpleBeanWithLifecycle bean2 = (SimpleBeanWithLifecycle) context2.getTarget();
> +assertNotNull+(bean2);
>
> +assertEquals+(1, bean1.createOrder);
> +assertEquals+(2, bean2.createOrder);
> +assertEquals+(3, bean1.startOrder);
> +assertEquals+(4, bean2.startOrder);
> }
>
> The new resolver works with
> +assertEquals+(1, bean1.createOrder);
> +assertEquals+(2, bean1.startOrder);
> +assertEquals+(3, bean2.createOrder);
> +assertEquals+(4, bean2.startOrder);
>
> The actual hardcoded orders of beans 1 and 2 is an implemetation detail as I see it. The real check is making sure that the initial install of context 2 does not go beyond CONFIGURED and:
> bean1.startOrder > bean1.createOrder
> bean2.startOrder > bean2.createOrder
> bean2.createOrder > bean1.createOrder
> bean2.startOrder > bean1.startOrder
>
> I've got an infinite loop in the indexing resolver when I start up AS which I need to fix before I can get any measurements of boot time, although it sounds like we won't gain much from this.
>
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/525047#525047
16 years, 1 month
[JBoss ESB Development] New message: "ftp action - how can it be filtered on timestamp?"
by venkata ramana
JBoss development,
A new message was posted in the thread "ftp action - how can it be filtered on timestamp?":
http://community.jboss.org/message/525033#525033
Author : venkata ramana
Profile : http://community.jboss.org/people/pvrpvrpvr
Message:
--------------------------------------------------------------
We are having in the properties to monitor files with the given extention for ftp download. Is there any provision to consider only the files after some timestamp. (I want to monitor files created only after 1/1/2010. The site may contain the files dates back to 2009/2008 years
<ftp-bus busid="helloFTPChannel" >
<ftp-message-filter
username="@FTP_USERNAME@"
password="@FTP_PASSWORD@"
read-only="true"
passive="false"
directory="@FTP_DIRECTORY@"
input-suffix=".dat"
work-suffix=".esbWorking"
post-delete="false"
post-suffix=".COMPLETE"
error-delete="false"
error-suffix=".HAS_ERROR"
/>
</ftp-bus>
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/525033#525033
16 years, 1 month
[JBoss Web Development] New message: "Jboss BMP problem"
by Shivey Upadhyay
JBoss development,
A new message was posted in the thread "Jboss BMP problem":
http://community.jboss.org/message/525024#525024
Author : Shivey Upadhyay
Profile : http://community.jboss.org/people/Shivey
Message:
--------------------------------------------------------------
public interface HelloWorldHome extends javax.ejb.EJBHome{
public void create() throws java.rmi.RemoteException, com.MyException;
}
--This is a BMP--
public class HelloWorldBean implements EntityBean{
----implemented methods----
public HelloWorldEntity ejbCreate() throws com.MyException{
throw new MyException("This is explicitly thrown.")
}
}
package com;
public class MyException extends RuntimeException{
--custom code to store message goes here--
}
Hi,
I am trying to run above BMP in JBoss, i want to get the message "This is explicitly thrown." at client, but my exception is not wrapped
into Remote exception and the message that i get is like "java.lang.IllegalStateException Cannot obtain isMethod flag for....".
Is there any way i can send this specific runtime exception message to client.
Thanks in advance.
Shivey
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/525024#525024
16 years, 1 month
[EJB 3.0 Development] New message: "How to get all session beans from JBoss server"
by Thomas Bartsch
JBoss development,
A new message was posted in the thread "How to get all session beans from JBoss server":
http://community.jboss.org/message/525022#525022
Author : Thomas Bartsch
Profile : http://community.jboss.org/people/tbar0711
Message:
--------------------------------------------------------------
Hi,
I'm using JBoss 4.2.3. At the moment I'm programming a short application. This application should locate all session beans in an deployed ear-file. Then I should be able to make a reflection to each session bean and find out which annotations it implements.
Currently I have the problem that I don't know how to get all the beans as classes without knowing the name of the beans. Perhaps it is possible to get all beans as classes to be able to make reflections and identify the session beans by analyzing their annotations?
Hope anybody can help.
Regards
Tom
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/525022#525022
16 years, 1 month