[Design of JBoss ESB] - Problem with JNDI Context
by hmrizin
Hi,
I am having problems with the javax.naming.InitialContext that the JBossESB refers to. In one of my action classes i am creating a new Context and setting it to refer to Oracle 10g Server for EJB lookup.
After the action class returns I am trying to perform Static Router Action. But now the ESB tries to retrieve the registry information with the Context information that I set for the Oracle 10g Server.
I even tried resetting the Context back in the Action class once my EJB lookup is over. But I am still getting the same error.
The following is the jboss-esb.xml that i am using.
I am having two services, Service #1 and Service#2.
The Service #1 has four actions and Service #2 has only one action.
The execution goes like this.
Service #1 Action #1 : No Change in context
Service #1 Action #2 : Static Router Works Fine
Service #1 Action #3 : Context changed. EJB lookup done. Context restored.
Service #1 Action #4 : Static Router throws error
| <?xml version = "1.0" encoding = "UTF-8"?>
| <jbossesb
| xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml..."
| parameterReloadSecs="5">
|
| <providers>
| <jms-provider name="JBossMQ"
| connection-factory="ConnectionFactory"
| jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
| jndi-URL="localhost">
|
| <jms-bus busid="ESBRequestGw">
| <jms-message-filter dest-type="QUEUE" dest-name="queue/ESBRequestGwQ" />
| </jms-bus>
| <jms-bus busid="ESBRequestEsb">
| <jms-message-filter dest-type="QUEUE" dest-name="queue/ESBRequestEsbQ" />
| </jms-bus>
| <jms-bus busid="ESBResponseBusGw">
| <jms-message-filter dest-type="QUEUE" dest-name="queue/ESBResponseGwQ" />
| </jms-bus>
| <jms-bus busid="ESBResponseBusEsb">
| <jms-message-filter dest-type="QUEUE" dest-name="queue/ESBResponseEsbQ" />
| </jms-bus>
| </jms-provider>
| </providers>
|
| <services>
| <!-- SERVICE #1-->
| <service category="ESupplyOMSEndPoint" name="ESupplyOMSService" description="ESupply OMS Service">
| <listeners>
| <jms-listener name="ESBRequestGw" busidref="ESBRequestGw" maxThreads="1" is-gateway="true"/>
| <jms-listener name="ESBRequestEsb" busidref="ESBRequestEsb" maxThreads="1"/>
| </listeners>
| <actions>
| <!-- SERVICE #1 ACTION #1 -->
| <action
| name="processSOAction"
| class="fs.proto.esupply.service.ESupplyProcessSOAction"
| process="processSO">
| <property name="exceptionMethod" value="exceptionHandler"/>
| </action>
| <!-- SERVICE #1 ACTION #2 -->
| <action name="routeToNotifyEndPoint" class="org.jboss.soa.esb.actions.StaticRouter">
| <property name="destinations">
| <route-to service-category="NotifyEndPoint" service-name="NotifyService" />
| </property>
| </action>
| <!-- SERVICE #1 ACTION #3 -->
| <action
| name="uploadSOAction"
| class="fsproto.esb.elog.service.ELogUploadSOAction"
| process="uploadSO">
| <property name="exceptionMethod" value="exceptionHandler"/>
| </action>
| <!-- SERVICE #1 ACTION #4 -->
| <action name="routeToNotifyEndPoint" class="org.jboss.soa.esb.actions.StaticRouter">
| <property name="destinations">
| <route-to service-category="NotifyEndPoint" service-name="NotifyService" />
| </property>
| </action>
| </actions>
| </service>
|
| <!-- SERVICE #2 -->
| <service category="NotifyEndPoint" name="NotifyService" description="Notify Service">
| <listeners>
| <jms-listener name="ESBResponseBusEsb" busidref="ESBResponseBusEsb" maxThreads="1" />
| <jms-listener name="ESBResponseBusGw" busidref="ESBResponseBusGw" maxThreads="1" is-gateway="true"/>
| </listeners>
| <actions>
| <!-- SERVICE #2 ACTION #1 -->
| <action
| name="replyJMSClient"
| class="fs.proto.esb.service.ReplyJMSClient"
| process="replyClient">
| <property name="destination" value="ESBResponseGwQ" />
| <property name="exceptionMethod" value="exceptionHandler"/>
| </action>
| </actions>
| </service>
|
| </services>
|
| </jbossesb>
|
The Error message is
| 2007-03-22 21:02:48,663 ERROR [pool-4-thread-1][org.jboss.soa.esb.services.routing.MessageRouter] Co
| uld not obtain an EPR from the Registry. Message is not routed. javax.naming.NamingException: Error
| reading application-client descriptor: No location specified and no suitable instance of the type 'c
| om.foursoft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.sa
| lesorder.ejb.sls.SalesManagerBean
| org.jboss.soa.esb.services.registry.RegistryException: javax.naming.NamingException: Error reading a
| pplication-client descriptor: No location specified and no suitable instance of the type 'com.fourso
| ft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.
| ejb.sls.SalesManagerBean
| at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:332
| )
| at org.jboss.soa.esb.services.routing.MessageRouter.deliverMessages(MessageRouter.java:103)
| at org.jboss.soa.esb.actions.StaticRouter.process(StaticRouter.java:66)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.run(ActionProcessingPipeline.java:9
| 0)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.xml.registry.JAXRException: javax.naming.NamingException: Error reading application
| -client descriptor: No location specified and no suitable instance of the type 'com.foursoft.elog.sa
| lesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.ejb.sls.Sa
| lesManagerBean
| at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findServices(BusinessQueryManagerImpl.java
| :663)
| at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findService(JAXRRegistryImpl.java:
| 440)
| at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:317
| )
| ... 10 more
| 2007-03-22 21:02:48,679 ERROR [pool-4-thread-1][org.jboss.soa.esb.listeners.message.ActionProcessing
| Pipeline] Process method threw Exception
| java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.run(ActionProcessingPipeline.java:9
| 0)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.soa.esb.addressing.MalformedEPRException: org.jboss.soa.esb.services.routing.Me
| ssageRouterException: Message Could not be delivered due to issues with the Registry. javax.naming.N
| amingException: Error reading application-client descriptor: No location specified and no suitable i
| nstance of the type 'com.foursoft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJ
| B_com.foursoft.elog.salesorder.ejb.sls.SalesManagerBean
| at org.jboss.soa.esb.actions.StaticRouter.process(StaticRouter.java:71)
| ... 8 more
| Caused by: org.jboss.soa.esb.services.routing.MessageRouterException: Message Could not be delivered
| due to issues with the Registry. javax.naming.NamingException: Error reading application-client des
| criptor: No location specified and no suitable instance of the type 'com.foursoft.elog.salesorder.ej
| b.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.ejb.sls.SalesManagerB
| ean
| at org.jboss.soa.esb.services.routing.MessageRouter.deliverMessages(MessageRouter.java:160)
| at org.jboss.soa.esb.actions.StaticRouter.process(StaticRouter.java:66)
| ... 8 more
| Caused by: org.jboss.soa.esb.services.registry.RegistryException: javax.naming.NamingException: Erro
| r reading application-client descriptor: No location specified and no suitable instance of the type
| 'com.foursoft.elog.salesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.
| salesorder.ejb.sls.SalesManagerBean
| at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:332
| )
| at org.jboss.soa.esb.services.routing.MessageRouter.deliverMessages(MessageRouter.java:103)
| ... 9 more
| Caused by: javax.xml.registry.JAXRException: javax.naming.NamingException: Error reading application
| -client descriptor: No location specified and no suitable instance of the type 'com.foursoft.elog.sa
| lesorder.ejb.sls.SalesManager' found for the ejb-ref ejb/EJB_com.foursoft.elog.salesorder.ejb.sls.Sa
| lesManagerBean
| at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findServices(BusinessQueryManagerImpl.java
| :663)
| at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findService(JAXRRegistryImpl.java:
| 440)
| at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:317
| )
| ... 10 more
|
Pls Help
Hmrizin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030994#4030994
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030994
17 years, 6 months
[Design of JBoss jBPM] - Re: GPD extension point changes
by koen.aers@jboss.com
"kukeltje" wrote : - Some questions though. DSL stands for domain specific language correct?
|
Yes this is correct.
"kukeltje" wrote : - Is the org.jbpm.gd.jpdl.xmlMappings for extending jpdl only? (I think yes)
The answer is no. I will use the same extension point to map pageflow elements to their corresponding xml. But the name will change once I isolate the common base classes in their own plugin to eliminate the 'jpdl' reference. The name of Eclipse extension points derives from their defining plugin in fact. So if the name of the plugin containing the common things is 'org.jbpm.gd.common' the name will be 'org.jbpm.gd.common.xmlMappings'. If the plugin name is 'org.jbpm.gd' than the extension point will be called 'org.jbpm.gd.xmlMappings'. I think I am inclined to use the latter.
"kukeltje" wrote : - the is org.jbpm.gd.jpdl.dsl the correct package for adding DSLs? shouldn;t that be org.jbpm.gd.dsl or is this what you mean bty the last sentence?
Yes, following the rationale above, the name of the extension point would be 'org.jbpm.gd.dsl' or 'org.jbpm.gd.common.dsl'.
"kukeltje" wrote : btw now that there is a 'design of webconsole' forum, don't you think it is time for a 'design of gpd' as well?
I am not in favour of this. At least not at this point. Maybe when there are a lot of extenders with issues that are not very jBPM related this would make sense. But for now I would keep things as they are. The bandwith of this forum is not huge anyway.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030993#4030993
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030993
17 years, 6 months
[Design of JBoss jBPM] - GPD extension point changes
by koen.aers@jboss.com
Hi all,
Because of the need to specify the icon and label in a more flexible manner and the inability of the JpdlLabelProvider class to handle this, I have done some work on the extension points the last two weeks. As I expected, this resulted in a lot of refactoring and even in a complete revision of the two plugins. I have merged the 'org.jbpm.gd.jpdl.core' and the 'org.jbpm.gd.ui' plugin in one single plugin that is called 'org.jbpm.gd.jpdl'.
If you checkout this project you will see that some extension points have changed and that I added some new ones.
The first big change is that you now are able to contribute DSLs by using the 'org.jbpm.gd.jpdl.dsl' extension point. This dsl will be associated with an editor that is contributed to the 'org.eclipse.ui.editors' extension point. The association between the dsl and the editor still needs a lot of work. The idea is that you will derive from a class which has already a lot of the glue defined.
After you defined the DSL and have associated it with the editor, you can start contributing the semantic elements of this dsl by using the 'org.jbpm.gd.jpdl.semanticElements' extension point. As you can see, you specify for each contributed semanticElement to what DSL it belongs. For jpdl, the semantic elements are actions, nodes, swimlanes, etc. You can specify a label and an icon and of course an implementing class in the extension definition.
The third novelty is to define a mapping to the generated xml by using the 'org.jbpm.gd.jpdl.xmlMappings' extension point. Here you specify the implementing xml adapter class and the xml element that corresponds to the semantic element.
I think these changes will improve the flexibility a lot and make the plugin ready for complete pluggability of DSLs. Things that still have to be reviewed are as already said the Editor class itself but also the palette and editparts which should also be made completely pluggable. I will first try to get back to my planned roadmap and finish the jPDL language support.
In the future you can also expect a split (again!) of the plugin to isolate the common base classes that are the same for each DSL in a 'org.jbpm.gd.common' plugin.
Thoughts?
Regards,
Koen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030982#4030982
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030982
17 years, 6 months
[Design of POJO Server] - Re: Depends on microcontainer bean in -service.xml
by alesj
"scott.stark(a)jboss.org" wrote : That should just work.
Yup, it's all there:
ServiceMetaDataParser:
| else if (element.getTagName().equals("depends"))
| {
| String mbeanRefName = element.getAttribute("optional-attribute-name");
| if ("".equals(mbeanRefName))
| mbeanRefName = null;
| else
| mbeanRefName = StringPropertyReplacer.replaceProperties(mbeanRefName);
|
| String proxyType = element.getAttribute("proxy-type");
| if ("".equals(proxyType))
| proxyType = null;
| else
| proxyType = StringPropertyReplacer.replaceProperties(proxyType);
|
| // Get the mbeanRef value
| String dependsObjectName = processDependency(mbeanName, mbeanRefName, element, services, replace);
|
| if (mbeanRefName != null)
| {
| ServiceValueMetaData value = new ServiceDependencyValueMetaData(dependsObjectName, proxyType);
| ServiceAttributeMetaData attribute = new ServiceAttributeMetaData();
| attribute.setName(mbeanRefName);
| attribute.setValue(value);
| attributes.add(attribute);
| }
| else
| {
| ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
| dependency.setIDependOn(dependsObjectName);
| dependencies.add(dependency);
| }
| }
| else if (element.getTagName().equals("depends-list"))
| {
| String dependsListName = element.getAttribute("optional-attribute-name");
| if ("".equals(dependsListName))
| dependsListName = null;
|
| NodeList dependsList = element.getChildNodes();
| ArrayList<String> dependsListNames = new ArrayList<String>();
| for (int l = 0; l < dependsList.getLength(); ++l)
| {
| if (dependsList.item(l).getNodeType() != Node.ELEMENT_NODE)
| continue;
|
| Element dependsElement = (Element) dependsList.item(l);
| if (dependsElement.getTagName().equals("depends-list-element"))
| {
| // Get the depends value
| String dependsObjectName = processDependency(mbeanName, dependsListName, dependsElement, services, replace);
| if (dependsListNames.contains(dependsObjectName) == false)
| dependsListNames.add(dependsObjectName);
|
| if (dependsListName == null)
| {
| ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
| dependency.setIDependOn(dependsObjectName);
| dependencies.add(dependency);
| }
| }
| }
ServiceDependencyMetaData:
| public void visit(ServiceMetaDataVisitor visitor)
| {
| ServiceControllerContext context = visitor.getControllerContext();
| Object name = context.getName();
| Object other = iDependOn;
| try
| {
| other = getIDependOnObjectName().getCanonicalName();
| }
| catch (MalformedObjectNameException ignored)
| {
| }
| visitor.addDependency(new LifecycleDependencyItem(name, other, ControllerState.CREATE));
| visitor.addDependency(new LifecycleDependencyItem(name, other, ControllerState.START));
| visitor.visit(this);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030967#4030967
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030967
17 years, 6 months