Re: Adapting legacy request parameters into new POJO?

2010-04-13 Thread Mick Knutson
the compiler plugin is implicit in Maven. You should have access to it
automatically.
But, if the examples are the same as the PDF document, then it is wrong as
there is no DelegatingCopier anywhere and that is a main class that is used
in that example. So if it is missing, then the examples will not compile
anyways.

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring  Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://www.baselogic.com
Blog: http://www.baselogic.com/blog/
Linked IN: http://linkedin.com/in/mickknutson
Twitter: http://twitter.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Mon, Apr 12, 2010 at 10:28 PM, Martin Gainty mgai...@hotmail.com wrote:

 for some reason the pom.xml that came with the morph project forgot the
 maven-compile plugin ( so you cannot compile the examples) here is my
 pom.xml for morph project



[VFS] unable to resolve a file

2010-04-13 Thread mayur malpani
Hi,
I was working on sample app for FTPing a file from Mainframe(MVS)
system to anotherUnix system.I have followed the following steps .


1)  trying to construct an authenticator
private static StaticUserAuthenticator mainframeAuth = new
StaticUserAuthenticator(null, username, password);
--
2)trying to add filesystemOptions
private static FileSystemOptions sourceOpts = new FileSystemOptions( );

DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(sourceOpts,
mainframeAuth );
-
3) Get a reference of source file object
srcMainframePath =
ftp://[server-name]:21/\'[file.name]\'ftp://[server-name]/\'[file.name]\'
;
srcFileObj = (FtpFileObject) VFS.getManager().resolveFile(srcMainframePath,
sourceOpts);
---
4) Actually I am trying to copy this file but just for your reference lets
consider callings exists ( ) method on the src obj which should work fine
and return true but it is returning false
srcFileObj.exists()


But as I said I was trying to use destObj.copyFrom( srcObj) function , this
worked fine from Unix to Unix file transfer but when i run the same code to
copyFrom Mainframe server to Unix server it gave me the following exception
.I am still unable to trace out what is the exact issue ?Am I going wrong
somewhere here ?
Any thoughts from your side would help me a lot in getting this through.

 Exception :-  It says file does not exist but when i try to run the basic
FTP command from my local system i am able to copy the file  from Mainframe
to my syste

 2010/04/07 12:20:24:538 IST [INFO] DefaultFileReplicator - -Using
C:\DOCUME~1\LOCALS~1\Temp\vfs_cache as temporary files store.
2010/04/07 12:20:24:663 IST [DEBUG] StandardFileSystemManager - -Skipping
provider org.apache.commons.vfs.provider.http.HttpFileProvider because
required class org.apache.commons.httpclient.HttpClient is not available.
2010/04/07 12:20:24:663 IST [DEBUG] StandardFileSystemManager - -Skipping
provider org.apache.commons.vfs.provider.https.HttpsFileProvider because
required class org.apache.commons.httpclient.HttpClient is not available.
2010/04/07 12:20:24:663 IST [DEBUG] StandardFileSystemManager - -Skipping
provider org.apache.commons.vfs.provider.sftp.SftpFileProvider because
required class com.jcraft.jsch.JSch is not available.
2010/04/07 12:20:25:616 IST [DEBUG] SoftRefFilesCache - -putFile:
ftp://[src-server-name]/[file-name]
2010/04/07 12:20:25:616 IST [DEBUG] SoftRefFilesCache - -putFile:
ftp://[src-server-name]/

2010/04/07 12:20:30:835 IST [DEBUG] SoftRefFilesCache - -putFile:
ftp://[servername]/[absolute file path]/[dest-file-name]
2010/04/07 12:20:30:835 IST [DEBUG] SoftRefFilesCache - -putFile:
ftp://[servername]/
2010/04/07 12:20:30:835 IST [DEBUG] SoftRefFilesCache - -putFile:
ftp://[servername]/[absolute file path]
2010/04/07 12:20:30:851 IST [DEBUG] SoftRefFilesCache - -putFile:
ftp://[servername]/[absolute file path]
2010/04/07 12:20:30:851 IST [DEBUG] SoftRefFilesCache - -putFile:
ftp://[servername]/[absolute file path]
2010/04/07 12:20:30:851 IST [DEBUG] SoftRefFilesCache - -putFile:
ftp://[servername]/[absolute file path]
2010/04/07 12:20:30:851 IST [DEBUG] SoftRefFilesCache - -putFile:
ftp://[servername]/[absolute file path]
2010/04/07 12:20:30:851 IST [DEBUG] SoftRefFilesCache - -putFile:
ftp://[servername]/[absolute file path]
org.apache.commons.vfs.FileSystemException: Could not read from 
*ftp://[src-server-name]/[file-name] because file
ftp://[src-server-name]/[file-name] does not exist at*
org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1109)
 at
org.apache.commons.vfs.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:317)
 at org.apache.commons.vfs.FileUtil.writeContent(FileUtil.java:71)
 at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:103)
 at Testvfs.main(Testvfs.java:110)





Thanks
Mayur.


[SCXML] Parallel parent states resetting to initial substates?

2010-04-13 Thread Bill Herring
I'm working with a state model with two parallel states that each have  
substates:


parallel id=channel
state id=agent_status initial=ready
transition event=parent.goReady   target=ready/
transition event=parent.goNotReady   target=not_ready/
state id=ready
transition event=goNotReady   target=not_ready/
/state
state id=not_ready
transition event=goReady   target=ready/
/state
/state

state id=channel_status initial=off_call
transition event=parent.dial   target=on_call /
transition event=parent.hangup   target=off_call /
state id=off_call
transition event=dial   target=on_call /
/state
state id=on_call
transition event=hangup   target=off_call /
/state
 /state
/parallel

When I trigger transitions with the leaf events (goNotReady,  
goReady, dial, and hangup) everything works as I would expect - the  
two parallel states transition between substates independently.   
However, if I trigger transitions using the parent  
events (parent.X), the transition occurs in the one parallel substate  
and the other parallel substate apparently resets to its initial  
state.  As a concrete example, if I trigger parent.goNotReady  
followed by parent.dial I end up in on_call and ready (vs.  
on_call and not_ready, which I would be in if I has used  
goNotReady and dial instead).


Is this a feature or a bug?  Is there a way to get the same behavior  
in both cases?  I realize that in this trivial example there's no real  
advantage to putting the transitions in parent states, but I have a  
much more complex state model where I want to put catch all  
transitions in parent states and this behavior is stopping me from  
doing that.


Thanks,
Bill

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Commons Lang ToStringBuilder.reflectionToString / Hibernate question

2010-04-13 Thread Thomas P. Fuller
Hi Folks,

I have a brief question about the Commons Lang 
ToStringBuilder.reflectionToString method:

If I override the toString method as follows:

@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}

for a Hibernate CGLIB-enhanced bean, my understanding is that this will *not* 
call the database because the reflectionToString method is accessing the fields 
directly and not the getter methods.

Can you please clarify if I am correct?

Thanks for your help,

Tom


RE: Commons Lang ToStringBuilder.reflectionToString / Hibernate question

2010-04-13 Thread Gary Gregory
You are correct.

Gary Gregory
Senior Software Engineer
Seagull Software
email: ggreg...@seagullsoftware.com
email: ggreg...@apache.org
www.seagullsoftware.com 



 -Original Message-
 From: Thomas P. Fuller [mailto:thomas.ful...@coherentlogic.com]
 Sent: Tuesday, April 13, 2010 10:56
 To: user@commons.apache.org
 Subject: Commons Lang ToStringBuilder.reflectionToString / Hibernate question
 
 Hi Folks,
 
 I have a brief question about the Commons Lang
 ToStringBuilder.reflectionToString method:
 
 If I override the toString method as follows:
 
 @Override
 public String toString() {
 return ToStringBuilder.reflectionToString(this);
 }
 
 for a Hibernate CGLIB-enhanced bean, my understanding is that this will *not*
 call the database because the reflectionToString method is accessing the
 fields directly and not the getter methods.
 
 Can you please clarify if I am correct?
 
 Thanks for your help,
 
 Tom


RE: Commons Lang ToStringBuilder.reflectionToString / Hibernate question

2010-04-13 Thread Jörg Schaible
Gary Gregory wrote:

 You are correct.

However, you have to consider, that CGLIB adds itself some stuff to the 
class that will be catched then ... :-)

- Jörg


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [SCXML] Parallel parent states resetting to initial substates?

2010-04-13 Thread Bill Herring
OK, I found that it is indeed a feature (Section 3.3.3 of the SCXML  
spec), but I still need the behavior I describe in my original email.   
In an attempt to fix the problem, I added history states to the two  
parallel parent states, like this:


parallel id=open_channel
state id=agent_status
initial
transition target=resume_agent_status/
/initial
transition event=tester.Pready   target=ready/
transition event=tester.PnotReady   target=not_ready/
state id=ready
transition event=tester.notReady   
target=not_ready/
/state
state id=not_ready
transition event=tester.ready   target=ready/
/state
history id=resume_agent_status type=deep
transition target=ready/
/history
/state
state id=channel_status
initial
transition target=resume_channel_status/
/initial
transition event=tester.Pdial   target=on_call /
transition event=tester.Phangup   target=off_call /
state id=off_call
transition event=tester.dial   target=on_call /   
  
/state
state id=on_call
transition event=tester.hangup   target=off_call /
/state
history id=resume_channel_status type=deep
transition target=off_call/
/history
/state
/parallel

However, the result appears to be similar but with some additional  
strange behavior if I transition to a state I'm already in - I suspect  
the transitions and histories are conflicting with each other. (?)


Still wondering if there's any way to use catch-all transitions in  
parent states when the parent states are parallel.


- Bill


On Jan 8, 2010, at 10:25 AM, Bill Herring wrote:

I'm working with a state model with two parallel states that each  
have substates:


parallel id=channel
state id=agent_status initial=ready
transition event=parent.goReady   target=ready/
transition event=parent.goNotReady   target=not_ready/
state id=ready
transition event=goNotReady   target=not_ready/
/state
state id=not_ready
transition event=goReady   target=ready/
/state
   /state

state id=channel_status initial=off_call
transition event=parent.dial   target=on_call /
transition event=parent.hangup   target=off_call /
state id=off_call
transition event=dial   target=on_call /
/state
state id=on_call
transition event=hangup   target=off_call /
/state
 /state
/parallel

When I trigger transitions with the leaf events (goNotReady,  
goReady, dial, and hangup) everything works as I would expect - the  
two parallel states transition between substates independently.   
However, if I trigger transitions using the parent  
events (parent.X), the transition occurs in the one parallel  
substate and the other parallel substate apparently resets to its  
initial state.  As a concrete example, if I trigger  
parent.goNotReady followed by parent.dial I end up in on_call  
and ready (vs. on_call and not_ready, which I would be in if I  
has used goNotReady and dial instead).


Is this a feature or a bug?  Is there a way to get the same behavior  
in both cases?  I realize that in this trivial example there's no  
real advantage to putting the transitions in parent states, but I  
have a much more complex state model where I want to put catch all  
transitions in parent states and this behavior is stopping me from  
doing that.


Thanks,
Bill

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org













-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Commons Exec not producing the same result as the command line

2010-04-13 Thread Daniel Wamara
Good evening all, 

I am trying to call ffmpeg via the command exec in order to transcode some 
files and the strange thing happening is that the files produced are not the 
same as the one I can create when calling the same command via the command line.

This is how I am calling fmpeg and I get a file with a particular codec in it 
(strangely not the right one) although launching in the command line exactly 
what I have in the sb.toString() which is the command to be executed, the file 
created has a correct codec. So to say, the same command started via Exec and 
the one started via the command line have not the same result. Anyone has an 
idea?

Thanks.
Daniel Wamara

StringBuilder sb = new StringBuilder(/home/ect/scripts/transcoding.sh );

sb.append(  + source.getAbsolutePath());

sb.append(  + attributes.getCodec());

sb.append(  + String.valueOf(attributes.getSamplingRate().intValue()));

sb.append(  + target.getAbsolutePath());


logDebug(command --  + sb.toString());


CommandLine commandLine = CommandLine.parse(sb.toString());

DefaultExecutor executor = new DefaultExecutor();

executor.execute(commandLine);


Re: [SCXML] Parallel parent states resetting to initial substates?

2010-04-13 Thread Rahul Akolkar
On Fri, Jan 8, 2010 at 6:37 PM, Bill Herring bherr...@openmethods.com wrote:
 OK, I found that it is indeed a feature (Section 3.3.3 of the SCXML spec),
snip/

Yup, followed transition's parent state will always be exited (and if
its the base of an orthogonal region, that means all other orthogonal
region siblings will have to be exited too, given the semantics of
parallel).


 but I still need the behavior I describe in my original email.  In an
 attempt to fix the problem, I added history states to the two parallel
 parent states, like this:

        parallel id=open_channel
            state id=agent_status
                initial
                        transition target=resume_agent_status/
                /initial
                transition event=tester.Pready   target=ready/
                transition event=tester.PnotReady   target=not_ready/
                        state id=ready
                        transition event=tester.notReady
 target=not_ready/
                        /state
                        state id=not_ready
                        transition event=tester.ready   target=ready/
                        /state
                        history id=resume_agent_status type=deep
                                transition target=ready/
                        /history
                /state
            state id=channel_status
                initial
                        transition target=resume_channel_status/
                /initial
                transition event=tester.Pdial   target=on_call /
                transition event=tester.Phangup   target=off_call /
                        state id=off_call
                        transition event=tester.dial   target=on_call /

                        /state
                        state id=on_call
                        transition event=tester.hangup   target=off_call
 /
                        /state
                        history id=resume_channel_status type=deep
                                transition target=off_call/
                        /history
                /state
        /parallel

 However, the result appears to be similar but with some additional strange
 behavior if I transition to a state I'm already in - I suspect the
 transitions and histories are conflicting with each other. (?)

 Still wondering if there's any way to use catch-all transitions in parent
 states when the parent states are parallel.

snap/

Add an intermediate state that prevents the exit from the orthogonal region.

So, instead of this pattern:

parallel id=par

  state id=region1
initial
  transition target=foo/
/initial
transition event=trigger   target=bar/

!-- foo, bar and other content --

  /state

  !-- other regions --

/parallel

use the following pattern instead:

parallel id=par

  state id=region1
initial
  transition target=intermediate/
/initial

!-- the following contains content of region1 before --
state id=intermediate
  initial
transition target=foo/
  /initial
  transition event=trigger   target=bar/

  !-- foo, bar and other content --
/state

  /state

  !-- other regions --

/parallel

-Rahul


 - Bill


 On Jan 8, 2010, at 10:25 AM, Bill Herring wrote:

 I'm working with a state model with two parallel states that each have
 substates:

        parallel id=channel
            state id=agent_status initial=ready
                transition event=parent.goReady   target=ready/
                transition event=parent.goNotReady
 target=not_ready/
                state id=ready
                transition event=goNotReady   target=not_ready/
                /state
                state id=not_ready
                transition event=goReady   target=ready/
                /state
           /state

            state id=channel_status initial=off_call
                transition event=parent.dial   target=on_call /
                transition event=parent.hangup   target=off_call /
                state id=off_call
                transition event=dial   target=on_call /
                /state
                state id=on_call
                transition event=hangup   target=off_call /
                /state
             /state
        /parallel

 When I trigger transitions with the leaf events (goNotReady, goReady,
 dial, and hangup) everything works as I would expect - the two parallel
 states transition between substates independently.  However, if I trigger
 transitions using the parent events (parent.X), the transition occurs in
 the one parallel substate and the other parallel substate apparently
 resets to its initial state.  As a concrete example, if I trigger
 parent.goNotReady followed by parent.dial I end up in on_call and
 ready (vs. on_call and not_ready, which I would be in if I has used
 goNotReady and dial instead).

 Is this a feature or a bug?  Is there a way to get the same behavior in
 both cases?  I realize that in this trivial example 

Re: Commons Exec not producing the same result as the command line

2010-04-13 Thread sebb
On 13/04/2010, Daniel Wamara daol...@hotmail.com wrote:
 Good evening all,

  I am trying to call ffmpeg via the command exec in order to transcode some 
 files and the strange thing happening is that the files produced are not the 
 same as the one I can create when calling the same command via the command 
 line.

  This is how I am calling fmpeg and I get a file with a particular codec in 
 it (strangely not the right one) although launching in the command line 
 exactly what I have in the sb.toString() which is the command to be executed, 
 the file created has a correct codec. So to say, the same command started via 
 Exec and the one started via the command line have not the same result. 
 Anyone has an idea?

  Thanks.
  Daniel Wamara

  StringBuilder sb = new StringBuilder(/home/ect/scripts/transcoding.sh );

  sb.append(  + source.getAbsolutePath());

  sb.append(  + attributes.getCodec());

  sb.append(  + String.valueOf(attributes.getSamplingRate().intValue()));

  sb.append(  + target.getAbsolutePath());


  logDebug(command --  + sb.toString());


  CommandLine commandLine = CommandLine.parse(sb.toString());

Why do you build up the command-line and then parse it?

Much safer to add the arguments one at a time, see:

http://commons.apache.org/exec/tutorial.html

under the heading Build the Command Line Incrementally


  DefaultExecutor executor = new DefaultExecutor();

  executor.execute(commandLine);


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org