[JBoss JIRA] Created: (JBPM-821) ProcessClassLoader.getResourceAsStream throws JbpmException when the resource is not found in DB
by V?ctor Su?rez (JIRA)
ProcessClassLoader.getResourceAsStream throws JbpmException when the resource is not found in DB
------------------------------------------------------------------------------------------------
Key: JBPM-821
URL: http://jira.jboss.com/jira/browse/JBPM-821
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.1.2
Reporter: V?ctor Su?rez
Assigned To: Tom Baeyens
"ProcessClassLoader.getResourceAsStream(String name)" must return null when the resource is not found <link>http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ClassLoader.html#getRes...</link>.
But when the resource look up must be performed in the DB, if that resource is not found I get a JbpmException.
"ProcessClassLoader.getResourceAsStream(String name)" delegates in "fileDefinition.getBytes(name)" for searching the resource, and this calls to "getBytesFromDb(name)", and finally, this calls to "getByteArray(name)", that performs this code:
if (byteArray == null) {
throw new JbpmException("file '" + name + "' not found in db");
}
I think that a possible solution could be:
byte[] getBytesFromDb(String name) {
byte[] bytes;
//refactored this line
ByteArray byteArray = doGetByteArray(name);
bytes = byteArray.getBytes();
return bytes;
}
ByteArray getByteArray(String name) {
//extract method refactoring
ByteArray byteArray = doGetByteArray(name);
if (byteArray == null) {
throw new JbpmException("file '" + name + "' not found in db");
}
return byteArray;
}
//extracted method
ByteArray doGetByteArray(String name) {
ByteArray byteArray = (ByteArray) (processFiles != null ? processFiles.get(name) : null);
return byteArray;
}
I let with no modifications "getByteArray(String name)" because is referenced in the rest of code.
Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 8 months
[JBoss JIRA] Created: (JGRP-347) TCP bundling with FLUSH not working
by Bela Ban (JIRA)
TCP bundling with FLUSH not working
-----------------------------------
Key: JGRP-347
URL: http://jira.jboss.com/jira/browse/JGRP-347
Project: JGroups
Issue Type: Bug
Affects Versions: 2.3 SP1
Reporter: Bela Ban
Assigned To: Bela Ban
Fix For: 2.4
We can make TCP with bundling *on* work (timeout 0) if we exchange order
of passUp/passDown of the view for a new member in Gms line 509. Since
bundler is sending messages in bundles it screws up synchronous step
process required for a new member when doing START_FLUSH, view
installation, STOP_FLUSH. We have a thread race here on line 509. In
order to circumvent that we can *first* pass a view from a join response
up to FLUSH and then pass it down. I am not sure how this affects other
tests.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 8 months
[JBoss JIRA] Created: (JBPM-832) persist annotated classes by using AnnotationConfiguration in HibernateHelper.java
by Chris Russell (JIRA)
persist annotated classes by using AnnotationConfiguration in HibernateHelper.java
----------------------------------------------------------------------------------
Key: JBPM-832
URL: http://jira.jboss.com/jira/browse/JBPM-832
Project: JBoss jBPM
Issue Type: Feature Request
Components: Core Engine
Affects Versions: jBPM 3.2 beta 1
Reporter: Chris Russell
Assigned To: Tom Baeyens
Fix For: jBPM 3.2 beta 2
Should be able to persist annotated Entitys (classes that dont have a hbm.xml mapping file).
To do this is a fairly simple change to HibernateHelper.java.
One unresolved question here is why doesnt the hibernate.cfg.xml configuration option
<property name="hibernate.ejb.naming_strategy">
get picked up??
HibernateHelper.java
..
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.cfg.DefaultComponentSafeNamingStrategy;
.
.
public static Configuration createConfiguration(String cfgXmlResource, String propertiesResource) {
AnnotationConfiguration configuration = new AnnotationConfiguration();
//NOT SURE WHY BUT configuration not picking up
//hibernate.cfg.xml
//<property name="hibernate.ejb.naming_strategy">
//org.hibernate.cfg.DefaultComponentSafeNamingStrategy</property>
log.debug("NAMING START STRATEGY ["+configuration.getNamingStrategy().getClass().getName()+"]");
log.debug(configuration.setNamingStrategy(new DefaultComponentSafeNamingStrategy()));
log.debug("NAMING AFTER STRATEGY ["+configuration.getNamingStrategy().getClass().getName()+"]");
With these changes you can now add mappings to the hibernate.cfg.xml
such as
<mapping package="foo"/>
<mapping class="foo.MyAnnotatedFooClass"/>
To pick up annotated classes....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 8 months
[JBoss JIRA] Created: (JBAS-4125) Move clustering test support classes to test module
by Brian Stansberry (JIRA)
Move clustering test support classes to test module
---------------------------------------------------
Key: JBAS-4125
URL: http://jira.jboss.com/jira/browse/JBAS-4125
Project: JBoss Application Server
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Test Suite
Reporter: Brian Stansberry
The org.jboss.test.JBossClusteredTestCase, JBossClusteredTestServices and JBossClusteredTestSetup classes should be moved out of the testsuite module and into test. They are just utility classes to support deployment to more than one AS instance and exposure to test clients of more than one JNDI URL and base HTTP URL. EJB3 uses them as well, so they need to be in a binary to allow EJB3 to decouple from the AS.
This should be done on both trunk and Branch_4_2.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 8 months
[JBoss JIRA] Created: (EJBTHREE-823) Unable to call ejb remotely
by Sureshbabu Thyvalappil (JIRA)
Unable to call ejb remotely
---------------------------
Key: EJBTHREE-823
URL: http://jira.jboss.com/jira/browse/EJBTHREE-823
Project: EJB 3.0
Issue Type: Bug
Environment: JBOSS 4.0.5 with EJB 3.0
Reporter: Sureshbabu Thyvalappil
I'm using JBOSS 4.0.5GA with ejb3. I am running into weird behavior when running java client from remote machine. If I run it from the same machine where the jboss server is running, no problem. So here is the behavior I'm noticing.
FOr the jndi lookup of ejb, it is connecting the remote server and gets a reference to the ejb. But when I call a method on the ejb reference, it is trying to call a method on the local machine( I mean the same machine where the client is running).
Sounds very weird to me. Any help is appreciated from EJB3 experts.
I upgraded to EJB3 RC9 patch1, but same behavior.
Here is the client code ..
try
{
Properties p=new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL,"jnp://remote-host:1099");
InitialContext ctx = new InitialContext(p);
IReportService report = (IReportService) ctx.lookup(
"ejb3/xxx/ReportService");
System.out.println("Got the ejb remote reference = "+report);
System.out.println("report.resubmit.."+report.resubmit(null,0L));
ReportJob reportJob = new ReportJob();
System.out.println("B4 report.submitRequest..");
report.submitRequest(reportJob);
System.out.println("After report.submitRequest..");
}
catch (Exception e)
{
e.printStackTrace();
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 8 months