Search Results

Search found 4 results on 1 pages for 'edbras'.

Page 1/1 | 1 

  • How to see if an object is an array?

    - by edbras
    How can I see in Java if an Object is an array without using reflection? And how can I iterate through all items without using reflection? I use Google GWT so I am not allowed to use reflection :( I would love to implement the following methods without using refelection: private boolean isArray(final Object obj) { ??.. } private String toString(final Object arrayObject) { ??.. } BTW: neither do I want to use Javascript such that I can use it in non-GWT environments Ed

    Read the article

  • Bulk insert of component collection in Hibernate?

    - by edbras
    I have the mapping as listed below. When I update a detached Categories item (that doesn't contain any Hibernate class as it comes from a dto converter) I notice that Hibernate will first delete ALL employer wages instances (the collection link) and then insert ALL employer wage entries ONE-BY-ONE :(... I understand that it has to delete and then insert all entries as it was completely detached. BUT, what I don't understand, why is Hibernate NOT inserting all the entries through bulk-insert?.. That is: inserting all the employer wage entries all in one SQL statement ? How can I tell Hibernate to use bulk-insert? (if possible). I tried playing with the following value but didn't see any difference: hibernate.jdbc.batch_size=30 My mapping snippet: <class name="com.sample.CategoriesDefault" table="dec_cats" > <id name="id" column="id" type="string" length="40" access="property"> <generator class="assigned" /> </id> <component name="incomeInfoMember" class="com.sample.IncomeInfoDefault"> <property name="hasWage" type="boolean" column="inMemWage"/> ... <component name="wage" class="com.sample.impl.WageDefault"> <property name="hasEmployerWage" type="boolean" column="inMemEmpWage"/> ... <set name="employerWages" cascade="all-delete-orphan" lazy="false"> <key column="idCats" not-null="true" /> <one-to-many entity-name="mIWaEmp"/> </set> </component> </component> </class>

    Read the article

  • Apache Content negotiation returns wrong Content-Type with Mulitviews :(

    - by edbras
    I am using Apache webserver 2.2 with Content Negotiation through Multiviews. I have: <Directory /home/develop/web/prodBuild> Options +MultiViews AddEncoding x-gzip .gz </Directory> This directory contains the gzip files. So if a browser requests the file bla.js, the server will return the file bla.js.gz as the file bla.js doesn't exists. However, the Content-Type on my Ubuntu server is set to be "application/x-gzip" which is wrong as it's a javascript file, so is has be "application/javascript" I have this working on my local Windows Apache server, but don't seem to get it working on the remote Ubuntu server. :(... NO idea why... Who/why is it setting this wrong Content-Type ? BTW: I don't have this line "AddType application/x-gzip .gz .tgz" somwhere in my config, as then I understand why it goes wrong. My workaround: add the following line under the above "AddEncoding": AddType "" .gz It will then set an empty string as Content-Type and then it works.. I think that the browser will try to discover the content type itself... I hope somebody can explain to me why this is not working and why this content type is set ? :(

    Read the article

  • How to set the ActiveMQ redeliveryPolicy on a queue?

    - by edbras
    How do I set the redeliveryPolicy in ActiveMQ on a Queue? 1) In the doc, see: activeMQ Redelivery, the explain that you should set it on the ConnectionFactory or Connection. But I want to use different value's for different Queue's. 2) Apart from that, I don't seem to get it work. Setting it on the connection factory in Spring (I am using activemq 5.4.2. with Spring 3.0) like this don't seem to have any effect: <amq:connectionFactory id="amqConnectionFactory" brokerURL="${jms.factory.url}" > <amq:properties> <amq:redeliveryPolicy maximumRedeliveries="6" initialRedeliveryDelay="15000" useExponentialBackOff="true" backOffMultiplier="5"/> </amq:properties> </amq:connectionFactory> I also tried to set it as property on the defined Queue, but that also seem to be ignored as the redelivery occurs sooner that the defined values: <amq:queue id="jmsQueueDeclarationSnd" physicalName="${jms.queue.declaration.snd}" > <amq:properties> <amq:redeliveryPolicy maximumRedeliveries="6" initialRedeliveryDelay="15000" useExponentialBackOff="true" backOffMultiplier="5"/> </amq:properties> </amq:queue> Thanks

    Read the article

1