[Beginner's Corner] - Query on Using JBoss with Standalone HornetQ
by Julie H
Julie H [http://community.jboss.org/people/julieh] created the discussion
"Query on Using JBoss with Standalone HornetQ"
To view the discussion, visit: http://community.jboss.org/message/614065#614065
--------------------------------------------------------------
I have a couple of questions regarding the setup of JBoss 6 I am hoping to get some input on.
Firstly I know that HornetQ comes packaged with JBoss 6, however I am concerned regarding the availability of queues if there are issues with Jboss.
For example, if Jboss gets restarted, or crashes for some reason, I still want the queues to be available for other applications to be able to write to them.
My understanding is that if you stop Jboss, the 'incorporated' HornetQ server will also stop. (please let me know if this assumption is incorrect)
The other issue I have is that if we have a couple of instances of Jboss installed on one server, I want both instances of Jboss to share the queues.
To this end, I thought that we might be better off installing a stand alone instance of HornetQ, and have Jboss connect to the standalone instance, rather than the HornetQ packaged with Jboss.
My first question is - Is this a legitimate configuration for Jboss and Hornet MQ (I am assuming it is as I imagine this is how JBoss 5 and prior would have worked).
If so, is it possible to configure Jboss so that the packaged Hornet doesn't start up when Jboss starts (ie can I switch off HornetQ packaged with JBoss).
Secondly, I' not sure how I go about setting up JBoss to use the standalone instance of HornetQ.
I have installed an application containing an MDB into JBoss, and have created a queue on the stand-alone HornetQ.
I have a Jboss.xml which contains the destination-jndi-name.
However I am not sure what I need to change to get the MDB in Jboss to look for the queue on the standalone HornetQ ?
Any help on this would be appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/614065#614065]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months
[JBoss AOP] - Stuck trying to get HotSwap weaving going with JBoss AS 6
by Mark DeSpain
Mark DeSpain [http://community.jboss.org/people/markdespain] created the discussion
"Stuck trying to get HotSwap weaving going with JBoss AS 6"
To view the discussion, visit: http://community.jboss.org/message/614021#614021
--------------------------------------------------------------
I've been able to get loadtime weaving going, but not hotswap weaving. I was wondering if anyone might be able to help me get over this hurdle.
To prepare the environment for HotSwap, I've tried going the following
1. In *$JBOSS_HOME/server/all/conf/bootstrap/aop.xml*, set *enableLoadtimeWeaving* to true.
2. Placed a copy of the *pluggable-instrumentor.jar* that comes with JBoss AS 6 into *$JBOSS_HOME/bin*
3. Passed in *-javaagent:pluggable-instrumentor.jar=-hotSwap* as a argument to Java. This was attemped both by passing it in via an Eclipse JVM parameter, and by editing *run.conf.bat*.
4. Placed my application's EAR file containing the class to be instrumented into the *$JBOSS_HOME/server/all/deploy* directory.
5. Placed a file called *prepare-aop.xml* within *$JBOSS_HOME/server/all/deploy*, for the purposes of preparing a class for HotSwap AOP. It just contains the following:
<aop xmlns="urn:jboss:aop-beans:1.0">
<prepare expr="all(mypackage.MyClass)" />
</aop>
Now, when I start the server, my application gets loaded, I can the URL for MyClass, just fine. However, my hope is that when I place a file called *myaspects-aop.xml* into *$JBOSS_HOME/server/all/deploy*, then MyClass would automatically get instrumented with the aspect below, which just logs that it has been invoked. However, that is not happening.
<aop xmlns="urn:jboss:aop-beans:1.0">
<aspect class="mypackage.MyAspect" scope="PER_JOINPOINT">
</aspect>
<bind pointcut="execution( * mypackage.MyClass->*(..) )">
<advice aspect="mypackage.MyAspect" />
</bind>
</aop>
Any insight would be most appreciated!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/614021#614021]
Start a new discussion in JBoss AOP at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months
[EJB3] - Passing information via InvocationContext in interceptors
by Arjun Kumaar
Arjun Kumaar [http://community.jboss.org/people/arjun_kumaar] created the discussion
"Passing information via InvocationContext in interceptors"
To view the discussion, visit: http://community.jboss.org/message/612633#612633
--------------------------------------------------------------
Can I pass data in invocation context via remote method calls?
I have two stateless session beans
BeanA and BeanB
I have an interceptor for each bean
BeanAInterceptor for BeanA.methodA
BeanBInterceptor for BeanB.methodB
In BeanAInterceptor, I set some context data.
In BeanA.methodA, I get an handle to BeanB and call BeanB.methodB
In the process, BeanBInterceptor gets called and I want to read the context data
that I set in BeanAInterceptor, but I get null.
Is there any way to pass data via InvocationContext across remote calls if BeanA
and BeanB are deployed in
a. same jvm
b. different jvm
c. in a clustered environment.
In short I want to send data across ejbs, but via interceptors and not
as parameters to method calls.
I am pasting the relevant code below.
@Stateless
public class BeanA {
@Resource
SessionContext ctx;
@Interceptors(BeanAInterceptor.class)
public void methodA() {
BeanBRemote bRemote = ctx
.getBusinessObject(BeanB.class);
bRemote.methodB();
}
}
public class BeanAInterceptor {
@AroundInvoke
public Object interceptA(InvocationContext ctx) throws Exception {
Map<String, Object> ctxData = ctx.getContextData();
ctxData.put("key", "value");
return ctx.proceed();
}
}
@Stateless
public class BeanB {
@Interceptors(BeanBInterceptor.class)
public void methodB() {
//do something
return;
}
}
public class BeanBInterceptor {
@AroundInvoke
public Object interceptB(InvocationContext ctx) throws Exception {
Map<String, Object> ctxData = ctx.getContextData();
Object val = ctxData.get("key"); //I get val as null here
return ctx.proceed();
}
}
Thanks
Arjun
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/612633#612633]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months
[JBoss Tools] - Re: Adding JBoss AS source to a project
by henk de boer
henk de boer [http://community.jboss.org/people/henk53] created the discussion
"Re: Adding JBoss AS source to a project"
To view the discussion, visit: http://community.jboss.org/message/569958#569958
--------------------------------------------------------------
Just wondering, have the runtime guys ever been convinced of this?
In other words, with JBoss AS 6 and JBoss Tools 3.2, can I attach all source with one click now?
I'm now moving to Eclipse 3.6, which is of course a brand new install and it's really painful to attach all the literally hundreds of jars again that I attached to my old setup over the last year. Since quite often I have to attach the same jar twice (both for the editor and for the debugger), this really adds up.
If I upgrade my installation at work I have to attach the same couple of hundred jars there as well. This is really painful. I'm not sure how others cope with this, or maybe I'm the only nut who wants to have every last bit of source there is available in Eclipse ;)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/569958#569958]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months