[Installation, Configuration & DEPLOYMENT] - jboss 3.2.3 read-ahead, loadgroups and eager-load-group
by sponiza
Hi all,
I am trying to get read-ahead working for my installation. First with on-find and later with on-load. I have read and read the documentation on this, put the loadgroups-statements on different places in the jbosscmp-jdbc descriptor, but JBOSS keeps complaining about a NullPointerException in getLoadGroupMask.
My questions:
1. Does that mean that the eager-load-group basic is unknown?
2. If so, where should the loadgroups-statement be put so that in can be read? Putting a <eager-load-group>basic</eager-load-group> between and gives the message that eager-load-group basic is unknown.
3. Do you have any example complete jbosscmp-jdbc file which I could investigate?
Any tip would be highly appreciated, part of the jbosscmp-jdbc is pasted below:
I have tryed to paste part of the jbosscmp-jdbc.xml jar below. Unfortunately in the preview it seems to leave out some statements. Therefore I put comments in.
===============start===============================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jbosscmp-jdbc PUBLIC "-/JBOSS//DTD JBOSSCMP-JDBC 3.2/EN" "file:/usr/jboss-3.2.3/docs/dtd/jbosscmp-jdbc_3_2.dtd">
<jbosscmp-jdbc>
<!-- in the defaults section the datasource and the datasource-mapping are defined, no read-ahead statements or loadgroups -->
<!-- the enterprise definition starts. There is no information between the defaults-section and the enterprise start -->
<enterprise-beans>
<!-- the entity start here -->
<ejb-name>BoekingejbStemTutorEJB</ejb-name>
<table-name>stemtutor_table</table-name>
<cmp-field>
<field-name>relation_key</field-name>
<column-name>relation_key</column-name>
</cmp-field>
....
<cmp-field>
<field-name>update_userid</field-name>
<column-name>update_userid</column-name>
</cmp-field>
<!-- after all cmp-fields a loadgroups definition -->
<load-group-name>basic</load-group-name>
<field-name>stemkey</field-name>
<field-name>tutorkey</field-name>
<!-- after the loadgroups definition the queries -->
<query-method>
<method-name>findByCouncilnr</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<declared-sql>
organisationnr={0}
tutorkey
</declared-sql>
<query-method>
<method-name>findByStemKey</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<declared-sql>
organisationnr={0} and stem={1}
tutorkey
</declared-sql>
<read-ahead>
on-find
<page-size>150</page-size>
<eager-load-group>basic</eager-load-group>
</read-ahead>
</enterprise-beans>
</jbosscmp-jdbc>
====================end========================
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111481#4111481
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111481
18 years, 4 months
[JBoss Seam] - CascadeType.Remove and asynchronous method
by hispeedsurfer
Hi,
I have a entity that is in relation with some other entities with cascade type 'remove'.
When I call an action from website to remove (entityManager.remove(userQuery);) an specific entity all other entities are also removed as expected.
But if the same is called inside an asynchronous method only the first entity is removed(userQuery in this case).
Here the quartz scheduled class
@Name("processor")
| @AutoCreate
| public class ReportProcessor {
|
| @In
| EntityManager entityManager;
|
| @Logger Log log;
|
| @Asynchronous
| @Transactional
| public QuartzTriggerHandle scheduleDeleteReport(@Expiration Date when, UserQuery userQuery)
| {
| userQuery = entityManager.merge(userQuery);
|
| log.info("[#0] Processing userQuery #1", System.currentTimeMillis(), userQuery.getId());
|
| if (userQuery.getActive()) {
| entityManager.remove(userQuery);
| }
|
| return null;
| }
| }
UserQuery for example is joined with
@OneToMany(mappedBy="userQuery", cascade=CascadeType.REMOVE)
Is there a solution get this working or what's the cause only the first entity is removed?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111475#4111475
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111475
18 years, 4 months
[JBossWS] - Weird behaviour of JbossWS with DII
by paoletto
i have this endpoint, which reflects a Session bean implementation
| package bps.ejb;
|
| import javax.jws.WebService;
|
| @WebService(targetNamespace = "http://bps.ejb",
| name = "BpsFrontendEndpointInterface")
|
| public interface BpsFrontendEndpointInterface {
| public String hello();
| public String hello2(String foo, String bar, String pippo);
| public void insertProcess(int queue, int prio, String data, int ptype,
| String callbackMode,String callback,String callbackParm, String returnAddress);
| public void reactivateProcess(int pid);
| public void holdProcess(int pid);
| public void deleteProcess(int pid);
| public String testEntity();
| }
|
where's the weird part? well, if i change both in the endpoind and in the slsb the method "hello2()" to return a String[], when i invoke it with a configured DII client (copied straight off the examples), i get a "org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://jaxb.dev.java.net/array}stringArray". Ok.
BUT it happens too even for method String hello(), which by the way worked before (eg. when hello2 was String instead of String[]) and same for insertProcess() and others.
So actually adding a String[] method to this endpoind (and to the implementation) cause DII to fail for every other methods.
Can someone explain me this point?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111468#4111468
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111468
18 years, 4 months