Simon Baker

Ranch Hand
+ Follow
since Sep 09, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Simon Baker

Alternatively:
16 years ago
Hi Anita,

Private members, including methods, of a class are only available to be accessed from within that class. The Java Tutorial has an explanation of this.

Cheers,
Simon
16 years ago
Hi Abbey,

It would probably be helpful to include the compilation error you are getting.

However, assuming that the compiled (.class) files you are attempting to import are in one of the two .jar files you mention it would appear there may be a classpath issue.

You might want to try either checking your classpath in the command shell immediately prior to issuing the javac command (if Windows "echo %CLASSPATH%") or using the -classpath option when executing javac (see javac for further info) to ensure that the relevant classes are available to the compiler. My preference is for the latter approach since it avoids cluttering up the user CLASSPATH, which becomes more relevant as you have more programs to compile.

Cheers,
Simon
16 years ago
Hi,

I started using Axis1.4 some time ago, and it was my first foray into web services. I found the book Developing Web Services with Apache Axis (Ka Iok Tong) extremely helpful.

As a bit of an aside, I've now switched to Axis2 and have found it a whole lot easier to understand and use (and it apparently performs significantly better too).

Unless you have a specific need to avoid Axis2 I would suggest you at least take a look at it.

Cheers,
Simon
16 years ago
I'm not sure whether this would be suitable in your case but you might like to look at Spring Job Scheduling support, which allows you to schedule jobs using either the JDK Timer (for simple scheduling) or Quartz (for more involved implementations). See Spring reference manual ch. 23: Scheduling and Thread Pooling.
Mark,

I just wanted to add my thanks. You have improved my understanding of WS, and I look forward to reading your book.

Simon
16 years ago
Mark,

Many thanks for your comments. That's a very helpful overview for me. I'm using Spring, which is providing many benefits, and will definitely keep an eye on the Apache CXF project (I have read good things about XFire).

Simon
16 years ago
Typesafe enumerators prior to J2SE 5.0 are another use for private constructors. See "Type-Safe Enumerations" for an overview. Also "Effective Java" (Bloch) Item 21 if you have that excellent book.
Cheers,
Simon
16 years ago
Thanks Mark,

The blog post you linked was interesting. The reasons for avoiding JAXB might, then, be either to avoid changing existing code or to continue using a familiar binding framework. The first of these doesn't apply to me since I've chosen to implement an Adapter to translate between my business level components (most of which are used in other applications) and my service operation class (I want as little coupling between my chosen Web Service implementation and business logic as I can get away with). The second of those reasons is closer to my situation but not quite the same motivation. My motivation is the choice of binding framework on the basis of it working as easily, and as effectively, as possible with Axis2 (my current requirements allow me to use ADB).

Do you think that the wish to use Axis2 is a sufficient reason to avoid JAXB, or is this restriction imposed by the use of Axis2 (in it's current implementation) not a reasonable compromise in your opinion? Would the wish to use JAXB prompt you to find an alternative to Axis2 in this case?

My current feeling is that the most pragmatic approach is for me to stick with Axis2 and ADB for now, and migrate to JAXB if a compelling reason appears later on and Axis2 has more evolved support for JAXB. A potential pitfall here is the possibility of that compelling reason emerging before Axis2 works well with JAXB, but I figure that's a bridge I may never need to cross. My experience in this area is fairly limited so I'd appreciate your views on the use of frameworks such as Axis2, XFire, or others?

I know you must be very busy and this is perhaps getting a little lengthy, but any overview comments from your experience would be much appreciated.

Thanks,
Simon
16 years ago
Mark,

I note (from the contents page) that Chapter 5 of your book covers JAXB 2.0. I used a previous incarnation of JAXB some time (around 4-5 years) ago when creating a remote service manually and found it to be very useful. More recently I have been involved with a contract-first (from WSDL) Web Service currently implemented using Axis2. As I'm sure you know Axis2 provides it's own, slightly limited, data binding framework (ADB) and integration to some degree with JibX and XMLBeans. I believe that the intention is to include better integration with JAXB in a future release.

My question is really what you think about the alternative forms of data binding (particularly ADB and XMLBeans) in comparison with JAXB with regard to ease of development, maintenance, and performance.

Additionally, what are your views on implementing services on frameworks such as Axis2 and XFire in practise? Are the benefits worth the restrictions.

Thanks,
Simon
16 years ago
Hi All,

I have a Web Service deployed (as an .aar) file to Axis2, but the dependencies (in the form of .jar files within the /lib directory of the .aar file) are not found on execution. They do get used properly if I copy them into the /WEB-INF/lib directory of the Axis2 installation, but this is not an ideal workaround.

Does anybody know of any configuration settings I might have missed? Has anybody got a service working successfully with .jar file dependencies within the .aar file (on OC4J or other server) with Axis2 v1.2? I'm not sure whether my problem is with Axis2 or OC4J, so might have to deploy the service to a Tomcat server to check but would rather not go through that cycle if someone can point me in the right direction.

Thanks,
Simon

p.s. I am using Axis2 v1.2 deployed to OC4J 10.1.3 (standalone version) on a Windows 2000 machine at the moment.
16 years ago
I would agree to avoid EJB initially. There are a small number of cases where they probably help, but the Spring framework (and probably others) make them an unnecessary overhead for most applications.

For a discussion about how EJB makes life difficult, what easier alternatives are available, and when EJBs are useful I'd recommend Rod Johnson's "J2EE Development without EJB". This book will also introduce you to many of the real-world considerations for server side Java - there are still numerous Java books that ignore (or at least sideline) the real world.

Good luck,

Simon
16 years ago
Hi All,

I hope someone might be able to help. I have a web service that works on Axis 1.4 configured for the standalone version of OC4J 10.1.3, and would like to deploy the same service to the Enterprise edition of OC4J.

I haven't been able to find anything of use amongst the Apache or Oracle documentation (the standalone configuration was based on some information about Orion).

Please could anybody provide instructions, or a link to any instruction document, for this?

Alternatively, is it likely to be easier to configure Axis2 with OC4J and deploy the service to that?

I wasn't sure whether this should be in this forum or the Oracle AS forum.

Thanks,
Simon
16 years ago
Hi,

Your questions are not really Oracle-specific (unless question 3 refers to PL/SQL).

Anyway, I'd suggest "An Introduction to Database Systems" (C. J. Date) - see the Publisher's page

Cheers,
Simon
16 years ago
I'd be surprised if it didn't compile to the same byte code too.

Other points that may be relevant to Jussi (or others - forgive me if I'm teaching Grandma to suck eggs):

- The use of the shortcut logical operators (&&) motivates the above comment. If the alternative (&) were used all evaluations would happen regardless of the outcome of earlier tests, thus making the single "if" version logically different to the multiple "if" version.

- If the boolean tests themselves were more potentially time-consuming (e.g. executing a complex method) the order may become significant - generally putting time-consuming evaluations and/or those least likely to cause an end to execution of the "if" statement toward the end is better.

- As with all these things, when used in real application code if tests show the method containing this logic to be a performance problem test it, try different approaches, and test them rather than relying on what we may think likely. If tests show no problem don't worry about it.

Cheers,
Simon
[ January 10, 2007: Message edited by: Simon Baker ]
17 years ago