Bill White

Ranch Hand
+ Follow
since Oct 27, 2002
Merit badge: grant badges
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 Bill White

I am trying to find a very simple EJB3 tutorial that will run on Sun AppServer 9.1.

I remember back in late 2005, early 2006 SUN had a real sweet tutorial to introduce the EJB3 spec. Something like that would be REAL cool.

Thanks
Hello,

I am attempting to setup a ANT script that will eventually run my jar.

Here is the run target:

<!-- - - - - - - - - - - - - - - - - -
target: run
- - - - - - - - - - - - - - - - - -->
<target name="run" depends="jar">
<java jar="build/jar/nlpxfer.jar" fork="true">
<arg line="-Xmx150m"/>
<arg value="RISS_Spec"/>
<arg value="\\10.102.0.52\public\bill\L3"/>
</java>
</target>

I have classes12.zip in my classpath:

<path id="classpath">
<pathelement path="${junit.jar}"/>
<pathelement path="${jdom.jar}"/>
<pathelement path="${classes12.zip}"/>
<pathelement path="${xercesImpl.jar}"/>
<pathelement path="${xmlParserAPIs.jar}"/>
</path>

<property name="classpath" refid="classpath"/>

When the jar is executed, I get this error in my stacktrace

Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

Shouldn't the class have been loaded up and ready for use? Am I not calling it correctly? I have used path=${classpath} pathref=${classpath} etc...

How do I ensure the proper jars are loaded up w/ ANT?

Thank you.
16 years ago
But what if you need J2EE.jar and are still experiencing these problems?
16 years ago
Everyone,

Thank you for your replies and insight. I knew that a programmatic approach to this was not the correct approach.

It is more then apparent that our Sys Admin does not understand what J2EE is all about.

I will be the first to admit that I don't know everything about J2EE (Who really does.) But, to give him the benefit of the doubt, I opted to come here to a community of experts, and see if this was a viable option.

Again, thank you, everyone.
I am wondering if there is a way to pass arguements to an EJB. Just like we would pass arguements to a class w/ a main...

java -blah com.blah.myClass options

What I am trying to get at here is. Our sys admin doesn't believe that grabbing a datasource out of JNDI is a viable option. Because the DS name is coded into some bean somewhere...

I know, if you want your DS to point at another DB, you just point connection url to another DB in your DS file. For instance oracle-ds.xml in JBoss.

Our sys admin isn't happy with just changing the *-ds.xml file. He is demanding that he is allowed to have 6 *-ds.xml files. Then somehow, we as programmers programatically tell the EJB's which file to use.

Has anyone done this before? To be truthful, I think this is a bit redundant. Building a config file to determine which *-ds.xml config file to use.

Besides putting logic into our UI to pass an arguement to a session bean to then get the proper data from a uber-config file, to then get the proper datasource. This approach in my opinion is prohibitive, it would involve alot of refactoring of code.

Any insights into this would be greatly appreciated.


Thank you.
Ulf,

Thank you very much.
[ November 17, 2005: Message edited by: Bill White ]
17 years ago


For a no-frills solution you could go with implementing Observer on one side, and extending Observable on the other, thus saving you from having to create your own event class.



First, I thank the both of you for your replies. I really appreciate it.

Next, the observer pattern approach sounds very no-frills, and therefore the way to go!

Question on this though, is there any possible caveats w/ a class implementing Observer and extending Observable?

Here is what I would like...

DocApprovalManager implementing Observer
DocApprovalQueue implementing Observer extending Observable
DocApprovalItem extending Observable

DocApprovalManager observes DocApprovalQueue
DocApprovalQueue observes DocApprovalItem

When an item changes, it updates the Queue object, does what ever queue operations are neccessary, then updates the DocApprovalManager object which again performs any manager type operations that may be neccessary.

Does this sound like a reasonable approach?

Again, thank you.
17 years ago
I am trying to implement my own listener model (for lack of better terms) that will help a manager type class determine if a record in a database has been updated.

What I am asking is, am I going down the right path? Does anyone here have any experience with something similar?


Here is what I have so far:

public interface ApprovalListener
{
public void approvalAlert(ApprovalEvent e);
}

public class ApprovalEvent extends EventObject
{

/**
* @param source
*/
public ApprovalEvent(Object source)
{
super(source);
// TODO Auto-generated constructor stub
}

}

public class ApprovalManager implements ApprovalListener
{

private Collection approvalListeners;

public ApprovalManager()
{
super();
// TODO Auto-generated constructor stub
}


public void approvalAlert(ApprovalEvent e)
{
// TODO Auto-generated method stub

}

public void addApprovalListener(ApprovalListener l)
{
if(approvalListeners == null)
{
approvalListeners = new ArrayList();
}

if(approvalListeners.contains(l))
{
return;
}

approvalListeners.add(l);
}

}
17 years ago
I am curious if anyone in this community has used or even heard of Expresso?

If so, can you please give me your thoughts on it.


Thank you.

Originally posted by Paul Sturrock:
Yes, since Hibernate is a POJO technology, you can use it with pretty much anything.



What would you suggest? A JNDI bound Session Factory?

Originally posted by Gregg Bolinger:
Bill MJr,

Welcome to Javaranch. Please read our Naming Policy and adjust your display name.

Thanks

[ September 19, 2005: Message edited by: Gregg Bolinger ]



Done =)
Can you use Hibernate w/ Sun Server 8? Is there any documentation where I can find this?

Thank You.
I have heard that it is, and that it's not... Anyone care to comment?
17 years ago
I built a class that uses the DOM to navigate an XML structure. It's methods basically return an element as a String.

An example... if a user calls getRemarks()

<remarks>Some basic remark</remarks>

Should be returned. When I test the class, I get the expected result.

However, when this class is used in conjunction w/ Tomcat and Cocoon
[remarks: null] is returned.

Is there anyone out there that knows why this could be happening? Could it be that Tomcat or Cocoon are implementing an older jar file?

I appreciate any help w/ this problem.
17 years ago
Here is our environment:
JBuilder9 w/ latest patch.
Sun App Server 7.
Oracle 9i

We are having trouble accessing an object that should contain CLOB data. The member variable containing this data is always null.

Any ideas what the magic solution is? Should we move to AppServer 8? Is there a mapping that we are missing? We have tried mapping CLOB to java.lang.string.

Any help is appreciated.

Thank You.
18 years ago