[JNDI and Naming] - Deploy resource-env-ref on Jboss 5.1
by Francois Richard
Francois Richard [http://community.jboss.org/people/gazz35] created the discussion
"Deploy resource-env-ref on Jboss 5.1"
To view the discussion, visit: http://community.jboss.org/message/561346#561346
--------------------------------------------------------------
Hi,
I'm trying to deploy on JBoss 5.1 an EAR which is usually running on a websphere server6.0. The only WAR of the EAR use a resource-env-ref :
I give you a quick look of my configuration :
web.xml
<resource-env-ref id="ResourceEnvRef_1234792399813">
<description>
</description>
<resource-env-ref-name>spring/fileConfiguration</resource-env-ref-name>
<resource-env-ref-type>java.lang.String</resource-env-ref-type>
</resource-env-ref>
jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<resource-env-ref>
<resource-env-ref-name>spring/fileConfiguration</resource-env-ref-name>
<jndi-name>spring/fileConfigurationName</jndi-name>
</resource-env-ref>
</jboss-web>
Code :
String jndiName = "java:comp/env/spring/fileConfiguration";
Context jndiContext = new InitialContext();
Reference reference = (Reference) jndiContext.lookup(jndiName);
RefAddr addr = reference.get(0);
String applicationContextPath = addr.getContent().toString();
applicationContext = new ClassPathXmlApplicationContext(
applicationContextPath);
To create my resource, I'm using this example :
http://community.jboss.org/docs/DOC-12811 http://community.jboss.org/wiki/LocalOnlyContextFactory
And I add this line on the "bindings" :
<entry>
<key>spring/fileConfigurationName</key>
<value class="java.lang.String">properties/spring/ServicesContext.xml</value>
</entry>
*My problem is that my lookup retrieve a String and not a javax.naming.Reference so I've got a ClassCastException : java.lang.String cannot be cast to javax.naming.Reference.*
I tried to deploy this mbean to do a linkRef (and changing the jboss-web.xml redirection) with no success :
<mbean code="org.jboss.naming.NamingAlias" name="com.bnppa.logviewer:alias=spring/fileConfigurationNameTEST">
<attribute name="FromName">spring/fileConfigurationLink</attribute>
<attribute name="ToName">spring/fileConfigurationName</attribute>
<depends>jboss:service=Naming</depends>
</mbean:xml>
An extract of my jmx-console :
Global JNDI Namespace
+- spring (class: org.jnp.interfaces.NamingContext)
| +- fileConfigurationLink[link -> spring/fileConfigurationName] (class: javax.naming.LinkRef)
| +- fileConfigurationName (class: java.lang.String)
Anyone knows what's wrong with my configuration ?
Thanks in advance
François
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/561346#561346]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 7 months
[jBPM] - Re: Joining of non-concurrent decision paths seems to be broken in 4.4
by Peter Horvath
Peter Horvath [http://community.jboss.org/people/h.peter] created the discussion
"Re: Joining of non-concurrent decision paths seems to be broken in 4.4"
To view the discussion, visit: http://community.jboss.org/message/561147#561147
--------------------------------------------------------------
Hi Maciej,
Sorry for the delay, I've been really busy.
This is an interesting idea and I believe that internally it could work like that. But assuming there is a way you can always deciede wheter to set this flag or not, I think the engine should be responsible for doing that - having to "hint" it if the concurrent executions have to be ended or not does not seem to be the way it should work.
Basically the question is that if there is any algorithm you can use to figure out whether the concurrent executions should be ended or not. I believe the answer is yes: my understanding is that this error happens if you have more join nodes than fork nodes on the path of the current execution. In that case jBPM could simply traverse the graph of the execution to check the number of fork and join nodes hit so far and set this flag accordingly which then could drive the decision whether the concurrent executions are to be ended or not.
Let me know what you think about this approach
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/561147#561147]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 7 months