Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

Collins Mbianda

Ranch Hand
+ Follow
since Aug 11, 2007
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Collins Mbianda

Himai Minh wrote:Hi, Collins,

should it be

select pg from PropertyGroup pg inner join pg.properties pr inner join pg.properties pr2 where pr.name = 'position' and pr.value >= 10 and pr2.name = 'priority' and pr2.value >= 10



?



Hi Himai !
Yes that the correct query. Thanks !

Himai Minh wrote:How about this?


select pg from PropertyGroup pg inner join pg.properties pr where (pr.name = 'position' and pr.value >= 10 ) or (pr.name='priority' and pr.value<=10)





Hello Himai . Thanks for your reply.
I try your it but it not returning the result i want. If i insert in the db two properties position=10 and priority=11.
In the result i the PropertyGroup. I think because of the or.

When i try something like



I get the correct result.
But i don't like it because i i have to filter on more property, i have to add inner join pg.properties primany times.
Hi guys,
I have a problem with a filter for a one to many Relationship.

I have 2 tables PROPERTY_GROUP(ID, KEY) and PROPERTY(ID, GROUP_KEY, NAME, VALUE)
2 entities PropertyGroup and Property





When i filter 1 name and 1 value all OK:

So i can find all property group with property position >= 10

In the table PROPERTY i have two entry with name position and priority.
I want to retreive the group with both properties position >= 10 and priority <= 10

Can some one help me ?
Thanks!
I think the problem is that my Naming server is not found.
Addind a JNDI provider it work. Is there any of resolving it without modifying the conf/jndi.properties ?

Thanks !!!
6 years ago
Hi Jaikiran,

I m using the Version 4.2.1 of JBoss.
The resource is not found. I just add my xyz-service.xml in the deploy directory. I'm having the following exception:

javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]



Thanks
6 years ago
Hi guys,
I'm deploing my webapp on JBoss. I want to externalise some data without modifying the war.
The same war is deployed on different JBoss. But the application is pointing to an external service. The url of the service change any time.

I think to do it with JNDI (https://community.jboss.org/wiki/JNDIBindingServiceMgr)
The problem is that when i create my xyz-service.xml the resource was not found.

Can any one suggest the best way to to this with or without JNDI ?
Thanks !!!
6 years ago
Ok,
Thanks Mikalai
I'm going to check for Pro JPA 2. Mastering the Java Persistence API and prepare the exam.
The current JPA Developper is for JPA 1 or JPA 2 ?

Thanks !!!
I get it.
to tell Eclipse to deploy my jar in tomcat i need to do>> mvn eclipse:eclipse -Dwtpversion=2.0 on both the two projetcs

I was doing it just on the web project. On the project package i was just doing an mvn eclipse:eclipse.

Thanks !!!
Collins
Hy guys,
Thanks for you responses,
I have "myServices" as dependency in the pom of my webapp, i think is for that reason
i have a reference of that project in the webapp.
When i do an mvn clean install, i see that the jar is in the local repository.
If i do an mvn clean install on my webapp i have a war with my jar inside the lib directory of the war. And it OK

My problem is that when i deploy the webapp whith wtp in eclipse, my java project("myServices") is not deploy.

The problem is when i deploy my webapp in eclipse


Hi guys, I have a problem with Maven and eclipse.
I don't know where to put my thread under IDE or under Maven.

I open this thread Maven + Eclipse + Tomcat

Do any one has and idea ? thanks !!!
8 years ago
I have create a maven web project project. And one of the dependencies of my project
is a maven simple project (package as a jar) call my-services. Both the projects are presents in eclipse

I run mvn:eclipse:eclipse for my-service and mvn:eclipse:eclipse -Dwtpversion=2.0 for my web project

In the .classpath, of the webapp, i have:
<classpathentry kind="src" path="/my-services"/>

In the org.eclipse.wst.common file of the webapp i, have

<dependent-module archiveName="my-services.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/my-services/my-services">
<dependency-type>uses</dependency-type>
</dependent-module>

The problem is that when i deploy my webapp in tomcat with eclipse , the jar of my-services is not deploy
or .class or the my-services are not deployed with the webapp. All classes of my simple project are missing
after the deployement.

I'm missing something in my configuration ?

I'm using Eclipse Ganymede, maven 2.0.9 and tomcat 5

Thanks !!!

Poonam Agarwal wrote:
As per my knowledge url contains only "/" slashs are served by the static file or servlet listed by <welcome-file-list>
Am I right??? please correct if not
Thanks



I think the Default Servlet will be called if no <welcome-file> page is found and the listing directory is enabled.

Ulf Dittmer wrote:Googling for "default servlet" will get you many results that describe what it means in the context of the Tomcat servlet container.



I understand know the concept:


The Default servlet (or DefaultServlet) is a special servlet provided with Tomcat, which is called when no other suitable page is found in a particular folder.

For example, it will be called if the following folders are empty:

http://yoursite.com/
http://yoursite.com/images

It's purpose is to display a directory listing, which may be enabled or disabled by modifying the "listings" parameter.

The definition for the Default Servlet is in the server-wide default web.xml file (<jakarta>/conf/web.xml). It looks like this (for Tomcat 5.5):

<servlet>
<servlet-name>default</servlet-name>
<servlet-class>
org.apache.catalina.servlets.DefaultServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

As you can see from the above, the servlet is built into one of the Apache libraries.
There is also a <servlet-mapping> tag which maps the servlet to the "/" url-mapping:

<!-- The mapping for the default servlet -->
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

When is the Default Servlet called?
* The Default Servlet is called when no suitable <welcome-file> page is found in the folder. See the <welcome-file-list> tag for information on the exact sequence of events.

What can I do with the Default Servlet?
* You can override it, to provide your own handler
* You can use it to enable or disable the Directory Listings Feature of Tomcat