[Design of EJB 3.0] - Re: EJBTHREE-1800 Current status on performance improvement
by jaikiran
"jaikiran" wrote :
|
| 1) ... (/reinitialization)
|
|
During EJB3Deployment processing, we have this piece of code:
| List<Container> containers = handler.getContainers(cf, this);
| for (Container con : containers)
| {
| // EJBContainer has finished with all metadata initialization from XML files and such.
| // this is really a hook to do some processing after XML has been set up and before
| // and processing of dependencies and such.
| try
| {
| ((EJBContainer) con).instantiated();
|
|
handler.getContainers returns the correct container and also internally initializes all the AOP related stuff for the BeanContainer. After all this initialization is done, the next line we do this:
| ((EJBContainer) con).instantiated();
|
which internally does:
| public void instantiated()
| {
| this.businessInterfaces = resolveBusinessInterfaces();
|
| // Before we start to process annotations, make sure we also have the ones from interceptors-aop.
| // FIXME: because of the flaked life cycle of an EJBContainer (we add annotations after it's been
| // constructed), we must reinitialize the whole thing.
| beanContainer.reinitializeAdvisor();
|
| }
|
Does the comments still hold good? Because, i don't see anything in the code (between those 2 lines) which neccessitates the reinitialization. The re-initializing causes all of the (time consuming) AOP stuff to be done again. Am i missing something?
Can we remove the reinitialization part? (I am going to start a testsuite run with this change to see if it affects any functionality, but wanted to have other inputs).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228895#4228895
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228895
15 years, 8 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JSON serialization issues
by timfox
"jmesnil" wrote : I've encountered several issues with JSON serialization yesterday:
|
| - int and long are decoded as Integer when using JSONObject.get(key) method
| => ClassCastException when the code is expecting a long and receives a integer
|
Internally JSON does not distinguish an int and a long (it's just a numeric string).
However when decoding if the number is too large to fit in a Java int it will use a long I believe, otherwise it will use an int.
So you should be ok just to cast. BTW I already did this in CoreMessagingProxy.
anonymous wrote :
| - String[] parameters are deserialized as Object[]
| => All the createConnectionFactory() methods don't work: the ManagementService will not find the matching method since Object[] and String[] are different types (and not assignable).
| I've hacked 1 createConnectionFactory method to pass the parameters as Object[] to run the JORAM tests but all the others methods won't work.
|
|
So change the params to Object[] ?...
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228857#4228857
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228857
15 years, 8 months