[JBoss Seam] - Re: Exception for authorization attempt
by shane.bryzakï¼ jboss.com
Yes, the authentication method changed. You now need to provide a method that takes no parameters (instead of the three it expected before) but still returns a boolean. The parameters were removed in favor of directly manipulating the identity instead - here's the example from the docs:
| @Name("authenticator")
| public class Authenticator {
| @In EntityManager entityManager;
| public boolean authenticate() {
| try
| {
| User user = (User) entityManager.createQuery(
| "from User where username = :username and password = :password")
| .setParameter("username", Identity.instance().getUsername())
| .setParameter("password", Identity.instance().getPassword())
| .getSingleResult();
|
| if (user.getRoles() != null)
| {
| for (UserRole mr : user.getRoles())
| Identity.instance().addRole(mr.getName());
| }
|
| return true;
| }
| catch (NoResultException ex)
| {
| FacesMessages.instance().add("Invalid username/password");
| return false;
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011279#4011279
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011279
19Â years, 2Â months
[Performance Tuning] - Re: JBoss Performance Tuning
by grdzeli_kaci
hi tdanecito.
i have one problem, i think u could help me :)
Environment:
1. OS - Sun Solaris SPARC 64-bit.
2. Java - JDK 6.0
3. Hardaware - Sun Machine (4 CPU, 16 GB Fis. Memory, 31 GB Swap)
4. AS - JBoss Application Server 4.0.4 GA.
5. Project - EJB 3.0 and JSF Technologies.
6. Jboss run.conf file
| JAVA_OPTS="-server -Xmx7168m -Xms6144m -Xmn2g -Xss256k -d64 -XX:PermSize=128m -XX:MaxPermSize=256m
| -XX:ParallelGCThreads=20 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
| -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=31 -XX:+AggressiveOpts
| -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -Xloggc:gc.log"
|
i have 4 or 5 jar ejb file and after a 10 or 15 redeploying i get an error
Perm. Gen. Space Error.
if would be nessasity i will be post full stack trace
is there any ban conf ?
can u help me ?
Regards,
Paata
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011277#4011277
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011277
19Â years, 2Â months
[JBoss Seam] - Re: New fileUpload component
by shane.bryzakï¼ jboss.com
Over this last weekend I completely rewrote the file upload component, and one of the improvements is the ability to stream the upload to a temp file on disk. Plus you can now also bind the file data to either a byte[] or InputStream property - so what this means, is that if you use this option it should be very resource efficient (it streams using only a 2k buffer). This only exists in cvs at the moment, and I haven't had a chance to document this yet - if you want to try it out you need to set the createTempFiles filter property to true, ie:
| <filter>
| <filter-name>Seam Multipart Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamMultipartFilter</filter-class>
| <init-param>
| <param-name>createTempFiles</param-name>
| <param-value>true</param-value>
| </init-param>
| </filter>
|
anonymous wrote : Can you please tell me, how can we regenerate the saved images in the database to our front end in JSF.
Check out the seamspace demo, it does exactly this and also supports dynamic resizing of the image. This is done using a servlet (see ContentServlet.java) in conjunction with SeamServletFilter for creating the necessary Seam contexts.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011276#4011276
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011276
19Â years, 2Â months