[JBoss Portal] New message: "Re: Resources for using portal api"
by Monkey Den
User development,
A new message was posted in the thread "Resources for using portal api":
http://community.jboss.org/message/528587#528587
Author : Monkey Den
Profile : http://community.jboss.org/people/monkeyden
Message:
--------------------------------------------------------------
Thanks again Wesley. I've been able to get everything working correctly within my code but transaction committal fails after the request. Seam doesn't know anything about the persistence context the portal API is using so when it tries to commit it fails with:
org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!
...
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
Here is the bit of code that works, until the response:
UserModule userMod = (UserModule) new InitialContext().lookup("java:portal/UserModule");
user = userMod.findUserByUserName(username);
Any idea of how to get around this?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528587#528587
16 years, 1 month
[Beginner's Corner] New message: "file size limit for downloading from a JBoss server?"
by Jim Schumm
User development,
A new message was posted in the thread "file size limit for downloading from a JBoss server?":
http://community.jboss.org/message/528585#528585
Author : Jim Schumm
Profile : http://community.jboss.org/people/jimsch
Message:
--------------------------------------------------------------
Hello all,
I'm running an application on JBoss (jboss-4.2.2.GA) which writes files to the server & then emails the user with the URL to download them.
I've configured the application to write the files to a location outside the JBoss file structure by following http://www.jboss.org/community/wiki/ExternalDirectories.
I'm running into a problem now however in that some cases the URL delivers a zero size file - even though I can see the file on the server isn't empty.
I've run some tests - I can download files of size 22MB & 49MB but when I try one of 66MB it downloads as empty. This seems to imply it's a size issue.
I'd like to know:
1) Where any settings may be made in JBoss to control the maximum download size
2) Where to look for some diagnostics of the problem - I can't see anything about the downloads failing in <JBOSS HOME>\server\default\log\server.log
Any help much appreciated.
Thanks,
Jim
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528585#528585
16 years, 1 month
[JBoss Microcontainer Development] New message: "Re: VFS3 and symlinks"
by Ales Justin
User development,
A new message was posted in the thread "VFS3 and symlinks":
http://community.jboss.org/message/528584#528584
Author : Ales Justin
Profile : http://community.jboss.org/people/alesj
Message:
--------------------------------------------------------------
> Upon further thought I guess it could be possible for someone to feed the canonical File/URL in through the profileservice or admin console, which could then cause issues as it would not match the deployment URL.
>
> So maybe we need something.
I might be too "paranoid" and I agree the test doesn't really show the real-life use case.
But like you said, we might need something or at least be ready if it turns out there is a valid need for this.
Another (extreme) scenario I have in mind is the following use case.
Let's say we already mounted stuff for canonical paths.
But a user doesn't know about the real path (as it's ugly, hard to remember, ...), but he does know the nice symlinks.
And he tries to use that one to navigate through his resources -- resulting in a failure, as we only know the canonical path.
This one is quite ugly to get right, as we would probably always have to re-create the full path,
transform it into canonical, and only then get the child.
Doubt it's worth doing this -- ugly and slow code. No need to repeat some of the mistakes from VFS2. :-)
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528584#528584
16 years, 1 month
[EJB 3.0] New message: "Error on deploy persistence unit"
by Jose M. M. M.
User development,
A new message was posted in the thread "Error on deploy persistence unit":
http://community.jboss.org/message/528577#528577
Author : Jose M. M. M.
Profile : http://community.jboss.org/people/jotremar
Message:
--------------------------------------------------------------
When i try to deploy a ejb project it say:
Failed to create Resource Practica_final-ejb.jar - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:jar=Practica_final-ejb.jar,name=TiendaBean,service=EJB3" is missing the following dependencies: Dependency "<UNKNOWN jboss.j2ee:jar=Practica_final-ejb.jar,name=TiendaBean,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#ejbPU' **") Deployment "jboss.j2ee:jar=Practica_final-ejb.jar,name=TiendaBean,service=EJB3_endpoint" is missing the following dependencies: Dependency "jboss.j2ee:jar=Practica_final-ejb.jar,name=TiendaBean,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall") Deployment "persistence.unit:unitName=#ejbPU" is missing the following dependencies: Dependency "jboss.jca:name=comercioBD,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=comercioBD,service=DataSourceBinding' **") DEPLOYMENTS IN ERROR: Deployment "<UNKNOWN jboss.j2ee:jar=Practica_final-ejb.jar,name=TiendaBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#ejbPU' ** Deployment "jboss.jca:name=comercioBD,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=comercioBD,service=DataSourceBinding' ** -> org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "jboss.j2ee:jar=Practica_final-ejb.jar,name=TiendaBean,service=EJB3" is missing the following dependencies: Dependency "<UNKNOWN jboss.j2ee:jar=Practica_final-ejb.jar,name=TiendaBean,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#ejbPU' **") Deployment "jboss.j2ee:jar=Practica_final-ejb.jar,name=TiendaBean,service=EJB3_endpoint" is missing the following dependencies: Dependency "jboss.j2ee:jar=Practica_final-ejb.jar,name=TiendaBean,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall") Deployment "persistence.unit:unitName=#ejbPU" is missing the following dependencies: Dependency "jboss.jca:name=comercioBD,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=comercioBD,service=DataSourceBinding' **") DEPLOYMENTS IN ERROR: Deployment "<UNKNOWN jboss.j2ee:jar=Practica_final-ejb.jar,name=TiendaBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#ejbPU' ** Deployment "jboss.jca:name=comercioBD,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=comercioBD,service=DataSourceBinding' **
My files:
-------------------persistence.xml---------------
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="ejbPU" transaction-type="JTA">
<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
<jta-data-source>java:/comercioBD</jta-data-source>
<class>modelo.Seccion</class>
<class>modelo.Producto</class>
<class>modelo.Cliente</class>
<class>modelo.Venta</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
</properties>
</persistence-unit>
</persistence>
------------------ejbPU-ds.xml-------------------
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>comercioBD</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/practica_final</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>root</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
</local-tx-datasource>
</datasources>
----------------ejb-------------
@Stateless
public class TiendaBean implements TiendaRemote, TiendaLocal {
public static final String RemoteJNDIName = TiendaBean.class.getSimpleName() + "/remote";
public static final String LocalJNDIName = TiendaBean.class.getSimpleName() + "/local";
@PersistenceContext
private EntityManager em;
...
}
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528577#528577
16 years, 1 month
[JBoss Microcontainer Development] New message: "Re: VFS3 and symlinks"
by John Bailey
User development,
A new message was posted in the thread "VFS3 and symlinks":
http://community.jboss.org/message/528571#528571
Author : John Bailey
Profile : http://community.jboss.org/people/johnbailey
Message:
--------------------------------------------------------------
I agree that having it force canonical every time would be a bit expensive for something that will occur somewhat infrequently. I have however seen symlinks used in large infrastructures in the past.
What I question is why we need to force it. As long as all accesses to the file via URL use the same path (either symlinked or canonical), I don't think there is a problem. The problem that existed in VFS2 with AS5 was specific to the way the URL was being manipulated when the VFS cache was creating permanent roots. I don't think the same problem would exist in the current VFS3 setup.
What is being tested in the VFS symlink test does not seem like a real world test to me. Since there would be no reason for someone to create the URL expecting the inner archive to be a valid path to use as it doesn't exist on the filesystem unless they are using the VFS. I could only see them getting that URL through the VFS in some way and then manipulating it after.
The reason I fail to see this scenario happening in real life is there is an assumption someone is going to take a URL from a VirtualFile from within a zip filesystem and turn it into a File object to then get the canonical file. This will already not work for zip filesystems as the initial File does not actually exist. on the real filesystem whether symlinked or not. The other option is someone has to take a URL run through a process to convert it to a canonical URL and then use that for mounting, and then later on someone is going to ask for files using the symlinked URL. I can't see any reason for symlinked URLs to just be magiced up later in the execution.
I am sure I am missing something, but it seems like as long as nothing within AS takes URLs and manipulates them to get the canonical URL we should be fine. But maybe just to be sure we need to come up with some kind of solution.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528571#528571
16 years, 1 month
[jBPM] New message: "BPMN 2.0 Service Task"
by David Geary
User development,
A new message was posted in the thread "BPMN 2.0 Service Task":
http://community.jboss.org/message/528567#528567
Author : David Geary
Profile : http://community.jboss.org/people/david_geary
Message:
--------------------------------------------------------------
In the BPMN service task in JBPM 4.3 you define the service operation to call as (eg from the example)
<bpmn:interface id="myInterface" name="org.jbpm.examples.bpmn.task.service.JavaService">
<bpmn:operation id="myOperation" name="myMethod">
<bpmn:inMessageRef>inputMessage</bpmn:inMessageRef>
<bpmn:outMessageRef>outputMessage</bpmn:outMessageRef>
</bpmn:operation>
</bpmn:interface>
>From what I can see in the example unit test this creates a new instance of the specified java class (JavaService) when the process executes, in fact if you call the method twice it creates the object twice.
Surely a service is more likely to have a lifecycle external to the process? How can I 'inject' a prexisting service instance into the process? Specifically is it possible to access externally defined spring beans?
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528567#528567
16 years, 1 month