[Design the new POJO MicroContainer] - Reverting JBMDR-43
by alesj
I'll revert Kabir's change:
- https://jira.jboss.org/jira/browse/JBMDR-43
I think we should leave it to the caller
if it wants to replace ${x} in the annotation's values.
But I'll add four over-loaded methods that take Properties or replace flag
in AnnotationCreator.
| /**
| * Create annotation.
| *
| * @param annotationExpr the annotation expression
| * @param annotation the annotation class
| * @param replace should we replace possible properties in expression
| * @return new annotation instance
| * @throws Exception for any error
| */
| public static Object createAnnotation(final String annotationExpr, final Class<?> annotation, boolean replace) throws Exception
| {
| return createAnnotation(getRootExpr(annotationExpr, null, replace), annotation, null);
| }
|
| /**
| * Create annotation.
| *
| * @param annotationExpr the annotation expression
| * @param cl the classloader to use
| * @param replace should we replace possible properties in expression
| * @return new annotation instance
| * @throws Exception for any error
| */
| public static Object createAnnotation(String annotationExpr, ClassLoader cl, boolean replace) throws Exception
| {
| return createAnnotation(getRootExpr(annotationExpr, null, replace), null, cl);
| }
|
| /**
| * Create annotation.
| *
| * @param annotationExpr the annotation expression
| * @param annotation the annotation class
| * @param properties the properties to use for replacement
| * @return new annotation instance
| * @throws Exception for any error
| */
| public static Object createAnnotation(final String annotationExpr, final Class<?> annotation, Properties properties) throws Exception
| {
| return createAnnotation(getRootExpr(annotationExpr, properties), annotation, null);
| }
|
| /**
| * Create annotation.
| *
| * @param annotationExpr the annotation expression
| * @param cl the classloader to use
| * @param properties the properties to use for replacement
| * @return new annotation instance
| * @throws Exception for any error
| */
| public static Object createAnnotation(String annotationExpr, ClassLoader cl, Properties properties) throws Exception
| {
| return createAnnotation(getRootExpr(annotationExpr, properties), null, cl);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180566#4180566
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180566
15 years, 7 months
[Design of JBoss Build System] - Re: [JBASMP-2] Create an Undeploy Mojo
by guignome
Trying to deploy then undeploy, I'm getting this error
Caused by: java.lang.ClassCastException: org.jboss.security.plugins.JBossSecurityContext
| at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:71)
| at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:51)
| at org.jboss.security.SecurityContextFactory.createSecurityContext(SecurityContextFactory.java:87)
| at org.jboss.proxy.SecurityActions$1.createSecurityContext(SecurityActions.java:108)
| at org.jboss.proxy.SecurityInterceptor.createSecurityContext(SecurityInterceptor.java:113)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:73)
| at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
| at $Proxy1.invoke(Unknown Source)
| at org.jboss.jbossas.servermanager.Server.invoke(Server.java:690)
| at org.jboss.jbossas.servermanager.Server.invoke(Server.java:679)
| at org.jboss.jbossas.servermanager.Server.undeploy(Server.java:646)
| at org.jboss.maven.plugins.as.control.mojo.JbossAsControlUndeployMojo.execute(JbossAsControlUndeployMojo.java:76)
| ... 18 more
What's interesting is that I get the same exception if I try to deploy two files in a row. I'm guessing there is connection that isn't closed somewhere. I'll post again when I figure this out :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180494#4180494
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180494
15 years, 7 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Adding Ordering Group Features in JBM 1.4
by gaohoward
====update version: api changed======
An ordering group is a set of messages that needs to be delivered sequentially exactly in the same order as they are produced.
I Enable Ordering Group by programming
JBossMessageProducer::enableOrderingGroup(String name); //user specified name, null for sys generated
JBossMessageProducer::disableOrderingGroup();
The two methods enable/disable the JBossMessageProducer to produce messages that belong to a named ordering group. Messages in a named ordering group will be processed strictly in the order they are produced (sent). The enableOrderingGroup(name) will set producer's ordering group to the specified name, or an auto-generated name if passing a null parameter. Calling disableOrderingGroup() will reset the producer to be a normal JMS producer.
Once thus set, the producer will set a reserved message property JBM_ORDERING_GROUP_ID to the name of the ordering group on each message sent through it.
JBossMessages that have this property set are treated as ordering group messages and those that have one same value form an ordering group.
Other Processing Rules of Ordering Group Messages
1. The order of delivery will not be affected by sort criteria, priority, or filters.
2. Only if one message has been processed (acked, committed, rolled back, expired) can next message be delivered.
3. Uncommitted or unacked Messages in one ordering group must be within the same JMSSession or same transaction.
4. The processing of ordering group messages applies to both Queues and Topics.
II Enable Ordering Group by Administration
1. A ConnectionFactory can be configured to have ordering group enabled by default, i.e. all producers created from this factory have ordering group enabled. The user can override the default ordering group settings on the producer later by calling setOrderingGroup() methods.
2. A Destination can be configured to have ordering group enabled by default, i.e., any messages sent to this destination will automatically set to belong to the configured default ordering group if they haven't already belonged to one.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180481#4180481
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180481
15 years, 7 months