jason adam

Chicken Farmer ()
Ranch Hand
+ Follow
since May 08, 2001
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 jason adam

Yeah, I suggested that we look at a different way of doing it. It's been awhile since I've looked at the api. We'll try that way, thanks :-)
6 years ago
That is correct, I was posting the strings we use. The part of the code prepends file:// to the strings. Sorry if I made that confusing.
6 years ago
Sure thing. The rest of the string are directory locations and because of work rules, I'm just filling in with fluff here. Always throws a FileNotFoundException. One other thing I forgot to mention, and may play a part, is on the old version we're running in Weblogic 8.1, new version is Jboss 6.

String going into the URL -> Result in the exception thrown

\\server_name\share_name\dirA\sc\data\distrib\filename.xml -> \\server_nameshare_name\dirA\sc\data\distrib\filename.xml
\\\\server_name\\share_name\\dirA\\sc\\data\\distrib\\filename.xml -> \\server_nameshare_name\dirA\sc\data\distrib\filename.xml
//server_name/share_name/dirA/sc/data/distrib/filename.xml -> \\server_nameshare_name\dirA\sc\data\distrib\filename.xml
server_name\share_name\dirA\sc\data\disrib\filename.xml -> E:\jboss6\bin\server_name\share_name\dirA\sc\data\distrib\filename.xml (the only result that doesn't remove the slash between server and share, but of course it's pointing to a bad location)
\\server_name\\\\share_name\dirA\sc\data\distrib\filename.xml -> \\server_nameshare_name\dirA\sc\data\distrib\filename.xml (we've stuck up to 6 slashes in between server and share and it always removes them all)

So basically any time we do a \\server_name\share_name, no matter if we escape the \'s or not, it always removes just the slash(es) between the server and share. Everything else remains untouched (though if we escape the \'s it will return them as singles in the rest of the string).

The only time it doesn't remove a slash is if the string is a local file system. But then, our files don't reside locally so that doesn't do us much good.
6 years ago
Tried that, but still gives the same error. The weird thing is it only removes the slashes after the server_name, nowhere else in the string will it do that.

And to throw another gotcha in there, this works in the version of software we have that runs Java 1.4.2. It's not working in our Java 6 version. We're also running on different versions of OS's. Our Java 1.4.2 is on Win2k, Java 6 is on Windows 7.
6 years ago
Howdy all. Having an issue converting a file path to a stream for an XML DocumentBuilder to parse an XML file as a stream. Here's our code:



Upon doing this, we're getting FileNotFoundExceptions, and the error shows the file location to be "\\server_nameshare_name\..." with the slash between the server and share removed. It doesn't matter how we write the slash(es), it always removes them from that one spot and no other.

What is going on here, and how can we remedy it?

Thanks for the help!
Jason
6 years ago
We're using JBoss ESB 4.9 at work, and it essentially works as a router between different software subsystems. For qual testing, I was asked to create a test tool that acts like an end point to either send or receive messages from a subsystem. The nature of the testing means that not all subsystems will be up while testing. For instance, if in normal operations subsystem A sends messages through the ESB to subsystem B and C, the test tool will need to act like A without A actually being "up".

Without having to have a jboss-esb.xml for all the different possibilities of testing that might be going on, is there a way to configure the ESB so that if a defined jms-provider isn't currently running, the ESB will still load my test.esb package? Currently it will throw connection refused exceptions and the package doesn't initialize. I'm hoping there is some configuration that will either tell the ESB to ignore those or to catch and log/ignore the exceptions. Otherwise, the only way I can tell to do this is each time the testers want to run a test, they'll have to replace jboss-esb.xml with one that has just the jms-providers that will be up at the time, and that's making it a bit more complicated than we initially planned for (because that NEVER happens in the software world).

Any suggestions/help/pointing to docs is greatly appreciated. So far, I have yet to find anything in reading all the sources I have that addresses this.

Jason
6 years ago
First, howdy Javaranch, long time no post

So I've been tasked with using JBoss ESB on my project. One of the questions I was asked is if you can open a port on the ESB so that a client (a COTS package that can be configured to open socket connection to external server but not to be one itself) can create a socket connection to the ESB, and if a connection appears we start routing data to it from another software component.

I know how to have JBoss ESB listen to a port and do some action when it sees data on that port, but I've never made an ESB expose a port itself and have clients connect to it.

I've read about JBR, and how you can set up a gateway connection in JBoss ESB. I haven't had the time to actually play with it, but does a jbr-provider cause the ESB to open a connection port itself, or is it just like any other provider, where the esb connects to the provider but isn't the provider itself?

Hopefully this makes sense. The only other way I can think of implementing this is having a service start up when the ESB starts, and that service opens a port and the COTS package connects to that. Then I'd just configure the ESB to use that service as just another endpoint, which would receive the appropriate messages and forward them to the exposed port (which the COTS package would then read in and do what it needs).

It might make sense to just have our in-house software allow for socket connections itself and bypass the ESB, but it is already publishing the needed data to other endpoints via JMS and we wanted to leverage the ESB as much as possible.

Thanks in advance!
Jason
8 years ago
Oops, I forgot to annotate B with @Entity

B's are also entities. I would really love to figure how to use a join here, but it again the fields used between the two are not keys. For joins, at least in my limited knowledge, a field in one table is a key for the other. I was getting some weird SQL exception when I tried messing with joins so I thought I'd first try just querying for them, then I'd go from there.

Thanks for the info about not injecting into entities! Looks like I'll have to resort to good ol' JNDI at first.
Using JBoss 4.2.1, Java 6 and JEE 5.

The basic structure of the offending code is I have a stateless bean using the EntityManager to get a set of entity beans. Those entity beans are using @PersistenceContext.

I have a @PostLoad method in the entity that also uses the EntityManager to get some other beans (I'm going to look into a join, but the fields I need to search over are not the primary key fields so it isn't a standard relationship. If anyone knows how to do that with annotations I'm all ears).

Problem is, the session bean seems to be getting the first set of entities just fine. However, the EntityManager in my entity bean is not getting injected; I get a NullPointerException trying to use it in the @PostLoad.

One thing to note is that the first entity is a subclass of a @MappedSuperclass. I don't think that should have bearing on this, but I could easily be wrong.

So pseudo-code


So all A's contain a list of related B's (but again this is shared by a data value other than the keys so not sure how to map that with annotations yet).

Debug also shows that EntityA is getting populated with all the data from the database, so I know that that is not an issue. And the session bean is using the EntityManager with no problems so my configuration appears correct.

Is this a violation of the spec or something that I don't understand (which is a lot it seems ), or is what I'm presenting viable and there is some other dastardly issue afoot here??

Thanks!
Jason
[ December 04, 2008: Message edited by: jason adam ]
First off, hey howdy Ranchers! Long time no see

Now on to the problem. Basically, I have a client application that runs a bunch of applets. Our application, at start up, creates a Authenticator and sets it as default. When we first try to get a session from the server (running on Weblogic), which is all done through servlets, we get the little username/password as expected.

The problem is the users have decided they want the ability for an application adminstrator to be able to log in within the same session (so different credentials than logged in previously) and do some administrative stuff, like release a locked resource.

So the flow would be User A (non-administrator) opens the application, realizes something is hosed with a resource, and asks User B (administrator) to release it. User B clicks on an Administrator Release button, which creates a new Authenticator, sets the current default to null (which according to the API should remove any current authenticator) and then sets the default to the new one. A session is then created which when requested should ask the new user for their username and password. That's then validated and checked for admin rights, and the resource is released. We reset back to the previous authenticator, and User A can then go about their work.

I would expect to have the new Authenticator's request for username and password be shown, however it appears to be using the previous credentials, even when I null out the default authenticator without resetting the default.

Oh yeah, this is all on SDK 1.4.1_13. Yay for being behind the times!

I would love to post code snippets, but das ist verboten where I work.

And hopefully this makes sense.

Thanks for any help, peace!
Jason
[ July 07, 2008: Message edited by: jason adam ]
10 years ago
Moving this to the Websphere forum
14 years ago
I answered the question over in the post mentioned above. As I state there, this has been brought up a few times and I've tried to get a clear answer, but none has been forthcoming.
I've actually addressed this issue a couple of times. Basically, we don't know. Howard Kushner was checking with IBM since he's got a direct line to over there, but haven't heard back.
Since I don't have their agreement in front of me, and have no idea who at IBM would be the best to talk to (I've never taken these tests, and no next to nothing about them, let alone the ICE stuff), I would hesitate to make a definitive answer.
Personally, if you pay for something, I don't see why you would want to post the questions for everyone else to grab for free. But that's me.
Also, many of the posts that have the sample questions were made before you had to pay for them. If they are the same tests, the people who didn't have to pay for them probably didn't have to click on an agreement and therefore in my opinion it's ok for them to post it.
As soon I know more, we'll have a post stating Javaranch's official policy. In the mean time, I'll ask the boss man what his take on it is and how to proceed.
Sorry it took me so long to reply, I've been out sick with the cold and trying to get final revs done at work at the same time, so haven't had time to bounce in here.
I can't find the source, but from what I understand the whole premise behind Underworld was stolen from a White Wolf story. Being an avid White Wolf gamer, and an even more so vampire fanatic, they totally gimped the vampires. Based on that movie, the leeches should have been dead a LONG time ago.
The coolest lady in the movie was the elder on the train. And I'm sorry, but a train full of elder vampires would have been able to handle a couple of furballs with guns.
Oh, and Kate passing out after getting that wound in her shoulder?? Come on, she should have been able to pump some blood to that thing and healed up all nice like.
Just plain silly.
The first Matrix rocked comparitively, but the others are still fun to watch if you just watch them for the sensationalism. Oh, and having friends with a flat panel plasma Hi-Def TV and an awesome surround sound system helps, too
You know, I never noticed how Catwoman and Trinity had very similar outfits...
And I'm curious if anyone ever thought Luke Skywalker or Princess Leia were "hot". Before the whole Jabba the Hut thing, of course. I did notice in the new films (which suck, IMHO), the cast has a more GQ look.
14 years ago