[Beginner's Corner] - EAR+WAR+EJB ... cannot find resource ... classloader problem on my side?
by zecas zecas
zecas zecas [http://community.jboss.org/people/zecas] created the discussion
"EAR+WAR+EJB ... cannot find resource ... classloader problem on my side?"
To view the discussion, visit: http://community.jboss.org/message/594878#594878
--------------------------------------------------------------
I'm having a serious problem putting a project to work. It really is hold back my advance in the project, and I'm getting very frustrated with this.
Maybe someone can help me here ... I hope so.
I have the following structure:
project.ear
+- load-api.jar
+- webapp.war
+- WEB-INF
+- classes
+- config.properties
+- myejb.jar
Components:
load-api.jar - jar package that loads stuff, including "config.properties" from classpath.
Uses something like:
OneClass.class.getClassLoader().getResourceAsStream( "config.properties" );
webapp.war - simple war module, the only one that depends on "load-api.jar"
Executes a servlet context listener on startup, that will load "config.properties" through "load-api.jar".
myejb.jar - simple EJB3 project, that has a simple EJB component that does nothing at this time.
Now I need to use from within the EJB project a class that is defined on "load-api.jar". What I did was just to add a dependency to "load-api.jar", and nothing more (manifest.mf gets updated with jar info). Before I even add a line of code, my project stops working.
What happens: the listener executed from within "webapp.war" fails to find the "config.properties" resource.
The "config.properties" resource is still defined inside the "WEB-INF->classes" folder of the "webapp.war", like before. But seems that the classloader fails to find it, as if it searches for it inside the EJB ...
I believe this should be normal ... but why is it? Can I change this behaviour? Is it a manifest.mf classpath problem?
This seems to be a matter of classloading-hell, as I've heard of it. The solution is to pull everything to the EJB? And if it is, will it work the same way in other application server JavaEE compliant?
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594878#594878]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[jBPM] - setting a list as an argument of a java task.
by Samrat Roy
Samrat Roy [http://community.jboss.org/people/whizkid.samrat] created the discussion
"setting a list as an argument of a java task."
To view the discussion, visit: http://community.jboss.org/message/594661#594661
--------------------------------------------------------------
Hi ,
I want to set the parameter of a java task method as a list :
here is my jpdl snippet:
<java expr="#{configurationService}" g="320,102,130,52"
method="loadConfiguration"
name="LoadConfiguration"
var="*configuration*">
<arg><string value="c2314"/></arg>
<transition g="-103,-18" name="to GetNextApprover" to="GetNextApprover"/>
</java>
<java class="com.canon.jBpm.services.LoadConfigurationService" g="324,200,122,52"
method="*getNextApprover*"
name="GetNextApprover"
var="approver">
<arg>*Insert syntax to pass configuration obtained in the previous java block*</arg>
<transition g="-96,-18" name="to SendNotification" to="SendNotificationforApproval"/>
</java>
Configuration obtained in var = "configuration" is of type List<LMSUserApproverConfig> config.
the method signature of the method getNextApprover is
public LMSUserApproverConfig getNextApprover(List<LMSUserApproverConfig> config);
How to do it?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594661#594661]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years
[JBoss Messaging] - How much time a Message will reside in a Queue/Topic
by Vinay Bommarati
Vinay Bommarati [http://community.jboss.org/people/vinayknr41] created the discussion
"How much time a Message will reside in a Queue/Topic"
To view the discussion, visit: http://community.jboss.org/message/594954#594954
--------------------------------------------------------------
Hello All
I have some doubts in JbossMessaging .............pls help
1) I have created a queue/topic ...and i sent some messages to queue...but , i din't deploy any MDB to listen to that queue........ Now , for how much time the queue can persists all its messages ...?? if i shutdown my server and start it again , will queue contain all its messages ....??
2) Any one , pls tell the links to create topic ....becuase i can able to create a topic and MDB''s listening the topic also .........But in admin console the topic status is coming as down .............
I have created the topic In the following way :
*<mbean *
* code="org.jboss.jms.server.destination.TopicService" *
* name="jboss.messaging.destination:service=Topic,name=ReceivingTopic" *
* xmbean-dd="xmdesc/Queue-xmbean.xml">*
* <attribute name="JNDIName">MessageBeanTopic</attribute> *
* <attribute name="RedeliveryDelay">1000</attribute>*
* <attribute name="MaxDeliveryAttempts">1</attribute>*
* <depends optional-attribute-name="ServerPeer"> *
* jboss.messaging:service=ServerPeer *
* </depends> *
*<depends> *
* jboss.messaging:service=PostOffice *
* </depends> *
* <attribute name="SecurityConfig"> *
* <security> *
* <role name="guest" read="true" create="true" write = "true" /> *
* </security> *
* </attribute>
*
* </mbean> *
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594954#594954]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years