[JBoss jBPM] - Re: gwt-console datasource problems
by jjrs
Hi,
I was finally able to discover what the problem was.
All the birt reports included in the gwt-console, are pointing to a external datasource, so they need to be checked and modify in case it's needed to use the correct datasource...
The reports are located in ... [JBOSS]\server\default\data\birt
They are called XXXXXXX_report.rptdesign, and the section to modify in case it's needed is:
<data-sources>
| <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="MySQL Local" id="6">
| <property name="odaDriverClass">com.mysql.jdbc.Driver</property>
| <property name="odaURL">jdbc:mysql://localhost:3306/jbpmtest</property>
| <property name="odaUser">jbpmtest</property>
| <property name="odaJndiName">java:/JbpmDS</property>
| </oda-data-source>
| </data-sources>
However after having all the reports referencing the correct datasource, they still don't work, but I will ask about them in another post as I consider this issue as a different topic.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215649#4215649
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215649
15 years, 10 months
[Advanced Documentation] - org.jboss.classloader.spi.base.BaseClassLoader API
by davecasserly
Hi,
I'm using jboss 5.0.1.GA.
Anybody know where i can find the source or the API to
org.jboss.classloader.spi.base.BaseClassLoader ?
When my application deploys i am getting a reference to the classloader. (ApplicationClassScanner is on of my classes)
| ClassLoader detectedClassLoader = ApplicationClassScanner.class.getClassLoader();
|
On jboss 4.5 - it used to return a class called org.jboss.mx.loading...something, i can't remember exactly. But i used reflection to execute a method called getClasspath() which returned a list of URLs of all the classpath entries.
Anyway, the classloader has changed and my code is now broken because the new classloader doesn't have this method.
I've used reflection to print out all the methods it supports, but none seem correct and i just can't seem to get a list of all the classpath entries for my loaded web application.
Any ideas.... or just tell me where the api or source is for this class. I've searched internet, and downloaded jboss source, but its just not in there - even though a lot of the other source imports this class.... i dont' get it!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215645#4215645
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215645
15 years, 10 months
[JBoss AOP] - Re: Using AOP to mock out dependecies for unit-test
by nizzy
Hi Stale,
Couldn't get it any smaller, :)
Cut down Session Bean
public class AOPUnitTestManagerBean {
|
| private IPersistenceHelper helper;
|
| public AOPUnitTestManagerBean() {
| helper = new PersistenceHelper(null);
| }
|
| public void createObject(Object o) {
| helper.create(o);
| }
| }
JUnit Test
import org.junit.Before;
| import org.junit.Test;
|
| public class AOPUnitTestManagerBeanTest {
|
| private AOPUnitTestManagerBean man;
|
| @Before
| public void setUp() throws Exception {
| man = new AOPUnitTestManagerBean();
| }
|
| @Test
| public void testCreateObject() {
|
| String s = new String("Hello");
| man.createObject(s);
| }
| }
IPersistenceHelper interface
public interface IPersistenceHelper {
|
| public void create(Object o);
| }
MockPersistenceHelper
public class MockPersistenceHelper implements IPersistenceHelper {
|
| public MockPersistenceHelper(String PERSISTENCE_CONTEXT_NAME) {
| }
|
| public void create(Object o) {
| System.out.println("inside MockPersistenceHelper.create()");
| }
| }
PersistenceHelper
public class PersistenceHelper implements IPersistenceHelper {
|
| public PersistenceHelper(String persistenceContextName) {
| }
|
| public void create(Object o) {
| System.out.println("inside PersistenceHelper.create()");
| System.out.println("This should have been mocked-out --- did you set -javaagent in jvm args?");
| }
| }
Interceptor
import org.jboss.aop.advice.Interceptor;
| import org.jboss.aop.joinpoint.Invocation;
|
| public class PersistenceHelperInterceptor implements Interceptor {
|
| public String getName() {
| return "PersistenceHelperInterceptor";
| }
|
| public Object invoke(Invocation invocation) throws Throwable {
| System.out.println("Inside PersistenceHelperInterceptor.invoke");
|
| Object helper = new MockPersistenceHelper(null);
| return helper;
| }
| }
jboss-aop.xml
<?xml version="1.0" encoding="UTF-8"?>
| <aop>
|
| <bind pointcut="execution(public $typedef{persistenceHelperTypeDef}->new(java.lang.String))">
| <interceptor class="PersistenceHelperInterceptor"/>
| </bind>
|
| <!-- This causes Stack Overflow Error since both PersistenceHelper
| and MockPersistenceHelper implement IPersistenceHelper, causing
| infinite loop (of sorts) -->
| <typedef name="persistenceHelperTypeDef" expr="class($instanceof{IPersistenceHelper})" />
|
| <!-- This causes ClassCastException -->
| <!-- typedef name="persistenceHelperTypeDef" expr="class($instanceof{IPersistenceHelper}) AND !class(MockPersistenceHelper)" /-->
|
| </aop>
Hope this helps
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215632#4215632
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215632
15 years, 10 months
[JBoss Portal] - Re: Integration with bea weblogic portal
by dzzy
"chris.laprun(a)jboss.com" wrote : I suspect that the extra data is passed as extensions in the WS messages, though I cannot tell for sure that this is the case. You might be able to do something similar using a standard JAX-RPC Handler to achieve the result you desire.
Hi,
thanks for this hint! you are right, I tested this in a WLP 10.2 consumer - JBoss Portal 2.6.4 producer scenario and managed to pass data using BEA's custom transfer mechanism. Basically, from WLP portlet backing file you can add the object to the request something like:
request.setAttribute(MarkupRequestState.KEY, "TEST");
The WLP consumer will serialize, encode this object (Base64) and add an extension to the SOAP message (getMarkup) with the result, something like:
<v1:extensions>
<ext1:MarkupRequestState xmlns:ext1='urn:bea:wsrp:ext:v1:types'>
<ext1:state>
rO0ABXQAC0dFT1JHRSBURVNU
</ext1:state>
</ext1:MarkupRequestState>
</v1:extensions>
As you mentioned, this value can be extracted from the SOAP message, Base64 decoded and deserialized on the JBoss Portal side using a custom JAX-RPC handler (for the MarkupService).
However, a downside of this approach is that, in case of sending custom objects, you need to have the same version of the class on the producer as well, otherwise the deserialization will fail. Therefore is safer to use primitives and common java objects.
Cheers,
George
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215631#4215631
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215631
15 years, 10 months