Dragan Jovanovic

Greenhorn
+ Follow
since Feb 07, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dragan Jovanovic

Your app should not be in the lib directory, it should be in server/xxx/deploy.


I know. But if I deploy it to deploy folder, I cannot just instantiate my class from other-jar's code, I must use session beans in that case. So, this way is a bit easier. (And in fact, it's my boss's idea.)

The same code will work in a client if you provide a jndi.properties file - the client's JNDI code will load the properties from that file. Usually that is the best way to provide the properties because then you can easily change the host name or IP address.


I know. I've tried that version of code too, and I've sent you most compact code version to review. Of course I will return these settings to file.

What kind of app do you have?


In that jar I have small set of frequently-used utility classes, which all of our (wanna be SOA) services will use. That jar should be deployed on all production jboss instances.

You can provide a jboss-specific config file that includes a dependency on the queue's mbean - this way your app will not be deployed until the queue is deployed.


Hmm... sounds nice. I'll think that way. Thanks.
15 years ago
Thanks, Peter.
The problem was that my code makes JMS connection only once, while initialising object which sends messages. Looks like that code was executing before something important (maybe initialising of JMS) when I start it with JBoss (for some other reason, it's deployed in lib folder, to deploy, so I cannot redeploy it).
I discovered that while trying to execute

following your advice.
Thanks again.
15 years ago
Well, in fact, that was previous version of my code. And it also works only in standalone application. I've set these system properties because I had impression that my jboss does not know where to send message.
15 years ago
Hi. I've just started working with JMS and ESB.
I have jboss-esb.xml file with following snippet
in my .esb file on jboss where ESB resides,
and a class that makes a connection to JMS :
on my machine.
Later on, same object sends a message, my message driven bean receives that message from JMS, and it all works fine.

But,
when I deploy sender class on jboss (on my machine), and try to execute same code, I get following exception message:


Does my object in that case even point to machine 192.168.0.100 (on which ESB resides) ? Or, does jboss-deployed class have to do something more to connect to JMS ?
15 years ago
Why don't you just make a HQL query with a filter like ? In result list you will have only objects that you want, and there's no need to filter those objects again. Is this what you wanted ?

If it isn't, you can always ask for a class name of an object, using getClass() method, od instanceof operator, or something like that.
Maybe it is exactly what is written. Which database server do you use ? Does it support autoincrementing values for keys ?
If it doesn't, maybe appropriate hibernate sql dialect also does not support it. Which sql dialect do you use with hibernate ?
I am using hibernate tools reverse engeenering mechanism to (re)generate hibernate entities from relational model. Because of frequent changes I do not want to regenerate whole database every time, but to regenerate some segments of it.
But, when I define what tables to include/exclude in job (either in excludeTable() method of my custom ReverseEngineeringStrategy class, or in reveng.xml file), hiernate tools totally ignores excluded tables. That means, it ignores foreign keys to that table in included tables. For example, if I have table excluded, and table included, hibernate tools will make entity Post with an attribute , not an attribute .
How can I make it to generate that User user attribute, but not to regenerate User entity ?
Of course you can read it.
Just make a select statement, retrieve it to ResultSet object, and you can access that blob with ResultSet.getBytes() method. It returns byte[].
Uf. Are you sure ? In the meantime I've got an other recipe :
I setted SVN interface for subclipse to SVNKit, and after that I've checkouted projects from SVN server without problems. "username@" goes into an URI of repository, and password goes into eclipse's prompt, and that's all.
Am I missing something ?
If you are using pure SQL, this syntax is definitely ok.
If you are using HQL or something similar, it should also be ok. Why don't you just try it ;) ?
Hi, all.
I'm trying to connect to SVN server on a remote linux machine via SSH. I'm running windows XP.
I tried to manage it using this recipe, but I'm getting refused by server every time, so I want to check some basic things : what credential data do I need for this ? I am equipped with SVN userName & password. Do I also need linux account to reach SVN server ?
Of course, I don't want to use byte[], because I could get a memory overflow.
I found a solution for opposit problem :

and I want to connect a blob object to OutputStream, analog to this, but I can't find appropriate function. Any idea ?
I'm working with mysql.
I'm sure it can be easily done, but I just can't find it.
I want my tomcat application source code to be outside tomcat installation directory structure. And I would still like default (http://localhost:8082/) URL to point to a version of application inside the catalina_home (because of deploying), so I don't want to change any existing settings, just want to add a new folder in which tomcat will search for the jsp files.
I added following lines :

into server.xml file, but it looks like it doesn't work. Am I on the right trace _
16 years ago
Hi.
I'm having the same problem - disposition for my attachments (not all, just for one that I need) is null. So I wander, is attachment everything that looks like an attachment ? I mean, if I see it as attachment in outlook, is it realy an attachment in terms of javamail API ? Or I should look for some other data structure inside MimeMultiPart ?
You can see how my test message looks like in outlook here. I see two attachments. My application can read delivery report.txt, but in the next iteration (when it should reach this elektronski račun... attachment), disposition of the Part instance is null.
And, I forgot to tell you, that elektronski računi... attachment is infact the original mail message for which this report message is generated. And it also contains attachments.
[ May 29, 2008: Message edited by: Dragan Jovanovic ]
16 years ago
Hi.
I have a swing/jboss project with JAAS. Swing app shows a login form, user fills userName and password (and some other stuf) in, JAAS consults mysql base and lets the user in. EJB3 objects on JBoss call Context.getCallerPrincipal method to obtain information about user who called them and it all works fine.
But.
I allow every user to log into app many times, maybe setting some parameters on login form differrent (for example ledger year). So, I want every serverSide object to be aware of the session, not only the user. I created algorithm that returns a unique id for the session while loging on and I want to pass that value to server through JAAS. I browsed a lot of JAAS literature looking for a common way to solve this (and I think my problem IS common), but I didn’t see anything similar to my story.

I guess I should pass another (third) value into Callback array, but I don’t know how and where. Any idea ?
17 years ago