[JBoss Microcontainer] - How to access MC pojo beans from a RAP app
by Csaba Szucs
Csaba Szucs [http://community.jboss.org/people/CsabaSzucs] created the discussion
"How to access MC pojo beans from a RAP app"
To view the discussion, visit: http://community.jboss.org/message/594210#594210
--------------------------------------------------------------
Hello Guys,
We have a J2EE web app with a JSP/Servlet based UI.
We would like to reimplement the UI-layer in Eclipse/RAP technology.
So from now on the RAP UI layeer will invoke BU classes such as:
o EJB classes (session beans, entity beans, message driven beans)
o JBoss MicroController POJO beans
Unfortunately I have trouble to access an MC bean from RAP.
To call an MC bean operation from a servlet init() method was easy like:
public void init(ServletConfig config) throws ServletException {
super.init(config);
try {
KernelControllerVDFConnector connector = new KernelControllerVDFConnector(config.getServletContext());
if (connector.isValid() == false) throw new ServletException("Illegal VDF component, no MC Kernel present.");
KernelController controller = connector.getUtility();
ControllerContext ctx = controller.getInstalledContext("AJBossMCBean");
AJBossMCBeanInterface dummy = (AJBossMCBeanInterface) ctx.getTarget();
dummy.someOperation();
// ...
} catch(Exception e ) {
// ...
}
}
Within RAP, I can also provide a ServletContext object, but the KernelControllerCDFConnector.valid() always return a false value.
How can I solve this issue?
Many thanks in advance!
Csaba
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594210#594210]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[JBoss Messaging] - configuring JMS in JBoss 5 to use oracle db.
by martin mucha
martin mucha [http://community.jboss.org/people/alfonz19] created the discussion
"configuring JMS in JBoss 5 to use oracle db."
To view the discussion, visit: http://community.jboss.org/message/594177#594177
--------------------------------------------------------------
Hi, I'm trying to configure JMS without much success.
My simple example works fine with hsqldb. Next I replaced content of hsqldb-persistence-service.xml with configuration for oracle from doc/examples. Next I defined new datasource for oracle db, and replaced all occurences of "DefaultDS" with jndi name of new datasource.
In my datasource is this:
<local-tx-datasource>
<jndi-name>testingDS</jndi-name>
so in my hsqldb-persistence-service.xml went this
<depends>jboss.jca:service=DataSourceBinding,name=testingDS</depends>
<attribute name="DataSource">java:/testingDS</attribute>
sounded reasonable to me, but server startup started complaining about missing DQL in jndi (see lower). I've got no idea why is this occuring, since I consider made changes irelevant to this. When hsqldb was used, there was no misconfiguration with dlq. That's for started, and secondly, I do not understand, why DLQ is being looked up, when there is <attribute name="DefaultQueueJNDIContext">/queue</attribute>
Do you have any ideas what's wrong?
20:25:30,720 WARN [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@64e3f9(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)c99007 destination=java:/jms/queues/EiraNotificationQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
javax.naming.NameNotFoundException: DLQ not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.util.naming.Util.lookup(Util.java:222)
at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQDestination(AbstractDLQHandler.java:106)
at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:82)
at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:413)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:351)
at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:729)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594177#594177]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[jBPM] - New Install - No jBPM Perspective in Eclipse
by Gary Huntress
Gary Huntress [http://community.jboss.org/people/simusid] created the discussion
"New Install - No jBPM Perspective in Eclipse"
To view the discussion, visit: http://community.jboss.org/message/594087#594087
--------------------------------------------------------------
I'm just getting started with jBPM and I'm trying to get my development environment as correct/current as possible so I can follow all the tutorials and build my first few projects.
I've installed jBPM5 using the full installer and I've run "ant install.demo". I don't see any errors during this step. When I launch using "ant start.demo", jboss will run and I can connect. Eclipse launches and can create a new jBPM project. I can run the sample.java and it produces "hello world' in the eclipse console as expected.
I can also open sample.bpmn and I can edit this grapically using the list of components etc.
What I cannot seem to do is find the jBPM perspective. The tutorials indicate it should be under "window | open perspective | other " but I do not have that listed. What component am I missing? During install.demo I do see:
install.jBPM-eclipse.into.eclipse:
[unzip] Expanding: /Users/gary/Desktop/jbpm-installer/lib/jbpm-5.0.0-eclipse-all.zip into /Users/gary/Desktop/jbpm-installer/eclipse
so I thought that was all I needed (again there were no errors during the installation). I'm installing on a Mac running 10.6.
Thanks,
Gary H.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594087#594087]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[jBPM] - Re: Strange behavior with JBPM 4.4 and nested fork/joins with Multiplicity
by Silvio Meier
Silvio Meier [http://community.jboss.org/people/k0k0pelli] created the discussion
"Re: Strange behavior with JBPM 4.4 and nested fork/joins with Multiplicity"
To view the discussion, visit: http://community.jboss.org/message/594050#594050
--------------------------------------------------------------
As nobody answers, I'd like to illustrate the problem again with a simplerexample as given above. The following example shows the above problem in asimplified way:
http://community.jboss.org/servlet/JiveServlet/showImage/2-594050-14573/T... http://community.jboss.org/servlet/JiveServlet/downloadImage/2-594050-145...
We have 2 fork/join elments that are nested. The outer fork/join(fork1/join1) contains task1 that is executed in parallel with the innerfork/join (fork2/join2). The inner fork join consists of task2 and task3, whichare alternatives that are chosen by a decision (exclusive1). Task 4 executes inparallel to task2 or task3, depending on the alternative that is chosen. Becausethere are three transitions ending in the inner join activity (join2), amultiplicity must be specified, as otherwise the join does not go on with itsexecution.
However, with the current implementation of jBPM 4.4, depending on the waythe workflow is executed, a strange behavior can be created.
Executing first task1, causes anormal execution, i.e., all tasks are executed as expected. However, finishingfirst the inner join activity (join2) leads to a strange behavior, which is dueto the bug fix of described in https://issues.jboss.org/browse/JBPM-2720?page=com.atlassian.jira.plugin.... https://issues.jboss.org/browse/JBPM-2720?page=com.atlassian.jira.plugin.... bugfix in the mentioned Jira ticket terminates *all* executions that didnot arrive in any join, if there is amultiplicity given in the join activity, which is probably the source of the problem. It should just kill thenon-finished executions that end in the join activity to complete and not *all*(concurrent) executions.
If task2 or task3, respectively, and task4 are finished before task1, the procedure completing the inner joinactivity (join2) deletes also the active exection of task1, even though thisshould not be the case.
>From my point of view, there are three possible solutions:
1. We introduce a flag for switching the kill mechanismoff, as this was suggested in the above mentioned Jira ticket. However, I didnot find anything like that in the implementation. This is maybe the simplersolution as the one suggested in
2. Running exections are aborted only iff they will end inthe join to complete.
3. Remodeling the workflow using no nested join/forks. However, this solutions is not possible in every case.
Did someone encounter the same problems and is there a simpler solution thanthe three soluteonsd above?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594050#594050]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[JNDI and Naming] - Re: EJB - JBOSS - JNDI HELP!!!
by jaikiran pai
jaikiran pai [http://community.jboss.org/people/jaikiran] created the discussion
"Re: EJB - JBOSS - JNDI HELP!!!"
To view the discussion, visit: http://community.jboss.org/message/593981#593981
--------------------------------------------------------------
> stefano bertozzi wrote:
>
> p.p.s. i have also this warn:
> +log4j:WARN No appenders could be found for logger (org.jnp.interfaces.TimedSocketFactory).+
> +log4j:WARN Please initialize the log4j system properly.+
For this WARN message, you are missing a log4j.properties (or log4j.xml) in your client's (the program that runs in a different JVM) classpath.
> stefano bertozzi wrote:
>
> downloaded JBOSS 6.0 final, unpacked it in C:\Jboss_releases.
> i run it directly inside Eclipse, but it works fine also launching it from the console ( p.s. i have WIN7 64bit ).
>
>
> If i exlude that i get:
> +javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resourcefile: java.naming.factory.initial+
>
This too is because of a missing jndi.properties in the client classpath. For both these issues, all you have to do is figure out how to set the classpath in Eclipse (assuming you are running the client program from Eclipse), for the client program, so that those files are picked up from the classpath.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/593981#593981]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years