[EJB/JBoss] - Accessing weblogic ejb from jboss
by mathieuuu
Hello,
I am currently trying to access an EJB Session deployed in a Weblogic server from JBOSS.
The client code looks like this :
| Hashtable environment = new Hashtable();
| environment.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
| environment.put(Context.URL_PKG_PREFIXES, "weblogic.jndi.factories");
| environment.put(Context.PROVIDER_URL, "t3://<ip>:<port>");
| InitialContext context = new InitialContext(environment);
|
| ServiceHome home = (ServiceHome)context.lookup("ejb/Service");
|
When I run this code from a standalone java program it executes ok, but when I try to run it from an application deployed in JBOSS, the line (5) which creates the InitialContext object throws this Exception :
java.lang.ThreadDeath
| org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1221)
| org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
| weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:696)
| weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:742)
| weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:729)
| weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
| weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:497)
| weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:460)
| weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:364)
| weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:327)
| weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:253)
| weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
| javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
| javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
| javax.naming.InitialContext.init(Unknown Source)
| javax.naming.InitialContext.<init>(Unknown Source)
|
In order to be able to use weblogic naming factory I put the archive weblogic-8.1.6.0.jar in jboss's /server/default/lib directory.
But I think it has to do with JNDI conflicts between JBOSS and weblogic.
If someone has already done this or has an idea about the problem ... thank you for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201027#4201027
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201027
17 years, 6 months
[JBoss jBPM] - Re: StackOverflowError
by insanely.freak
I have also tried with two Task nodes but still i get same result following is the processdefinition.xml file for aboce case:
| <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="process_name">
|
| <start-state name="start">
| <transition to="decision" ></transition>
| </start-state>
|
| <task-node name="decision" create-tasks="true">
| <task name="decision_task" description="decision">
| </task>
| <transition to="to_end" name="to_end"/>
| <transition to="taskNode" name="taskNode"/>
| </task-node>
|
| <task-node name="taskNode" create-tasks="true">
| <task name="approve_task" description="hula">
| <assignment class="com.workflow.CostCenterAssignmentHandler">
| </assignment>
| </task>
| <transition to="decision" name="decision"/>
| </task-node>
|
| <end-state name="to_end"></end-state>
| </process-definition>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201026#4201026
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201026
17 years, 6 months
[JBoss jBPM] - TaskNode override
by Kooper
Hi,
I need to override TaskNode with my custome Node to add type attribute to it.
I read on the forum that for this I need update jbpm.cfg.xml with
| <string name="resource.node.types" value="com/jbpm/node/node.types.xml" />
|
I've moved node.types.xml to the location above and updated task node value
| <node-type element="task-node" class="com.jbpm.node.MyNode" />
|
I've created MyNode.java and override execute() method, created MyNode.hbm.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!DOCTYPE hibernate-mapping PUBLIC
| "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
| "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
| <hibernate-mapping default-access="field">
| <subclass name="com.jbpm.node.MyNode"
| discriminator-value="M" extends="org.jbpm.graph.node.TaskNode">
| <property name="type" column="TYPE_" />
| </subclass>
| </hibernate-mapping>
and updated hibernate.cfg.xml with MyNode.hbm.xml
Adn deployed the application. But when running I'm still having TaskNode returned to me and not MyNode.
Will the described above solution work or I need to change jbpm source to add type attribute?
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201025#4201025
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201025
17 years, 6 months
[JBoss jBPM] - Re: workaround for StackOverflow exception
by insanely.freak
>From one of the post in forum I got to know that there should be a wait state when we try to implement such loop cases, which in my case is there.
I have also tried with two Task nodes but still i get same result following is the processdefinition.xml file for aboce case:
| <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="process_name">
|
| <start-state name="start">
| <transition to="decision" ></transition>
| </start-state>
|
| <task-node name="decision" create-tasks="true">
| <task name="decision_task" description="decision">
| </task>
| <transition to="to_end" name="to_end"/>
| <transition to="taskNode" name="taskNode"/>
| </task-node>
|
| <task-node name="taskNode" create-tasks="true">
| <task name="approve_task" description="hula">
| <assignment class="com.workflow.CostCenterAssignmentHandler">
| </assignment>
| </task>
| <transition to="decision" name="decision"/>
| </task-node>
|
| <end-state name="to_end"></end-state>
| </process-definition>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201020#4201020
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201020
17 years, 6 months
[JBossWS] - Re: Class Cast Exception under Endpoint.publish()
by adinn
Wow, that's certainly what I call quality service! I'm not 100% sure why you immediately reopened it though. I was posting more to discuss the reasons for excluding it than to state an absolute requirement :-)
Well, ok, I actually saw that Alessio told you to do it on the assumption that eventually the TCK tests will be reinstated. However, I noticed that the JaxWS spec doesn't actually include a Conformance note indicating that the Endpoint API must be implemented. Maybe this is why the TCK tests are commented out?
I would still like to be able to use the Endpoint API but as it is not available now I am going to have to go ahead with static configured endpoints. So, although this feature would be nice to have don't prioritise it before other important customer-driven features on my account.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201019#4201019
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201019
17 years, 6 months