[Design of JBoss Web Services] - Re: Setting the properties on the JAXBContext
by tfennelly
+1
We need something agreed for 2.0.0 and I'd guess it's too late for a neutral SPI based solution at this stage, yes/no?
At the end of the day I'd imagine something like this will be required for this type of usecase, no matter what the underlying stack + marshal/unmarshal technology combo is, yeah? I know XStream has it's own non-standards based set of annotations (aliases), as well as an external XML config model that it uses for defining what is essentially the same binding metadata - namespaces, types etc. If the JBossWS SPI is going to accommodate defining these external configs ala what we've done for JAXB and what XStream has in its alias configs, will it pick one standard and map to the underlying impl or what? If it goes with one standard, would something based on JAXB and it's annotations be the natural choice?
Anyway, maybe that's all for another day - we need something for 2.0.0 asap :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057774#4057774
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057774
18 years, 9 months
[Design of JBoss Web Services] - Re: Setting the properties on the JAXBContext
by tfennelly
"thomas.diesler(a)jboss.com" wrote :
| | import org.jboss.ws.core.jaxws.JAXBContextCache;
| |
|
| This already is the problem. You cannot rely on proprietary API .
|
+1 and that's why I'm here looking for the correct solution :-)
What I've outlined is what I had to do to get the "native" JBossWS stack (which uses JAXB, right?) to work with a set of Java bindings that are not JAXB annotated. Kohsuke Kawaguchi has confirmed that this is the correct solution from a JAXB perspective, so I guess what we need to do here is figure out how this all fits into your view of the world ala the JBossWS SPI etc
"thomas.diesler(a)jboss.com" wrote : However I need to understand your use case better in order to give you a qualified answer.
OK. It's basically as I outlined in the JAXB forum post...
anonymous wrote : "... we need to be able to bind an XML message (using this JAXB based code) into an existing Java interface (not annotated for JAXB). We don't own the interface, so changing it is not an option."
So JAXB requires the java bindings it's trying to unmarshal the SOAP message into to have JAXB annotations. In the JBossESB usecase, this is very often going to be impossible because the interface is probably owned by something outside the ESB (i.e. we can't modify them to add the annotations).
An ESB example of this that we continually use is where the ESB is being used to expose a Webservice interface for a legacy EJB based Service. The EJB remote interface is already defined and is what we want to base our ESB "hosted" (interpret loosely) JSR181 endpoint - the EJB wrapper Webservice.
Our current solution to all this from a JBossESB + JBossWS 2.0.x perspective is as outlined in that JAXB forum post.
"thomas.diesler(a)jboss.com" wrote : Not every supported stack is necessarily using JAXB. So setting JAXB properties might not be the right solution anyway.
How the SPI exposes this is up to you for sure.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057738#4057738
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057738
18 years, 9 months
[Design of JBoss jBPM] - extending decision test
by kukeltje
Hi,
I'm extending the desiciontest a little with access to custom object.
i'm not sure though if it should be in the org.jbpm.jpdl.exe.DecisionConditionsTest or a new test in org.jbpm.jpdl.el (also called DecisionConditionsTest then)
The code is:
| package org.jbpm.jpdl.[el|exe];
|
| import junit.framework.TestCase;
|
| import org.jbpm.graph.def.ProcessDefinition;
| import org.jbpm.graph.exe.ProcessInstance;
|
| public class DecisionConditionsTest extends TestCase {
|
| public static class Customer {
| String priority;
|
| int number;
|
| public Customer(String priority) {
| this.priority = priority;
| }
|
| public Customer(int number) {
| this.number = number;
| }
|
| public String getPriority() {
| return priority;
| }
|
| public int getNumber() {
| return number;
| }
| }
|
| public ProcessDefinition createCustomerPriorityProcess() {
| return ProcessDefinition.parseXmlString(
| "<process-definition>" +
| " <start-state>" +
| " <transition to='d'/>" +
| " </start-state>" +
| " <decision name='d'>" +
| " <transition to='l' >" +
| " <condition>#{customer.priority == 'LOW'}</condition>" +
| " </transition>" +
| " <transition to='m'>" +
| " <condition>#{customer.priority == 'MEDIUM'}</condition>" +
| " </transition>" +
| " <transition to='h'>" +
| " <condition>#{customer.priority == 'HIGH'}</condition>" +
| " </transition>" +
| " </decision>" +
| " <state name='l' />" +
| " <state name='m' />" +
| " <state name='h' />" +
| "</process-definition>"
| );
| }
|
| public void testCustomerPriorityLow() {
| ProcessDefinition processDefinition = createCustomerPriorityProcess();
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
| processInstance.getContextInstance().setVariable("customer", new Customer("LOW"));
| processInstance.signal();
|
| assertEquals("l", processInstance.getRootToken().getNode().getName());
| }
|
| public void testCustomerPriorityMedium() {
| ProcessDefinition processDefinition = createCustomerPriorityProcess();
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
| processInstance.getContextInstance().setVariable("customer", new Customer("MEDIUM"));
| processInstance.signal();
|
| assertEquals("m", processInstance.getRootToken().getNode().getName());
| }
|
| public void testCustomerPriorityHigh() {
| ProcessDefinition processDefinition = createCustomerPriorityProcess();
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
| processInstance.getContextInstance().setVariable("customer", new Customer("HIGH"));
| processInstance.signal();
|
| assertEquals("h", processInstance.getRootToken().getNode().getName());
| }
|
| public void testCustomerPriorityUndefined() {
| ProcessDefinition processDefinition = createCustomerPriorityProcess();
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
| processInstance.getContextInstance().setVariable("customer", new Customer("UNDEFINED"));
| processInstance.signal();
|
| // 'Default' transition
| assertEquals("l", processInstance.getRootToken().getNode().getName());
| }
|
| public void testCustomerPriorityNull() {
| ProcessDefinition processDefinition = createCustomerPriorityProcess();
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
| processInstance.getContextInstance().setVariable("customer", new Customer(null));
| processInstance.signal();
|
| // 'Default' transition
| assertEquals("l", processInstance.getRootToken().getNode().getName());
| }
| }
|
If it is a new class then with copyright info
I think it should go in el.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057684#4057684
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057684
18 years, 9 months
[Design of EJB 3.0] - Re: JBossEjbParsingDeployer can't handle EJB3 jboss.xml
by wolfc
So we'll build up a new common metadata component in projects/??/jboss-metadata which combines EJB 2 and EJB 3 metadata (and also has JavaEE metadata).
(It's weird that you had to extend EJB 3 metadata to accommodate EJB 2, because EJB 3 should be 100% backwards compatible.)
Then in trunk we build up the deployer chain: EjbAnnotationParsingDeployer -> EjbParsingDeployer -> JBossEjbParsingDeployer.
Then the component deployers should pick up the meta data and fire off new meta data for container deployers. I think the component deployer should also register virtual supply/demand dependencies, or is that in the container deployers?
EjbDeployer and Ejb3Deployer (was EJBStage2Deployer) -> Stateful3ContainerDeployer etc.
That way an EJB 3 deployment can have EJB 2.1 CMP & BMP (spec chapter 8, 9, 10 & 11).
Maybe we can do with one EjbDeployer.
To be able to use aop.xml we'll do some trickery in the container deployers.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057659#4057659
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057659
18 years, 9 months
unable to open dsl file
by sridevi itla
Hi,
I am new to jboss drools.I have created some rules which are working sucessfully.I also have a decision tables example,which is working fine.However,when i try to open a dsl file,i am getting the following error message in eclipse.I initially used jars of drools 3.0.6 but now i am using jars of drools 4.0.I am getting the exception in both the cases.Could somebody please advice.
eclipse.buildId=M20060921-0945
java.version=1.5.0_07
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -clean
!ENTRY org.eclipse.jface 4 2 2007-06-26 15:55:00.825
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NoClassDefFoundError: org/drools/lang/dsl/template/NLGrammar
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:160)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:498)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:468)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:427)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:334)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:386)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:347)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.drools.ide.dsl.editor.DSLEditor.init(DSLEditor.java:151)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:840)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:583)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:214)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2595)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2528)
at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2520)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2505)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2500)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2485)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:388)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:350)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:275)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:139)
at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:190)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:174)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:267)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:243)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:306)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:653)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:817)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:815)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1069)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1168)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:249)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:243)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:283)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Regards
Devs
---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.
18 years, 9 months