[JBoss jBPM] - Re: gpd.xml bend coordinates
by simonbaker
"kukeltje" wrote : Just out of curiosity, did you choose jGraph over e.g. SVG or did you not consider SVG at all. Personally I'd be interested in an xslt that converts the gpd.xml to SVG. Cool dynamic overlay things can be done than including zooming etc... without the need to use a jpg
Someone else on our team looked at SVG and thought it was a good candidate, I wish I knew more about it. Time and learning curve are always our problem. We needed a "bird's eye view" navigator auxiliary graph, like Yahoo maps, where you move a miniature retangle in a larger one to scroll the main graph, and JGraph had that. Otherwise, JGraph is a substantial package to learn also although the paid support from the developer is fairly good. I would prefer to do everything from scratch or as close to it as possible, maybe SVG would be better for that. I hope to check it out sometime.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128858#4128858
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128858
18 years, 2 months
[Security & JAAS/JBoss] - Re: Custom Login Module not working
by ragavgomatam
I have posted the code of the DatabaseServerLogin Module.....Your method should be called from within getUsersPassword()...Check the super class code
DatabaseServerLoginModule.java
/*
|
| * JBoss, the OpenSource WebOS
|
| *
|
| * Distributable under LGPL license.
|
| * See terms of license at gnu.org.
|
| */
|
| package org.jboss.security.auth.spi;
|
|
|
| import java.security.acl.Group;
|
| import java.util.HashMap;
|
| import java.util.Map;
|
| import java.sql.Connection;
|
| import java.sql.PreparedStatement;
|
| import java.sql.ResultSet;
|
| import java.sql.SQLException;
|
| import javax.naming.InitialContext;
|
| import javax.naming.NamingException;
|
| import javax.sql.DataSource;
|
| import javax.security.auth.Subject;
|
| import javax.security.auth.callback.CallbackHandler;
|
| import javax.security.auth.login.LoginException;
|
| import javax.security.auth.login.FailedLoginException;
|
|
|
| import org.jboss.security.SimpleGroup;
|
| import org.jboss.security.SimplePrincipal;
|
| import org.jboss.security.auth.spi.UsernamePasswordLoginModul
|
|
|
| /**
|
| * A JDBC based login module that supports authentication and
|
| * It is based on two logical tables:
|
| * <ul>
|
| * <li>Principals(PrincipalID text, Password text)
|
| * <li>Roles(PrincipalID text, Role text, RoleGroup text)
|
| * </ul>
|
| * <p>
|
| * LoginModule options:
|
| * <ul>
|
| * <li><em>dsJndiName</em>: The name of the DataSource of the
|
| * <li><em>principalsQuery</em>: The prepared statement query
|
| * <pre>
|
| * "select Password from Principals where PrincipalID=?"
|
| * </pre>
|
| * <li><em>rolesQuery</em>: The prepared statement query, equ
|
| * <pre>
|
| * "select Role, RoleGroup from Roles where PrincipalID=?"
|
| * </pre>
|
| * </ul>
|
| *
|
| * @author <a href="mailto:on@ibis.odessa.ua">Oleg Nitz</a>
|
| * @author Scott.Stark(a)jboss.org
|
| * @version $Revision: 1.6 $
|
| */
|
| public class DatabaseServerLoginModule extends UsernamePasswo
|
| {
|
| private String dsJndiName;
|
| private String principalsQuery = "select Password from Pri
|
| private String rolesQuery = "select Role, RoleGroup from R
|
|
|
| /**
|
| * Initialize this LoginModule.
|
| */
|
| public void initialize(Subject subject, CallbackHandler ca
|
| {
|
| super.initialize(subject, callbackHandler, sharedState,
|
| dsJndiName = (String) options.get("dsJndiName");
|
| if( dsJndiName == null )
|
| dsJndiName = "java:/DefaultDS";
|
| Object tmp = options.get("principalsQuery");
|
| if( tmp != null )
|
| principalsQuery = tmp.toString();
|
| tmp = options.get("rolesQuery");
|
| if( tmp != null )
|
| rolesQuery = tmp.toString();
|
| log.trace("DatabaseServerLoginModule, dsJndiName="+dsJn
|
| log.trace("principalsQuery="+principalsQuery);
|
| log.trace("rolesQuery="+rolesQuery);
|
| }
|
|
|
| /** Get the expected password for the current username ava
|
| * the getUsername() method. This is called from within th
|
| * method after the CallbackHandler has returned the usern
|
| * candidate password.
|
| * @return the valid password String
|
| */
|
| protected String getUsersPassword() throws LoginException
|
| {
|
| String username = getUsername();
|
| String password = null;
|
| Connection conn = null;
|
| PreparedStatement ps = null;
|
|
|
| try
|
| {
|
| InitialContext ctx = new InitialContext();
|
| DataSource ds = (DataSource) ctx.lookup(dsJndiName);
|
| conn = ds.getConnection();
|
| // Get the password
|
| ps = conn.prepareStatement(principalsQuery);
|
| ps.setString(1, username);
|
| ResultSet rs = ps.executeQuery();
|
| if( rs.next() == false )
|
| throw new FailedLoginException("No matching user
|
|
|
| password = rs.getString(1);
|
| password = convertRawPassword(password);
|
| rs.close();
|
| }
|
| catch(NamingException ex)
|
| {
|
| throw new LoginException(ex.toString(true));
|
| }
|
| catch(SQLException ex)
|
| {
|
| log.error("Query failed", ex);
|
| throw new LoginException(ex.toString());
|
| }
|
| finally
|
| {
|
| if( ps != null )
|
| {
|
| try
|
| {
|
| ps.close();
|
| }
|
| catch(SQLException e)
|
| {}
|
| }
|
| if( conn != null )
|
| {
|
| try
|
| {
|
| conn.close();
|
| }
|
| catch (SQLException ex)
|
| {}
|
| }
|
| }
|
| return password;
|
| }
|
|
|
| /** Overriden by subclasses to return the Groups that cor
|
| to the role sets assigned to the user. Subclasses should
|
| least a Group named "Roles" that contains the roles assi
|
| A second common group is "CallerPrincipal" that provides
|
| identity of the user rather than the security domain ide
|
| @return Group[] containing the sets of roles
|
| */
|
| protected Group[] getRoleSets() throws LoginException
|
| {
|
| String username = getUsername();
|
| Connection conn = null;
|
| HashMap setsMap = new HashMap();
|
| PreparedStatement ps = null;
|
|
|
| try
|
| {
|
| InitialContext ctx = new InitialContext();
|
| DataSource ds = (DataSource) ctx.lookup(dsJndiName)
|
| conn = ds.getConnection();
|
| // Get the users role names
|
| ps = conn.prepareStatement(rolesQuery);
|
| ps.setString(1, username);
|
| ResultSet rs = ps.executeQuery();
|
| if( rs.next() == false )
|
| {
|
| if( getUnauthenticatedIdentity() == null )
|
| throw new FailedLoginException("No matching u
|
| /* We are running with an unauthenticatedIdentit
|
| empty Roles set and return.
|
| */
|
| Group[] roleSets = { new SimpleGroup("Roles") };
|
| return roleSets;
|
| }
|
|
|
| do
|
| {
|
| String name = rs.getString(1);
|
| String groupName = rs.getString(2);
|
| if( groupName == null || groupName.length() ==
|
| groupName = "Roles";
|
| Group group = (Group) setsMap.get(groupName);
|
| if( group == null )
|
| {
|
| group = new SimpleGroup(groupName);
|
| setsMap.put(groupName, group);
|
| }
|
| group.addMember(new SimplePrincipal(name));
|
| } while( rs.next() );
|
| rs.close();
|
| }
|
| catch(NamingException ex)
|
| {
|
| throw new LoginException(ex.toString(true));
|
| }
|
| catch(SQLException ex)
|
| {
|
| super.log.error("SQL failure", ex);
|
| throw new LoginException(ex.toString());
|
| }
|
| finally
|
| {
|
| if( ps != null )
|
| {
|
| try
|
| {
|
| ps.close();
|
| }
|
| catch(SQLException e)
|
| {}
|
| }
|
| if( conn != null )
|
| {
|
| try
|
| {
|
| conn.close();
|
| }
|
| catch (Exception ex)
|
| {}
|
| }
|
| }
|
|
|
| Group[] roleSets = new Group[setsMap.size()];
|
| setsMap.values().toArray(roleSets);
|
| return roleSets;
|
| }
|
|
|
| /** A hook to allow subclasses to convert a password from
|
| into a plain text string or whatever form is used for ma
|
| the user input. It is called from within the getUsersPas
|
| @param rawPassword, the password as obtained from the da
|
| @return the argument rawPassword
|
| */
|
| protected String convertRawPassword(String rawPassword)
|
| {
|
| return rawPassword;
|
| }
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128857#4128857
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128857
18 years, 2 months
[JBoss Seam] - message transformation error
by mulatli
I am new for JBoss ESB and I tryed to follow the console-demo-01 and get this error when I test out. What am I diong rong?
java.lang.NullPointerException
at com.sun.facelets.util.DevTools.writeVariables(DevTools.java:168)
at com.sun.facelets.util.DevTools.writeVariables(DevTools.java:144)
at com.sun.facelets.util.DevTools.debugHtml(DevTools.java:135)
at com.sun.facelets.tag.ui.UIDebug.writeDebugOutput(UIDebug.java:92)
at com.sun.facelets.tag.ui.UIDebug.encodeBegin(UIDebug.java:81)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:74)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Can some one explain what the error could mean.
regards
I am using jboss-4.2.2.GA and jbossesb-4.2.1GA. The HalloWorld example works fine.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128852#4128852
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128852
18 years, 2 months