[Design the new POJO MicroContainer] - Re: ClassInfo being serializable
by alesj
I guess we are talking about ClassInfoImpl.
anonymous wrote : I don't understand this new helper?
|
| All you need to do is rehook into the typeinfo factory using some package
| protected method and recreate the other state during deserialization
| (most of it can be left to be initialized lazily?)
|
What about non-serializable references to ClassInfoHelper and AnnotationHelper?
How do you (de)serialize those?
anonymous wrote :
|
|
| | Object readResolve()
| | {
| | IntrospectionTypeInfoFactory factory = new IntrospectionTypeInfoFactory();
| | return factory.getTypeInfo(annotatedElement);
| | }
| |
|
| Then you aren't creating multiple ClassInfo objects during deserialization,
| especially if they are already present in the cache.
This looks like an optimal solution.
If you are in the same Classloader then there is no new ClassInfo instance creation, since _we_ been serialized, so _we_ exist in cache. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063240#4063240
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063240
18 years, 9 months
[Design of JBoss ESB] - Re: JMSHeader fields
by beve
anonymous wrote :
| What's the problem specifically?
|
Well, this is how I'm currently doing it:
| if (jmsMsg.getJMSReplyTo()!=null)
| {
| Destination replyToDestination = jmsMsg.getJMSReplyTo();
| String destType = null;
| String destName = null;
| String connection = "ConnectionFactory";
| if ( replyToDestination instanceof Queue )
| {
| Queue queue = ( Queue ) replyToDestination;
| destName = queue.getQueueName();
| destType = JMSEpr.QUEUE_TYPE;
| }
| else
| {
| Topic topic = ( Topic ) replyToDestination;
| destName = topic.getTopicName();
| destType = JMSEpr.TOPIC_TYPE;
| }
| message.getHeader().getCall().setReplyTo( new JMSEpr( destType , destName, connection );
|
I'm a bit concerned about the connection variable. I looks like this should be a connection factory, but should it be normal one or a clustered connection factory. Maybe I should get this from the configuration file?
/Daniel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063228#4063228
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063228
18 years, 9 months